Bulk Set User Roles
const url = 'https://api.exolink.cloud/tenant/example/user';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"userIds":["example"],"role":"Owner"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.exolink.cloud/tenant/example/user \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "userIds": [ "example" ], "role": "Owner" }'Set roles for multiple users, either per user or one role for a list of users
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Tenant domain prefix
Request Bodyrequired
Section titled “Request Bodyrequired”object
User ID
User role in a tenant
object
User IDs
User role in a tenant
Responses
Section titled “Responses”Roles updated successfully
Empty object
object
Example generated
{}Malformed request
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Bad Request", "errorCode": "ERR_API_BAD_REQUEST"}Missing, invalid or expired credentials
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Not authorized", "errorCode": "ERR_API_NOT_AUTHORIZED"}The caller may not perform this action
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Forbidden", "errorCode": "ERR_API_FORBIDDEN"}Validation or verification failed
Error response. Some rejections carry only message.
object
Error message
Error code
Failed validations, for requests checked against a schema
object
Path of the invalid field
Example
{ "message": "Missing parameter: displayName", "errorCode": "ERR_API_VALIDATION_FAILED"}