API Referenceadmin
Assign role to user
Assign a role to a user. Requires IAM admin. Cannot assign roles with hierarchy > your own.
AuthorizationBearer <token>
In: header
Path Parameters
user_id*User Id
User ID
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X post "https://prisma.your-company.com/api/v1/admin/role-assignments/497f6eca-6276-4993-bfeb-53cbbbba6f08/roles" \ -H "Content-Type: application/json" \ -d '{ "role_name": "developer", "scope_id": "550e8400-e29b-41d4-a716-446655440000", "scope_type": "workspace" }'{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"user_id": "a169451c-8525-4352-b8ca-070dd449a1a5",
"role_name": "string",
"scope_type": "string",
"scope_id": "5d3fe357-12dd-4f62-b004-6d1fb3b8454f",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6",
"created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
"created_at": "2019-08-24T14:15:22Z",
"joined_at": "2019-08-24T14:15:22Z"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string"
}
]
}
