Comment on page
🧩
Role API
To use the Role API, it's necessary to generate an access token.
This toolkit comes pre-installed as a default component within the on-premises platform, located at
/datasentinel/soft/datasentinel_toolkit
.post
https://<<platform-server>>/ds-api
/roles/{role}
Add
The JSON array structure should adhere to the following format:
"access": [
{
"filters": [
{"tag": "tag_name", "value": "tag_value"},
{"tag": "another_tag", "value": "another_value"},
...
]
}
]
It's important to note that the specified tags must already exist and be linked to one or more instances.
// Example:
// Establish a role-based access that exclusively applies to instances
// categorized as "production"
// AND situated within the "London" datacenter.
"access": [
{
"filters":
[
{"tag": "environment", "value": "production"},
{"tag": "datacenter", "value": "london"}
]
}
]
// Example:
// Establish a role-based access that encompasses instances
// categorized as either "development" OR "uat"
"access": [
{
"filters":
[
{ "tag": "environment", "value": "development" }
]
},
{
"filters":
[
{ "tag": "environment", "value": "uat" }
]
},
]
You can combine multiple AND/OR conditions within the JSON array
get
https://<<platform-server>>/ds-api
/roles/{role}
Display
get
https://<<platform-server>>/ds-api
/roles/{role}/users
Assigned Users
put
https://<<platform-server>>/ds-api
/roles/{role}
Replace
delete
https://<<platform-server>>/ds-api
/roles/{role}
get
https://<<platform-server>>/ds-api
/roles
Display
Last modified 2mo ago