List Projects
GET/v1/projects
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
limitquery | integer | 默认 50; 范围 1–200 |
cursorquery | string | 长度 ≤ 256; 可为 null |
afterquery | string | 长度 ≤ 256; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
data必填 | array<object> | |
data[].id必填 | string | |
data[].organization_id必填 | string | |
data[].name必填 | string | |
data[].created_at必填 | number | |
next_cursor | string | Opaque; pass as cursor (or the after alias) for the next page; 可为 null |
has_more | boolean | 默认 false |
示例
curl "https://axiomlab.online/v1/projects" \ -H "Authorization: Bearer $AZIMO_API_KEY"
Create Project
POST/v1/projects
需要 API Key成功 201
参数
| 名称 | 类型 | 说明 |
|---|---|---|
Idempotency-Keyheader | string | 调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次; 长度 1–128; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
请求体 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
name必填 | string | 长度 1–120 |
返回 201 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
organization_id必填 | string | |
name必填 | string | |
created_at必填 | number |
示例
curl -X POST "https://axiomlab.online/v1/projects" \
-H "Authorization: Bearer $AZIMO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name": "<name>"}'Delete Project
DELETE/v1/projects/{project_id}
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
project_id必填path | string | |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
deleted | boolean | 默认 true |
示例
curl -X DELETE "https://axiomlab.online/v1/projects/<project_id>" \ -H "Authorization: Bearer $AZIMO_API_KEY"
List Keys
GET/v1/api-keys
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
limitquery | integer | 默认 50; 范围 1–200 |
cursorquery | string | 长度 ≤ 256; 可为 null |
afterquery | string | 长度 ≤ 256; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
data必填 | array<object> | |
data[].id必填 | string | |
data[].name必填 | string | Label given at creation (also returned as owner) |
data[].owner必填 | string | |
data[].prefix必填 | string | 可为 null |
data[].organization_id必填 | string | 可为 null |
data[].project_id | string | Set when the key is bound to one project; 可为 null |
data[].role必填 | string | 可选值:owner editor viewer |
data[].active必填 | boolean | |
data[].created_at必填 | number | 可为 null |
data[].last_used_at | number | 可为 null |
data[].expires_at | number | 可为 null |
data[].revoked_at | number | 可为 null |
next_cursor | string | Opaque; pass as cursor (or the after alias) for the next page; 可为 null |
has_more | boolean | 默认 false |
示例
curl "https://axiomlab.online/v1/api-keys" \ -H "Authorization: Bearer $AZIMO_API_KEY"
Create Key
POST/v1/api-keys
需要 API Key成功 201
参数
| 名称 | 类型 | 说明 |
|---|---|---|
Idempotency-Keyheader | string | 调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次; 长度 1–128; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
请求体 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
name必填 | string | 长度 1–120 |
role | string | 可选值:owner editor viewer; 默认 editor |
project_id | string | 可为 null |
monthly_budget_usd | number | 范围 ≥ 0; 可为 null |
rate_per_hour | integer | 范围 ≥ 1; 可为 null |
返回 201 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
name必填 | string | Label given at creation (also returned as owner) |
owner必填 | string | |
prefix必填 | string | 可为 null |
organization_id必填 | string | 可为 null |
project_id | string | Set when the key is bound to one project; 可为 null |
role必填 | string | 可选值:owner editor viewer |
active必填 | boolean | |
created_at必填 | number | 可为 null |
last_used_at | number | 可为 null |
expires_at | number | 可为 null |
revoked_at | number | 可为 null |
key必填 | string | The bearer secret; shown once (an idempotent replay returns the same value) |
示例
curl -X POST "https://axiomlab.online/v1/api-keys" \
-H "Authorization: Bearer $AZIMO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"name": "<name>"}'Rotate Key
POST/v1/api-keys/{key_id}/rotate
需要 API Key成功 200
The old secret dies at once, or after grace_seconds so running fleets can switch without downtime.
参数
| 名称 | 类型 | 说明 |
|---|---|---|
key_id必填path | string | |
grace_secondsquery | integer | 默认 0; 范围 0–604800 |
Idempotency-Keyheader | string | 调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次; 长度 1–128; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
key必填 | string | |
previous_id必填 | string | |
previous_expires_in必填 | integer | 可为 null |
示例
curl -X POST "https://axiomlab.online/v1/api-keys/<key_id>/rotate" \ -H "Authorization: Bearer $AZIMO_API_KEY" \ -H "Idempotency-Key: $(uuidgen)"
Revoke Key
DELETE/v1/api-keys/{key_id}
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
key_id必填path | string | |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
active | boolean | 默认 false |
示例
curl -X DELETE "https://axiomlab.online/v1/api-keys/<key_id>" \ -H "Authorization: Bearer $AZIMO_API_KEY"
Audit Log
GET/v1/audit
需要 API Key成功 200
Identity and configuration changes for this organization (keys, projects, webhooks), oldest first from after.
参数
| 名称 | 类型 | 说明 |
|---|---|---|
afterquery | integer | 默认 0; 范围 ≥ 0 |
limitquery | integer | 默认 50; 范围 1–200 |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
data必填 | array<object> | |
data[].id必填 | string | |
data[].sequence必填 | integer | |
data[].type必填 | string | |
data[].created_at必填 | number | |
data[].api_version必填 | string | |
data[].project_id必填 | string | 可为 null |
data[].data必填 | object | |
next_cursor必填 | integer | Sequence number to pass as after; unchanged when the page is empty |
has_more | boolean | 默认 false |
示例
curl "https://axiomlab.online/v1/audit" \ -H "Authorization: Bearer $AZIMO_API_KEY"