Connections

Overview

GET /connections

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.

Request Details

Headers

HeaderTypeRequiredDescription
x-api-keyStringYesAPI key used to authenticate and authorize the API request
Connection-IdUUIDOptionalSpecifies a particular connection to query (used for filtered responses)

Query Parameters

ParameterTypeRequiredDescription
limitIntegerOptionalNumber of results to return per page. Defaults to 50
cursorStringOptionalPagination cursor for the next page of results

Response Schema

{
  "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"
}

Response Field Explanations

Top-Level Fields

  • status: Integer code indicating the request status (200 means success)
  • message: A success message or additional details
  • next: Pagination cursor for retrieving the next page of results

Connection Object Fields

  • 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

Health Status Details

Status CodeDescriptionRecommended Action
1HealthyNo action required
2WarningMonitor and investigate
3UnavailableImmediate investigation needed
4DegradedUrgent intervention required

Example Request

cURL

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

Common Use Cases

  • Auditing connected telematics providers
  • Monitoring integration health
  • Troubleshooting data synchronization issues

Best Practices

  • Regularly check connection health status
  • Use pagination to manage large numbers of connections
  • Store and rotate API keys securely