Skip to main content
PUT
/
api
/
v1
/
mappings
/
{mapping_id}
Update endpoint mapping
curl --request PUT \
  --url https://services.pref.rio/heimdall-admin/api/v1/mappings/{mapping_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "Get detailed user profile information",
  "path_pattern": "/api/v1/users/{user_id}/profile"
}'
{
  "id": 1,
  "path_pattern": "/api/v1/users/{user_id}/profile",
  "method": "GET",
  "action": "user:read",
  "description": "Get detailed user profile information",
  "created_by": "12345678901",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-16T14:20:00Z"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

mapping_id
integer
required

Body

application/json

Request model for updating an existing endpoint-to-action mapping.

path_pattern
string | null

Updated URL path pattern

Required string length: 1 - 255
Example:

"/api/v1/users/{user_id}"

method
string | null

Updated HTTP method

Example:

"GET"

action_id
integer | null

Updated action ID

Required range: x > 0
Example:

2

description
string | null

Updated description

Maximum length: 500
Example:

"Get detailed user profile information"

Response

Mapping updated successfully

Detailed response model for mapping information.

id
integer
required

Unique identifier of the mapping

Example:

1

path_pattern
string
required

URL path pattern

Example:

"/api/v1/users/{user_id}"

method
string
required

HTTP method

Example:

"GET"

action
string
required

Action name

Example:

"user:read"

created_at
string
required

ISO timestamp when the mapping was created

Example:

"2024-01-15T10:30:00Z"

description
string | null

Mapping description

Example:

"Get user profile information"

created_by
string | null

CPF of the user who created this mapping

Example:

"12345678901"

updated_at
string | null

ISO timestamp when the mapping was last updated

Example:

"2024-01-16T14:20:00Z"