Jasmin Developers - Web API Reference

Platform | Role

Service to manage entities of type 'Role'.

Overview


URL api/{tenantKey}/{orgKey}/identity/roles
Methods Supported GET, POST, PUT

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

GET Operations

GET Roles (odata)

Returns a page of the list of all the entity records available.

The following elements are optional:

opts (ODataQueryOptions) OData query option.

Response:

When successful, the response body contains the list of records available. See RoleResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

GET /identity/roles/odata

GET Role by identifier

Returns the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body contains the entity record. See RoleResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /identity/roles/{id}

GET Role by key

Returns the entity record that matches the specified key.

The following elements are required:

roleKey (string) Role.

Response:

When successful, the response body contains the entity record. See RoleResource.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

GET /identity/roles/{roleKey}

POST Operations

POST UserRoles

Creates a new entity record.

The following elements are required:

roleResource (ApiUserRolesResource) The request body should contain the entity record that should be created.
See ApiUserRolesResource.

Response:

When successful, the response body contains the new entity record identifier. The resource header location property contains the URL for the new entity record. See ApiUserRolesResource.

Response status codes:

201 Created. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /identity/roles

POST Add Users by keys

Adds the specified 'Users' to the 'Role' (by specifying its keys).

The following elements are required:

roleKey (string) Role.
value (Array of string) A list of record keys to be added.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /identity/roles/{roleKey}/users/add

POST Add Users by identifiers

Adds the specified 'Users' to the 'Role' (by specifying its identifiers).

The following elements are required:

roleKey (string) Role.
value (Array of string) A list of record identifiers to be added.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /identity/roles/{roleKey}/users/addById

POST Remove Users by keys

Removes the specified 'Users' to the 'Role' (by specifying its keys).

The following elements are required:

roleKey (string) Role.
value (Array of string) A list of record keys to be removed.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /identity/roles/{roleKey}/users/remove

POST Remove Users by identifiers

Removes the specified 'Users' to the 'Role' (by specifying its identifiers).

The following elements are required:

roleKey (string) Role.
value (Array of string) A list of record identifiers to be removed.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

POST /identity/roles/{roleKey}/users/removeById

PUT Operations

PUT Set Description Role

Updates the value of attribute 'Description' in the specified entity record.

The following elements are required:

roleKey (string) Role.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /identity/roles/{roleKey}/description

PUT Set IsActive Role

Updates the value of attribute 'IsActive' in the specified entity record.

The following elements are required:

roleKey (string) Role.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.
404 NotFound. The specified record does not exist.

Resource URL:

PUT /identity/roles/{roleKey}/isActive

PUT Set IsAdministration Role

Updates the value of attribute 'IsAdministration' in the specified entity record.

The following elements are required:

roleKey (string) Role.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /identity/roles/{roleKey}/isAdministration

PUT Set IsDefault Role

Updates the value of attribute 'IsDefault' in the specified entity record.

The following elements are required:

roleKey (string) Role.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /identity/roles/{roleKey}/isDefault

PUT Set IsInternal Role

Updates the value of attribute 'IsInternal' in the specified entity record.

The following elements are required:

roleKey (string) Role.
value (bool) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /identity/roles/{roleKey}/isInternal

PUT Set LocalizableDescription Role

Updates the value of attribute 'LocalizableDescription' in the specified entity record.

The following elements are required:

roleKey (string) Role.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /identity/roles/{roleKey}/localizableDescription

PUT Set RoleKey Role

Updates the value of attribute 'RoleKey' in the specified entity record.

The following elements are required:

roleKey (string) Role.
value (string) The request body should contain the new value for the attribute.

Response:

When successful, the response body is empty.

Response status codes:

200 OK. The operation was completed successfully.
400 BadRequest. The request parameters are invalid.

Resource URL:

PUT /identity/roles/{roleKey}/roleKey

Resources


ApiUserRolesResource

The following elements are required:

roleKey (string) Role.
description (string) Description.
isAdministration (bool) Is Administration.
isDefault (bool) Is Default.
isInternal (bool) Is Internal.

The following elements are optional:

localizableDescription (string) Description.


RoleResource

The following elements are required:

roleKey (string) Role.
description (string) Description.
isAdministration (bool) Is Administration.
isDefault (bool) Is Default.
isInternal (bool) Is Internal.

The following elements are optional:

localizableDescription (string) Description.
users (User) Users.