Access control lists acls
Rule sets that allow or block requests by IP/CIDR and other conditions; the platform provides built-in rules and tenants can create their own.
Pick an endpoint to see its example call on the right.
Authentication
Send the X-API-Key header (create a key on the API Keys page; the key is shown only once at creation). An Authorization: Bearer token obtained by logging in also works.
X-API-Key
Authentication failures return 401; forbidden returns 403 (code such as insufficient_scope).
Conventions
Paging uses page (from 1) and page_size; sort with sort=field or sort=-field.
Times are RFC 3339 (UTC); amounts are in cents.
Writes return 200/201/204 on success; duplicates of a unique key return 409.
/api/v2/aclsList ACLs
Authentication: User (some parameters admin only)
Query parameters
| Field | Type | Description |
|---|---|---|
page | integer | Page number, starting from 1 |
page_size | integer | Items per page |
sort | string | Sort fields, comma-separated; prefix `-` for descending, e.g. `-created_at,id` |
tenant_id | integer | Admin only: filter by tenant (a malformed value returns 422). Ignored for tenant credentials, which only see their own tenant's data |
tenant_ids | string | Admin only: only these tenants, comma-separated positive integers, at most 200 after deduplication (more, or a malformed value, returns 422); a single ID works too. Filters only and does not switch the request scope; combined with tenant_id and other filters as an intersection. A tenant credential sending a non-empty value gets 403 |
enabled | boolean | Filter by enabled state. |
name | string | Filter by name substring. |
owner | string | platform = platform objects only; tenant = tenant objects only. |
/api/v2/aclsCreate ACL
Authentication: User (some parameters admin only)
Request body application/json
| Field | Type | Description |
|---|---|---|
default_actionRequired | string | Action when no rule matches. |
des | string | Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object). |
enabled | boolean | Whether enabled |
nameRequired | string | Name |
rulesRequired | AclRule[] | Matched in order; the count is limited by the setting protect.acl_rules_max. |
tenant_id | integer | Owning tenant; null = platform object (built-in or created by an admin, read-only for tenants). |
/api/v2/acls/batch-enableBatch enable or disable ACLs
Authentication: User (some parameters admin only)
Request body application/json
| Field | Type | Description |
|---|---|---|
enabledRequired | boolean | Whether enabled |
idsRequired | integer[] | IDs of the objects to change, at most 100. |
/api/v2/acls/{id}Get ACL
Authentication: User (some parameters admin only)
/api/v2/acls/{id}Update ACL
Authentication: User (some parameters admin only)
Request body application/json
| Field | Type | Description |
|---|---|---|
default_actionRequired | string | Action when no rule matches. |
des | string | Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object). |
enabled | boolean | Whether enabled |
nameRequired | string | Name |
rulesRequired | AclRule[] | Matched in order; the count is limited by the setting protect.acl_rules_max. |
tenant_id | integer | Owning tenant; null = platform object (built-in or created by an admin, read-only for tenants). |
/api/v2/acls/{id}Delete ACL
Authentication: User (some parameters admin only)
Access control lists object
| Field | Type | Description |
|---|---|---|
builtin | boolean | Built-in object; cannot be deleted. |
created_at | string | Created at |
default_action | string | Action when no rule matches. |
des | string | Remark; empty if omitted (omitting it on update also clears it, since the update replaces the whole object). |
enabled | boolean | Whether enabled |
errors | FieldError[] | Why each remaining item was not changed; field is /ids/<index>, code as in the single-item update (not_found, readonly and so on). |
id | integer | Record ID |
idsRequired | integer[] | IDs of the objects to change, at most 100. |
name | string | Name |
rules | AclRule[] | Matched in order; the count is limited by the setting protect.acl_rules_max. |
tenant_id | integer | Owning tenant; null = platform object (built-in or created by an admin, read-only for tenants). |
updated | integer[] | IDs that were set (including those already in the target state), in request order. |
updated_at | string | Updated at |
Responses and errors
Success returns the resource JSON directly (HTTP 2xx); failures return application/problem+json (code, detail, plus errors on validation failures); lists carry items + total.
{
"id": 1,
"name": "example"
}{
"items": [
{
"id": 1
}
],
"page": 1,
"page_size": 20,
"total": 1
}{
"code": "validation_failed",
"detail": "Invalid request parameters",
"errors": [
{
"code": "required",
"field": "/name",
"message": "name is required"
}
],
"request_id": "0123456789abcdef",
"status": 422,
"title": "Unprocessable Entity",
"type": "about:blank"
}