[{"label":"Latest (v1.0)","version":"latest"}]
csp
Update User Roles By User ID And Organization ID
DescriptionUpdate service and organization roles of a user in the organization
Access Policy
Role | User Accounts | Service Accounts (Client Credentials Applications) |
---|---|---|
Organization Admin | ✔️ | ✔️ |
Organization Owner | ✔️ | ✔️ |
Request
URLURL
https://{api_host}/csp/gateway/am/api/v3/users/{userId}/orgs/{orgId}/roles
Path Parameters
Path Parameters
string
userId
Required
The userId or user account identifier.
Parameter Serialization Style:
SIMPLE Explode:false
string
orgId
Required
Unique identifier (GUID) of the organization.
Parameter Serialization Style:
SIMPLE Explode:false
Request Body
Request Body
NotifiableUpdateMemberRolesRequest
of mimetype application/json
Required
{
"customRoles": {
"roleNamesToAdd": [
"string"
],
"roleNamesToRemove": [
"string"
],
"rolesToAdd": [
{
"createdBy": "string",
"createdDate": "string",
"expiresAt": 3609941597,
"lastUpdatedBy": "string",
"lastUpdatedDate": "string",
"membershipType": "DIRECT",
"name": "string",
"resource": "string"
}
],
"rolesToRemove": [
{
"name": "string",
"resource": "string"
}
],
"rolesToUpdate": [
{
"createdBy": "string",
"createdDate": "string",
"expiresAt": 3609941597,
"lastUpdatedBy": "string",
"lastUpdatedDate": "string",
"membershipType": "DIRECT",
"name": "string",
"resource": "string"
}
]
},
"notifyUsers": false,
"organizationRoles": {
"roleNamesToAdd": [
"string"
],
"roleNamesToRemove": [
"string"
],
"rolesToAdd": [
{
"createdBy": "string",
"createdDate": "string",
"expiresAt": 3609941597,
"lastUpdatedBy": "string",
"lastUpdatedDate": "string",
"membershipType": "DIRECT",
"name": "string",
"resource": "string"
}
],
"rolesToRemove": [
{
"name": "string",
"resource": "string"
}
],
"rolesToUpdate": [
{
"createdBy": "string",
"createdDate": "string",
"expiresAt": 3609941597,
"lastUpdatedBy": "string",
"lastUpdatedDate": "string",
"membershipType": "DIRECT",
"name": "string",
"resource": "string"
}
]
},
"serviceRoles": [
{
"roleNamesToAdd": [
"string"
],
"roleNamesToRemove": [
"string"
],
"rolesToAdd": [
{
"createdBy": "string",
"createdDate": "string",
"expiresAt": 3609941597,
"lastUpdatedBy": "string",
"lastUpdatedDate": "string",
"membershipType": "DIRECT",
"name": "string",
"resource": "string"
}
],
"rolesToRemove": [
{
"name": "string",
"resource": "string"
}
],
"rolesToUpdate": [
{
"createdBy": "string",
"createdDate": "string",
"expiresAt": 3609941597,
"lastUpdatedBy": "string",
"lastUpdatedDate": "string",
"membershipType": "DIRECT",
"name": "string",
"resource": "string"
}
],
"serviceDefinitionId": "string"
}
]
}
customRoles
Optional
Request body to update roles.
boolean
notifyUsers
Optional
Send e-mail notification to the user(s).
organizationRoles
Optional
Request body to update roles.
Authentication
This operation uses the following authentication methods.
Errors
Errors
CspErrorResponse
400
User not part of the organization
CspErrorResponse
401
The user is not authorized to use the API
CspErrorResponse
403
The user is forbidden to use the API
CspErrorResponse
404
Organization not found | User not found
CspErrorResponse
409
The request could not be processed due to a conflict
CspErrorResponse
429
The user has sent too many requests
CspErrorResponse
500
An unexpected error has occurred while processing the request
Code Samples
cURL Command
curl -X PATCH -H "Content-Type: application/json" -d '{"customRoles":{"roleNamesToAdd":["string"],"roleNamesToRemove":["string"],"rolesToAdd":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}],"rolesToRemove":[{"name":"string","resource":"string"}],"rolesToUpdate":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}]},"notifyUsers":false,"organizationRoles":{"roleNamesToAdd":["string"],"roleNamesToRemove":["string"],"rolesToAdd":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}],"rolesToRemove":[{"name":"string","resource":"string"}],"rolesToUpdate":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}]},"serviceRoles":[{"roleNamesToAdd":["string"],"roleNamesToRemove":["string"],"rolesToAdd":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}],"rolesToRemove":[{"name":"string","resource":"string"}],"rolesToUpdate":[{"createdBy":"string","createdDate":"string","expiresAt":3609941597,"lastUpdatedBy":"string","lastUpdatedDate":"string","membershipType":"DIRECT","name":"string","resource":"string"}],"serviceDefinitionId":"string"}]}' https://{api_host}/csp/gateway/am/api/v3/users/{userId}/orgs/{orgId}/roles
[{"label":"Latest (v1.0)","version":"latest"}]
csp