v4

latestOpenAPI 3.1.02026-08-02261331761.5 KB
Role Assignments
Bulk Operations

Bulk create role assignments

post/v2/facts/{proj_id}/{env_id}/role_assignments/bulk

Path parameters

proj_idstring required

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

Either the unique id of the project, or the URL-friendly key of the project (i.e: the "slug").

env_idstring required

Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

Either the unique id of the environment, or the URL-friendly key of the environment (i.e: the "slug").

Query parameters

missing_user_policy'fail' | 'ignore' | 'create'

An enumeration.

Policy for missing users - 'fail': Fail the entire operation if a user is missing; 'ignore': Skip assignments for missing users; 'create': Create missing users and continue with the operation

Request body

rolestring required

the role that will be assigned (accepts either the role id or the role key)

tenantstring

the tenant the role is associated with (accepts either the tenant id or the tenant key)

resource_instancestring

the resource instance the role is associated with (accepts either the resource instance id or key using this format resource_type:resource_instance)The resource instance will be implicitly created if the tenant parameter is specified and the resource instance does not exist.

userstring required

the user the role will be assigned to (accepts either the user id or the user key)

Example request

[
  {
    "user": "jane@coolcompany.com",
    "role": "admin",
    "tenant": "stripe-inc"
  }
]

Response

Successful Response

assignments_createdinteger