Skip to content

ulams tokens

Generated from front/cli (ulams schema)

Agent audit log.

Kind: read (idempotent). Stability: stable. MCP tool: tokens_agent_audit. Scopes: learner:read.

Endpoints: GET /api/admin/agent-audit.

Flag Type Required Description
--token-id string
--user-id integer
--from string
--to string
Terminal window
# Agent audit log
ulams tokens agent-audit --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"token_id": {
"type": "string"
},
"user_id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"from": {
"type": "string"
},
"to": {
"type": "string"
}
},
"additionalProperties": {}
}

Audit log of one token.

Kind: read (idempotent). Stability: stable. MCP tool: tokens_audit. Scopes: learner:read.

Endpoints: GET /api/admin/tokens/{id}/audit.

Flag Type Required Description
--id (positional) string yes
Terminal window
# Audit log of one token
ulams tokens audit text --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": {}
}

Create a scoped personal access token (shown once).

Kind: write. Stability: stable. MCP tool: tokens_create. Scopes: learner:write.

Endpoints: POST /api/auth/tokens.

Flag Type Required Description
--agent-name string
--expires-in-days integer
--kind string
--name string yes
--rate-limit-per-minute integer
--scopes array yes Scopes or @presets (read-only, author, admin, learner, ci)
Terminal window
# A CI token that can edit courses and run the builder, for 30 days
ulams tokens create --name ci --scopes @ci --expires-in-days 30 --kind ci --json
# A read-only token for an agent
ulams tokens create --name reader --scopes @read-only --kind agent --agent-name claude-code --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"agent_name": {
"type": [
"string",
"null"
]
},
"expires_in_days": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"enum": [
"cli",
"agent",
"ci",
"integration"
]
},
"name": {
"type": "string"
},
"rate_limit_per_minute": {
"anyOf": [
{
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
{
"type": "null"
}
]
},
"scopes": {
"type": "array",
"items": {
"type": "string"
},
"description": "Scopes or @presets (read-only, author, admin, learner, ci)"
}
},
"required": [
"name",
"scopes"
],
"additionalProperties": {}
}

The token this request is authenticated with.

Kind: read (idempotent). Stability: stable. MCP tool: tokens_current. Scopes: learner:read.

Endpoints: GET /api/auth/tokens/current.

Terminal window
# The token this request is authenticated with
ulams tokens current --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {},
"additionalProperties": {}
}

My scoped API tokens.

Kind: read (idempotent). Stability: stable. MCP tool: tokens_list. Scopes: learner:read.

Endpoints: GET /api/auth/tokens.

Flag Type Required Description
--include-revoked boolean
Terminal window
# My scoped API tokens
ulams tokens list --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"include_revoked": {
"type": "boolean"
}
},
"additionalProperties": {}
}

Every user’s scoped API tokens.

Kind: read (idempotent). Stability: stable. MCP tool: tokens_list_all. Scopes: learner:read.

Endpoints: GET /api/admin/tokens.

Flag Type Required Description
--user-id integer
--kind string
--include-revoked boolean
--per-page integer
Terminal window
# Every user's scoped API tokens
ulams tokens list-all --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"user_id": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
},
"kind": {
"type": "string",
"enum": [
"cli",
"agent",
"ci",
"integration"
]
},
"include_revoked": {
"type": "boolean"
},
"per_page": {
"type": "integer",
"minimum": -9007199254740991,
"maximum": 9007199254740991
}
},
"additionalProperties": {}
}

Revoke one of my scoped tokens.

Kind: destructive (idempotent). Stability: stable. MCP tool: tokens_revoke. Scopes: learner:write.

Endpoints: DELETE /api/auth/tokens/{id}.

Flag Type Required Description
--id (positional) string yes
Terminal window
# Revoke one of my scoped tokens
ulams tokens revoke text --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": {}
}

Revoke any scoped token.

Kind: destructive (idempotent). Stability: stable. MCP tool: tokens_revoke_any. Scopes: learner:write.

Endpoints: DELETE /api/admin/tokens/{id}.

Flag Type Required Description
--id (positional) string yes
Terminal window
# Revoke any scoped token
ulams tokens revoke-any text --json
Input JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"id": {
"type": "string"
}
},
"required": [
"id"
],
"additionalProperties": {}
}