API

Client

The clients that can act as an agent: CLI and OAuth sign-ins, and tokens once they have been used.

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
GET /agents/{id}/clients list The clients

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

client_s, err := client.Client(nil).List(map[string]any{"agent_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(client_s)

Lua

Construct client as shown in the Lua setup, then call the operations:

local client_s, err = client:Client():list({ agent_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$client_s = $client->Client()->list(["agent_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

client_s = client.Client().list({"agent_id": "example"})

Ruby

Construct client as shown in the Ruby setup, then call the operations:

client_s = client.Client.list({ "agent_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const client_s = await client.Client().list({ agent_id: "example" })

Fields

Field Type Required Description
createdAt string Yes Created At
id string Yes The credential identifying this client
lastUsedAt any Yes Last Used At
name string Yes The recorded client or device name, or the name of a manually created token

list

GET /agents/{id}/clients

Operation ID: listClients.

Authentication: bearer token (token) or oauth2 (oauth).

Parameters

Parameter In Type Required Description
id path string Yes The agent's id

Responses

200: The clients

application/json

Property Type Required Description
[].createdAt string (date-time) Yes
[].id string (uuid) Yes The credential identifying this client
[].lastUsedAt string (date-time) or null Yes
[].name string Yes The recorded client or device name, or the name of a manually created token
4XX: The request failed; the error says why

application/json

Property Type Required Description
error object Yes
error.code enum: invalid_input, unauthorized, forbidden, plan_limit, not_found, conflict, ... Yes
error.message string Yes
5XX: The request failed; the error says why

application/json

Property Type Required Description
error object Yes
error.code enum: invalid_input, unauthorized, forbidden, plan_limit, not_found, conflict, ... Yes
error.message string Yes