Skip to main content
GET
/
connections
JavaScript
import Cerca from '@cerca-dev/sdk';

const client = new Cerca({
  apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const connection of client.connections.list({ ownerType: 'fleet' })) {
  console.log(connection.id);
}
{
  "connections": [
    {
      "accountLabel": "<string>",
      "createdAt": "<string>",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "owner": {},
      "scopes": [
        "<string>"
      ],
      "updatedAt": "<string>"
    }
  ],
  "cursor": "<string>",
  "hasMore": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

ownerType
enum<string>
required

Public connection owner type.

Available options:
organization,
fleet
Example:

"fleet"

fleetId
string

Required when ownerType is fleet.

Example:

"fleet_abc123"

cursor
string

Opaque pagination cursor returned by a previous request.

Example:

"cursor_abc123"

limit
string

Maximum number of items to return. Defaults to 20 and preserves parseInt semantics.

Example:

"20"

Response

Reusable connections for the requested owner.

connections
object[]
required
cursor
string | null
required
hasMore
boolean
required