Retrieve Connection State
Returns the connection state. This endpoint is only supported for Function and Connection SDK connectors. To update the connection state, use Update Connection State.
Request schema
Path parameters
connectionId
stringrequired
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.
example:
4107c213907114059a5544ad8fa66c52
Header parameters
Authorization
stringrequired
HTTP: basicAuth
HTTP AuthorizationScheme: basic
Accept
string
default:
application/json;version=2
example:
application/json;version=2
Http + 1.1
GET
https://api.fivetran.com/v1/connections/4107c213907114059a5544ad8fa66c52/state
GET /v1/connections/4107c213907114059a5544ad8fa66c52/state HTTP/1.1 Accept: application/json;version=2 Authorization: BasicHost: api.fivetran.com
Responses
200
Successful response
400
The connection state doesn't exist.
401
Unauthorized error
404
Connection not found error.
405
Not a function connector error.
406
Not acceptable error
200
code
stringrequired
Response status code
example:
Success
message
string
Response status text
example:
Connection state retrieved successfully
data
objectrequired
state
objectrequired
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.
example:
{
"cursor": "2024-01-01T00:00:00Z"
}
{ "code": "Success", "message": "Connection state retrieved successfully", "data": { "state": { "cursor": "2024-01-01T00:00:00Z" } } }