Robots Center Agents Network
Log in Create workspace
Skip to content

API reference

Operator - API Credentials

One tag: method, path, summary, auth, and scopes. Request and response fields ship in this page — expand a row to read the contract.

Endpoints

6
GET
/api/v1/operator/service_agents/:service_agent_id/credentials Web Session

List service agent credentials

Description

Returns all API credentials for a service agent.

Auth

Web Session
Parameters
Name In Type Required Description
service_agent_id path string Yes Service agent UUID
Responses
200

List of credentials

Returns: ApiCredentialList

Example
{
  "api_credentials": [
    {
      "id": "b3ec0b4e-64be-44f3-a5f6-e6f54c8bf190",
      "inserted_at": "2026-02-15T10:00:00Z",
      "last_used_at": "2026-03-27T09:12:10Z",
      "name": "Production API key",
      "prefix": "agk_prod",
      "scopes": [
        "traces:write",
        "gateway:check"
      ],
      "service_agent_id": "f4d49601-3477-4c9d-b896-ac08a26a3147",
      "updated_at": "2026-03-27T09:12:10Z"
    }
  ]
}
POST
/api/v1/operator/service_agents/:service_agent_id/credentials Web Session

Create API credential

Description

Creates a new API credential for a service agent.

Auth

Web Session
Request Body
Field Type Required Description
api_credential object Yes API credential attributes
api_credential.name string Yes Credential name
api_credential.expires_at datetime (ISO 8601) No Optional expiration date
api_credential.scopes array<object> Yes List of scopes to grant
Parameters
Name In Type Required Description
service_agent_id path string Yes Service agent UUID
Responses
201

Credential created (secret shown once)

Returns: ApiCredentialWithSecret

Example
{
  "id": "b3ec0b4e-64be-44f3-a5f6-e6f54c8bf190",
  "inserted_at": "2026-02-15T10:00:00Z",
  "last_used_at": "2026-03-27T09:12:10Z",
  "name": "Production API key",
  "prefix": "agk_prod",
  "scopes": [
    "traces:write",
    "gateway:check"
  ],
  "secret": "agk_prod_xY7kM2pL9vN4qR1wT5jH8mB3",
  "service_agent_id": "f4d49601-3477-4c9d-b896-ac08a26a3147",
  "updated_at": "2026-03-27T09:12:10Z"
}
404

Service agent not found

GET
/api/v1/operator/credentials/:id Web Session

Get credential details

Description

Returns details of an API credential (without the secret).

Auth

Web Session
Parameters
Name In Type Required Description
id path string Yes Credential UUID
Responses
200

Credential details

Returns: ApiCredential

Example
{
  "id": "b3ec0b4e-64be-44f3-a5f6-e6f54c8bf190",
  "inserted_at": "2026-02-15T10:00:00Z",
  "last_used_at": "2026-03-27T09:12:10Z",
  "name": "Production API key",
  "prefix": "agk_prod",
  "scopes": [
    "traces:write",
    "gateway:check"
  ],
  "service_agent_id": "f4d49601-3477-4c9d-b896-ac08a26a3147",
  "updated_at": "2026-03-27T09:12:10Z"
}
404

Credential not found

PATCH
/api/v1/operator/credentials/:id Web Session

Update credential

Description

Updates an API credential's settings.

Auth

Web Session
Request Body
Field Type Required Description
api_credential object Yes API credential attributes to update
api_credential.name string No Credential name
Parameters
Name In Type Required Description
id path string Yes Credential UUID
Responses
200

Credential updated

Returns: ApiCredential

Example
{
  "id": "b3ec0b4e-64be-44f3-a5f6-e6f54c8bf190",
  "inserted_at": "2026-02-15T10:00:00Z",
  "last_used_at": "2026-03-27T09:12:10Z",
  "name": "Production API key",
  "prefix": "agk_prod",
  "scopes": [
    "traces:write",
    "gateway:check"
  ],
  "service_agent_id": "f4d49601-3477-4c9d-b896-ac08a26a3147",
  "updated_at": "2026-03-27T09:12:10Z"
}
404

Credential not found

POST
/api/v1/operator/credentials/:id/rotate Web Session

Rotate credential secret

Description

Rotates an API credential's secret. The new secret is shown once.

Auth

Web Session
Parameters
Name In Type Required Description
id path string Yes Credential UUID
Responses
201

Secret rotated (new secret shown once)

Returns: ApiCredentialWithSecret

Example
{
  "id": "b3ec0b4e-64be-44f3-a5f6-e6f54c8bf190",
  "inserted_at": "2026-02-15T10:00:00Z",
  "last_used_at": "2026-03-27T09:12:10Z",
  "name": "Production API key",
  "prefix": "agk_prod",
  "scopes": [
    "traces:write",
    "gateway:check"
  ],
  "secret": "agk_prod_kP3mN7wQ2vR9xT4jL8hB1cY5",
  "service_agent_id": "f4d49601-3477-4c9d-b896-ac08a26a3147",
  "updated_at": "2026-03-27T09:12:10Z"
}
404

Credential not found

DELETE
/api/v1/operator/credentials/:id Web Session

Revoke credential

Description

Revokes an API credential permanently.

Auth

Web Session
Parameters
Name In Type Required Description
id path string Yes Credential UUID
Responses
204

Credential revoked

404

Credential not found