Skip to main content

Create a role

This endpoint creates a new role with the given name.

If the Role exists already, no action will be taken.

Header Parameters
  • SlashID-OrgID string required

    The organization ID

    Example: af5fbd30-7ce7-4548-8b30-4cd59cb2aba1
  • SlashID-Required-Consistency string

    Possible values: [local_region, all_regions]

    Default value: local_region

    The consistency level required for this request. If the consistency level is not achieved within the timeout, the request will fail with a 408 Request Timeout error. 408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout. Allowed values: * local_region: Wait while the request executes in the local region. * all_regions: Wait while the request executes across all regions. You can learn more about our replication model on our Cross-region Replication Model page.

  • SlashID-Required-Consistency-Timeout integer

    Possible values: >= 1 and <= 120

    Default value: 30

    The maximum amount of seconds to wait for the requested consistency level to be achieved. If the consistency level is not achieved within this time, the request will fail with a 408 Request Timeout error. 408 Request Timeout error indicates that request was not handled within the timeout, but it may still be handled after request timeout. You can learn more about our replication model on our Cross-region Replication Model page.

Request Body required
  • name string required

    Possible values: <= 100 characters, Value must match regular expression ^[A-Za-z0-9]{1}[\w.\-:]*[A-Za-z0-9]$

    The Role name must be unique within your organization; is case-sensitive; and must conform to the following:

    • must be at least 2 characters long
    • may be at most 100 characters long
    • may contain only the characters A-Z a-z 0-9 - _ . :
    • must start and end with an alphanumeric character (A-Z a-z 0-9)

    Roles needs to have their name prefixed with {org_id}/. Organization ID is not counted to the length limit.

  • description string
  • permissions string[]

    Possible values: <= 1024 characters, Value must match regular expression ^[A-Za-z0-9]{1}[\w./\\\-:]*[A-Za-z0-9]$

Responses

No content