v4

latestOpenAPI 3.1.02026-08-02261331761.5 KB
Groups

Assign Role To Group

Assign a role to a group - It will create relation between the group and the resource, relationship between the resource instances and derivation from the member role to this role.

post/v2/schema/{proj_id}/{env_id}/groups/{group_instance_key}/roles

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").

group_instance_keystring required

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

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

Request body

rolestring required

The role key or id that will be assigned to the group.

resourcestring required

The resource key or id that the role belongs to.

resource_instancestring required

The resource instance key or id that the role belongs to.

tenantstring required

The tenant key or id that the role belongs to.

Example request

{
  "role": "admin",
  "resource": "rnd",
  "resource_instance": "backend",
  "tenant": "business"
}

Response

Successful Response

assigned_rolesstring[]

List of roles that are assigned to this group

usersstring[]

List of user ids that are assigned to this group

group_resource_type_keystring

The key of the resource type that the group belongs to.

group_instance_keystring required

Either the unique id of the resource instance that that the group belongs to, or the URL-friendly key of the <resource_key:resource_instance_key> (i.e: file:my_file)

group_tenantstring required

The tenant key or id that the group belongs to.

Example response

{
  "group_resource_type_key": "company",
  "group_instance_key": "Acme",
  "group_tenant": "business",
  "assigned_roles": [
    "rnd:backend#admin",
    "marketing:social_media#editor"
  ],
  "users": [
    "user_1",
    "user_2"
  ]
}