<@U04SE163WC8> how do i initiate a sync using the ...
# replication-ask-ai
b
@kapa.ai how do i initiate a sync using the API and connectionId if the connection sync was manual
k
You can initiate a sync using the API and connectionId by making a POST request to the Airbyte's API endpoint. Here's how you can do it using cURL:
Copy code
bash curl  -u 'airbyte:password' -X POST "<http://localhost:8000/api/v1/connections/sync>" \  -H "Accept: application/json"\  -H "Content-Type: application/json" \  -d '{"connectionId":"[REPLACE WITH YOUR CONNECTION ID]"}'
Replace
[REPLACE WITH YOUR CONNECTION ID]
with your actual connectionId. This command will trigger a sync and respond with a JSON that indicates that a Sync has started. You can get the connectionId from the URL shown in your browser when you are viewing the details of the connection in the Airbyte UI. For more details, you can refer to this [tutorial](https://airbyte.com/tutorials/how-to-use-airflow-and-airbyte-together). Please note that the above command assumes that you are running Airbyte locally and the API is accessible at
<http://localhost:8000>
. If you are running Airbyte on a different host or port, please adjust the URL accordingly.
b
@kapa.ai I get
405
response code when i do that
k
A message from kapa.ai
Hmm, I don't know enough to give you a confident answer yet. The information provided in the extracts does not include details about handling a
405
response code when initiating a sync using the API and connectionId. For more information, you might find it helpful to refer to the [Airbyte Documentation](https://docs.airbyte.com/) or ask your question in the [Airbyte Community](https://discuss.airbyte.io/).