[{"label":"Latest (v1.0)","version":"latest"}]
csp

Update User Roles By User ID And Organization ID

Description

Update 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

Request

URL

URL


patch
https://{api_host}/csp/gateway/am/api/v3/users/{userId}/orgs/{orgId}/roles
Copy

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.


serviceRoles Optional

Service roles to be updated.

Authentication

Authentication

This operation uses the following authentication methods.

Response

Response

200 OK

OK

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

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
Vendor Extensions

Vendor Extensions

This operation contains the following vendor extensions defined in the spec:
x-required-roles: org_owner,org_admin
x-slo-tier: TIER2


Feedback

Was this page helpful?