Aller au contenu principal

Developer access tokens

All paths below use https://api.lordbase.com. Read conventions for headers, authentication, pagination and error handling. Values in responses are illustrative; examples show selected fields, not fixed quotas or service guarantees.

Developer tokens authorize only explicitly supported operations. Required scopes appear below; account, billing and token-management operations require a dashboard session. See token permissions.

List or create developer access tokens — GET​

GET /e/v1/developer/access-tokens/

Authentication: Dashboard session required; developer tokens are denied, including api tokens. An active Lordbase subscription is required.

Request and permissions: Own developer account through the signed-in dashboard; no body. Raw token values are hidden. available_scopes lists the enforced automation scopes.

Response: 200

{
"tokens": [],
"available_scopes": [
{
"value": "read_workspaces",
"label": "Read workspace data"
}
],
"count": 0
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.

List or create developer access tokens — POST​

POST /e/v1/developer/access-tokens/

Authentication: Dashboard session required; developer tokens are denied, including api tokens. An active Lordbase subscription is required.

Request and permissions: Signed-in dashboard only. Required JSON name string and non-empty scopes array. Accepted: api, read_workspaces, write_workspaces, read_databases, write_databases, read_backups, write_backups. Optional expires_in_days integer from 1 to 365, default 30. Raw token is shown once. Tokens cannot issue other tokens.

Field reference: DeveloperAccessToken. The operation above defines which fields to send.

Example JSON body:

{
"name": "Example automation",
"scopes": [
"read_workspaces"
],
"expires_in_days": 7
}

Response: 201

{
"id": "11111111-1111-4111-8111-111111111111",
"name": "Example automation",
"token": "lb_pat_EXAMPLE_ONLY",
"scope_list": [
"read_workspaces"
],
"is_active": true
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.

Read or revoke a token — GET​

GET /e/v1/developer/access-tokens/{token_id}/

Authentication: Dashboard session required; developer tokens are denied, including api tokens. An active Lordbase subscription is required.

Request and permissions: Token owner only; no body. Returns metadata without the raw token.

Required path parameters: token_id (UUID).

Response: 200

{
"id": "11111111-1111-4111-8111-111111111111",
"name": "Example automation",
"scope_list": [
"read_workspaces"
],
"is_active": true
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.

Read or revoke a token — DELETE​

DELETE /e/v1/developer/access-tokens/{token_id}/

Authentication: Dashboard session required; developer tokens are denied, including api tokens. An active Lordbase subscription is required.

Request and permissions: Signed-in token owner only; no body. Revokes the credential and hides the entry while retaining its record; HTTP 204 has no response body.

Required path parameters: token_id (UUID).

Response: 204

Empty body. Do not parse JSON for this response.

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.

Explicitly revoke a token — POST​

POST /e/v1/developer/access-tokens/{token_id}/revoke/

Authentication: Dashboard session required; developer tokens are denied, including api tokens. An active Lordbase subscription is required.

Request and permissions: Signed-in token owner only; no body. Revocation is immediate for subsequent requests. Repeated revocation returns 200.

Required path parameters: token_id (UUID).

Response: 200

{
"message": "Token \"Example automation\" has been revoked"
}

Failures: Common API errors, plus the validation, role, state, engine and plan restrictions stated above.