🧩Role API

Managing roles is the initial step in implementing role-based access

To use the Role API, it's necessary to generate an access token.

πŸ”—Access Token

A comprehensive toolkit, with practical usage examples, is accessible on GitHub.

This toolkit comes pre-installed as a default component within the on-premises platform, located at /datasentinel/soft/datasentinel_toolkit.

Role

Add

POST https://<<platform-server>>/ds-api/roles/{role}

Create a New Role

Path Parameters

Name
Type
Description

role*

String

Role Name

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

access*

Array

Array of Filters

Response

The JSON array structure should adhere to the following format:

It's important to note that the specified tags must already exist and be linked to one or more instances.

You can combine multiple AND/OR conditions within the JSON array

Display

GET https://<<platform-server>>/ds-api/roles/{role}

Display Role Attributes

Path Parameters

Name
Type
Description

role*

String

Role Name

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

Assigned Users

GET https://<<platform-server>>/ds-api/roles/{role}/users

Display the users assigned to a specific role

Path Parameters

Name
Type
Description

role*

String

Role Name

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

Replace

PUT https://<<platform-server>>/ds-api/roles/{role}

Replace existing role

Path Parameters

Name
Type
Description

role*

String

Role Name

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Request Body

Name
Type
Description

access*

Array

Array of Filters

Response

DELETE https://<<platform-server>>/ds-api/roles/{role}

Delete Role

Path Parameters

Name
Type
Description

role*

String

Role Name

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

Roles

Display

GET https://<<platform-server>>/ds-api/roles

Display All Roles

Headers

Name
Type
Description

user-token*

String

Generated Access Token

Response

Last updated