Skip to main content
POST
Create a new role

Authorizations

Authorization
string
header
required

The primary authentication method for the Mezmo API.

Pass the key in the Authorization header in the format Token <ACCESS TOKEN>. For example:

This key is used for all APIs with the exception of ingest.

Body

application/json

Roles represent a set of permissions to resources which applying to a user or an access token

Roles represent a set of permissions to resources which applying to a user or an access token

name
string
required

A user friendly name for a specific role.

Required string length: 2 - 128
Example:

"Support"

roles
string[]
required
Maximum array length: 25

A parent role id which permissions will be inherited

Maximum string length: 24
Example:
permissions
Permission list to be specified in requests body · object

Permissions represent the set of resources a particular entity has access to.

Example:
context_filter
string[]

Users belonging to this role will have the queries found in this field applied as additional filters to search queries they perform to constrain the data they have access to.

Maximum array length: 25

Search query to be applied as additional pre-filters when searching logs

Maximum string length: 500
Example:

Response

Response format containing the newly created role, in addition to the standard metadata object.

Response format containing the newly created role, in addition to the standard metadata object.

meta
object
required

Contains additional contextual information about the api response.

data
Role · object
required

Roles represent a set of permissions to resources which applying to a user or an access token