Skip to main content
POST
/
api
/
v1
/
actions
/
Create a new action
curl --request POST \
  --url https://services.pref.rio/heimdall-admin/api/v1/actions/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Read user information",
  "name": "user:read"
}'
{
  "id": 1,
  "name": "user:read",
  "description": "Read user information",
  "endpoint_count": 0
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request model for creating a new action.

name
string
required

Unique name for the action (lowercase letters, numbers, underscores, and colons only)

Required string length: 1 - 100
Example:

"user:read"

description
string
required

Human-readable description of the action's purpose

Required string length: 1 - 500
Example:

"Read user information"

Response

Action created successfully

Response model for action information.

id
integer
required

Unique identifier for the action

Example:

1

name
string
required

Action name

Example:

"user:read"

description
string | null

Action description

Example:

"Read user information"

endpoint_count
integer
default:0

Number of API endpoints mapped to this action

Example:

3