Skip to content

Update a security entity relationship

POST
/api/security/update/{id}
curl --request POST \
--url https://example.com/api/security/update/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "users", "field": "groups", "action": "add", "data": [ "example" ] }'

Adds or removes a related entity (users, groups, roles) on a security entity. Updates both sides of the relationship.

id
required

Entity ID

string
Media typeapplication/json
object
type
required

Entity type being mutated

string
Example
users
field
required

Property being modified

string
Example
groups
action
required

Mutation action

string
Example
add
data
required
Any of:
string

Update result message

Media typeapplication/json
string
Examplegenerated
example

Access denied

Media typeapplication/json
object
error
required

Indicates an error occurred

boolean
message
required

Error message describing what went wrong

string
Example
{
"error": true,
"message": "Item not found"
}