# WebAPI

DBSync Cloud Replication can run replication process using Web API thus allowing usage of Web Service call to initiate the process of replication. This section explains the steps involved in running the replication using Web API.

The URL should be passed to run the replication using Web API. When the URL is passed, if any replication process is already running, the status will show as *running.* If no other process is running, the status will show as *submitted* which actually initiates replication process depending on the URL.\
URL should be in the below format.

<http://localhost:8080/dbsync/profile/run/><\<profile-name>>/<\<run-type>>?retType=json

<\<profile-name>> is the name of the profile\
<\<run-type>> decides the type of replication process and it can be cleancopy, source\_to\_db or db\_to\_source

* cleancopy
  * to run clean copy from Source to Database
* source\_to\_db
  * to run update schema sync from Source to Database
* db\_to\_source
  * to run Database to Source replication

Example:

* To run cleancopy from profile sqlserver
  * <http://localhost:8080/dbsync/profile/run/sqlserver/cleancopy?retType=json>
* To run incremental replication from profile sqlserver
  * <http://localhost:8080/dbsync/profile/run/sqlserver/sf_to_db?retType=json>

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.mydbsync.com/cloud-replication-main/v6/key-features/running-replication/webapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
