Connections

Endpoint:

GET /connections

Description:

Retrieve a paginated list of all connections configured within your account. Each connection contains information about the provider, health status, and integration details, enabling you to monitor and manage integrations effectively.

Headers

HeaderTypeDescription
x-api-keyStringAPI key used to authenticate and authorize the API request.
Connection-Id (Optional)UUIDSpecifies a particular connection to query (used for filtered responses).

Query Parameters

ParameterTypeDescription
limitInteger(Optional) Number of results to return per page. Defaults to 50.
cursorString(Optional) Pagination cursor for the next page of results.

Response

{
  "status": 200,
  "message": "Success",
  "data": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Fleet Management Connection 1",
      "providerId": "456e1234-e89b-12d3-a456-426614174111",
      "healthStatus": 1,
      "createdAt": "2024-10-13T15:28:33.692Z"
    }
  ],
  "next": "eyJvZmZzZXQiOjEwMH0"
}

Explanation of the Response

  • status: Integer code indicating the request status (200 means success).
  • message: A success message or additional details.
  • data: Contains an array of connection objects:
    • id: Unique ID of the connection that helps in managing multiple connections.
    • name: Optional, human-readable name of the connection.
    • providerId: ID representing the data provider for the connection.
    • healthStatus: Represents the health of the connection:
      • 1: Healthy
      • 2: Warning (requires attention)
      • 3: Unavailable (not functioning as expected)
      • 4: Degraded (partially functioning but requires urgent intervention)
    • createdAt: Timestamp of when the connection was created, useful for auditing and troubleshooting.
  • next: Pagination cursor for retrieving the next page of results. If absent, there are no additional pages.

🔄 Example Request Using cURL:

curl --request GET \
  --url "https://api.analytics.autos/connections?limit=50&cursor=eyJvZmZzZXQiOjEwMH0" \
  --header 'x-api-key: YOUR-API-KEY'