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, DELETE

All Operations

This service includes the following operations:

All Resources

This service uses the following resources:

GET Operations

GET Roles

Returns the list of all the entity records available.

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

GET Roles (paged)

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

The following elements are optional:

page (int) The index of the page of the list that should be returned. This is a query string parameter.
pageSize (int) The number of page elements that should be returned (max. is 1000). This is a query string parameter.

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?page={page}&pageSize={pageSize}

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}

GET Print Role by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /identity/roles/{id}/print?template={template}

GET Print Role by key

Prints the specified entity record.

The following elements are required:

roleKey (string) Role.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

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}/print

GET Original Print RoleOriginal by identifier

Prints the specified entity record.

The following elements are required:

id (string) The record identifier.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

Response status codes:

200 OK. The operation was completed successfully.
404 NotFound. The specified resord does not exist.

Resource URL:

GET /identity/roles/{id}/printOriginal?template={template}

GET Original Print Role by key

Prints the specified entity record.

The following elements are required:

roleKey (string) Role.

The following elements are optional:

template (string) The report template that should be used. This is a query string parameter.

Response:

When successful, the response body contains a stream with the printed file.

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}/printOriginal

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

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 RoleDefinition Role

Updates the value of attribute 'RoleDefinition' 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}/roleDefinition

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

DELETE Operations

DELETE Role by identifier

Deletes the entity record that matches the specified identifier.

The following elements are required:

id (string) The record identifier.

Response:

When successful, the response body is empty.

Response status codes:

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

Resource URL:

DELETE /identity/roles/{id}

DELETE Role by key

Deletes the entity record that matches the specified key.

The following elements are required:

roleKey (string) Role.

Response:

When successful, the response body is empty.

Response status codes:

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

Resource URL:

DELETE /identity/roles/{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.
roleDefinition (string) Role Definition.


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.
roleDefinition (string) Role Definition.
users (User) Users.