Update a Connection State
Updates the connection state. To update the state, you should pause your connection first.
To update the connection state, do the following:
- Pause connection using Update a Connection endpoint (set 'paused' to 'true').
- Update the state by using the Update Connection State endpoint.
- Unpause the connection by setting the 'paused' parameter to 'false' in the Update a Connection endpoint request.
This endpoint is only supported for Function and Connection SDK connectors.
Request schema
Path parameters
The unique identifier of the connection. Retrieve it from the id field in the List All Connections response, or from the id field returned when you Create a Connection.
Header parameters
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Request
A freeform JSON object representing the connector's cursor or internal state to write. The structure is defined by the connector implementation and varies by connector type. If omitted or set to null, the existing state is preserved and the response returns 200 without modification.
PATCH /v1/connections/4107c213907114059a5544ad8fa66c52/state HTTP/1.1 Accept: application/json;version=2 Authorization: BasicContent-Type: application/json Host: api.fivetran.com Content-Length: 57 { "state": { "cursor": "2024-01-01T00:00:00Z" } }
Responses
200
Response status code
Response status text
A freeform JSON object representing the connector's cursor or internal state. The structure is defined by the connector implementation and varies by connector type. Returns 400 if no state has been written yet.
{ "code": "Success", "message": "Connection state has been updated", "data": { "state": { "cursor": "2024-01-01T00:00:00Z" } } }