コンテンツにスキップ

Create logging policy snapshot draft

POST
/api/admin/logging-policies/drafts
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/admin/logging-policies/drafts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "scope_type": "tenant", "scope_id": "tenant_123" }'

Builds and stores a draft logging policy snapshot with diff and publish confirmation text.

Media type application/json
object
scope_type
string
Allowed values: platform tenant
scope_id
string
tenant_id
string
confirmation
string
expected_version
integer
key
additional properties
Example
{
"scope_type": "tenant",
"scope_id": "tenant_123"
}

Successful JSON response.

Media type application/json
object
item
required
object
key
additional properties
audit_id
One of:
string
version
integer
key
additional properties
Example
{
"item": {
"id": "snap_123",
"scope_type": "tenant",
"scope_id": "tenant_123",
"version": 4,
"status": "draft",
"policy_hash": "sha256:policy",
"diff": [],
"created_at": 1770000000000,
"confirmation": "PUBLISH LOGGING POLICY tenant:tenant_123"
},
"audit_id": "audit_123",
"version": 4
}

Error response.

Media type application/json
object
error
string
message
string
error_description
string
key
additional properties
Example generated
{
"error": "example",
"message": "example",
"error_description": "example"
}