Roles

Create a custom policy for the caller's organization

The caller may only grant permissions they already hold in the organization the request is scoped to; a payload exceeding that is rejected with 403.

post/v1/roles/policies

Request

  • Base URL
    https://api.tetrascience.com
  • URL
    https://api.tetrascience.com/v1/roles/policies
  • Auth
    API key in header ts-auth-token and API key in header x-org-slug

Request body

namestring required
descriptionstring

Example request

{
  "permissions": [
    {
      "resource": "pipelines",
      "action": "edit"
    }
  ]
}

Response

Responding with the created policy

idId (unresolved $ref)
namestring
scopestring

One of the built-in PolicyScopes values, or, for a custom policy, <orgSlug>:<kebab-cased-name> assigned at creation and never changed.

descriptionstring
isCustomboolean

Whether this policy can be edited or deleted.

Changes

No recorded changes to this operation across all 1 revision of this API.