For the complete documentation index, see llms.txt. This page is also available as Markdown.

UpdateUserEvents

Grant a user access to Events API events, or revoke it.

Only an Administrator can call this route, and it cannot be run as another user. The Self-Service API or the Flows module must be enabled.

Events are named as in the Events API, e.g. 'vulnerability-created'. Get Available Events lists every name that is accepted, and Get User Events lists the ones the user has now. A later operation on the same event wins. When the request adds an event, the user is given an API key if they have none.

Only access given to the user directly is changed. An event that one of their groups gives them stays available after it is removed here, until Update Group Events removes it from the group.

Headers

PATCH /api/ss/user/:id/events HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json

Request

Path Parameters

id - string | required

ID of the user. Must be a 24-character hexadecimal id.

Body

operations - list of objects | required

Delegations to grant or revoke. At least one operation is required.

  • events - list of strings | required

    • List of event names. At least one is required.

  • type - string | required

    • Must be either 'add' or 'remove'

Example

Request

Response

Access and failures

Errors are returned in error:

  • Unauthorized - the caller is not an Administrator.

  • User Not Found or Error Finding User - the user could not be found.

  • Unknown events: a, b - an event is not one of the Events API events. Nothing is applied.

  • Error Granting Events or Error Revoking Events - the change could not be saved. Events are granted before any are revoked, so a revoking error means the grants were applied.

Last updated