List Events
GET/v1/events
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
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/events" \ -H "Authorization: Bearer $AZIMO_API_KEY"
List Webhooks
GET/v1/webhooks
需要 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[].project_id必填 | string | 可为 null |
data[].kind必填 | string | |
data[].name必填 | string | |
data[].version必填 | integer | |
data[].created_at必填 | number | |
data[].updated_at必填 | number | |
data[].data必填 | object | |
data[].data.name必填 | string | |
data[].data.url必填 | string | |
data[].data.active | boolean | 默认 true |
data[].data.has_secret必填 | boolean | |
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/webhooks" \ -H "Authorization: Bearer $AZIMO_API_KEY"
Create Webhook
POST/v1/webhooks
需要 API Key成功 201
参数
| 名称 | 类型 | 说明 |
|---|---|---|
Idempotency-Keyheader | string | 调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次; 长度 1–128; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
请求体 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
name | string | 默认 Webhook; 长度 ≤ 160 |
url必填 | string | 长度 ≤ 2000 |
active | boolean | 默认 true |
返回 201 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
project_id必填 | string | 可为 null |
kind必填 | string | |
name必填 | string | |
version必填 | integer | |
created_at必填 | number | |
updated_at必填 | number | |
data必填 | object | |
data.name必填 | string | |
data.url必填 | string | |
data.active | boolean | 默认 true |
data.has_secret必填 | boolean | |
signing_secret必填 | string | Shown at creation/rotation and for the same actor's idempotent retry within 24 hours; 可为 null |
示例
curl -X POST "https://axiomlab.online/v1/webhooks" \
-H "Authorization: Bearer $AZIMO_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"url": "<url>"}'Rotate Webhook Secret
POST/v1/webhooks/{webhook_id}/rotate-secret
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
webhook_id必填path | string | |
expected_version必填query | integer | 范围 ≥ 1 |
Idempotency-Keyheader | string | 调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次; 长度 1–128; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
project_id必填 | string | 可为 null |
kind必填 | string | |
name必填 | string | |
version必填 | integer | |
created_at必填 | number | |
updated_at必填 | number | |
data必填 | object | |
data.name必填 | string | |
data.url必填 | string | |
data.active | boolean | 默认 true |
data.has_secret必填 | boolean | |
signing_secret必填 | string | Shown at creation/rotation and for the same actor's idempotent retry within 24 hours; 可为 null |
示例
curl -X POST "https://axiomlab.online/v1/webhooks/<webhook_id>/rotate-secret?expected_version=<expected_version>" \ -H "Authorization: Bearer $AZIMO_API_KEY" \ -H "Idempotency-Key: $(uuidgen)"
Update Webhook
PUT/v1/webhooks/{webhook_id}
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
webhook_id必填path | string | |
expected_version必填query | integer | 范围 ≥ 1 |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
请求体 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
name | string | 默认 Webhook; 长度 ≤ 160 |
url必填 | string | 长度 ≤ 2000 |
active | boolean | 默认 true |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
project_id必填 | string | 可为 null |
kind必填 | string | |
name必填 | string | |
version必填 | integer | |
created_at必填 | number | |
updated_at必填 | number | |
data必填 | object | |
data.name必填 | string | |
data.url必填 | string | |
data.active | boolean | 默认 true |
data.has_secret必填 | boolean |
示例
curl -X PUT "https://axiomlab.online/v1/webhooks/<webhook_id>?expected_version=<expected_version>" \
-H "Authorization: Bearer $AZIMO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "<url>"}'Delete Webhook
DELETE/v1/webhooks/{webhook_id}
需要 API Key成功 200
参数
| 名称 | 类型 | 说明 |
|---|---|---|
webhook_id必填path | string | |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 200 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
deleted | boolean | 默认 true |
示例
curl -X DELETE "https://axiomlab.online/v1/webhooks/<webhook_id>" \ -H "Authorization: Bearer $AZIMO_API_KEY"
List Deliveries
GET/v1/webhook-deliveries
需要 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[].event_id必填 | string | |
data[].url必填 | string | |
data[].status必填 | string | |
data[].attempts必填 | integer | |
data[].last_error必填 | string | 可为 null |
data[].delivered_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/webhook-deliveries" \ -H "Authorization: Bearer $AZIMO_API_KEY"
Replay
POST/v1/webhook-deliveries/{delivery_id}/replay
需要 API Key成功 202
参数
| 名称 | 类型 | 说明 |
|---|---|---|
delivery_id必填path | string | |
webhook_idquery | string | 长度 ≤ 32; 可为 null |
Idempotency-Keyheader | string | 调用方生成并保存的唯一值;超时重试时复用它,同一请求不会被执行两次; 长度 1–128; 可为 null |
X-Project-IDheader | string | 要操作的项目;省略时使用默认项目; 可为 null |
返回 202 application/json
| 名称 | 类型 | 说明 |
|---|---|---|
id必填 | string | |
status必填 | string | 可选值:pending |
示例
curl -X POST "https://axiomlab.online/v1/webhook-deliveries/<delivery_id>/replay" \ -H "Authorization: Bearer $AZIMO_API_KEY" \ -H "Idempotency-Key: $(uuidgen)"