Permission APIs
Add a permission string
Overview
Description | Adds a new permission string. |
|---|---|
API Context |
|
HTTP Method |
|
Request/Response Format |
|
Authentication | Basic |
Username |
|
Password |
|
Runtime | Dashboard/Worker |
curl command syntax
Sample curl command
curl -X POST https://localhost:9443/permissions/ -H 'content-type: application/json' -d ' { "appName":"MON", "permissionString":"MON.manager"}' -kSample output
Response
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |
|---|
Get permission ID for permission string
Overview
Description | Returns the permission ID for a given permission string. |
|---|---|
API Context |
|
HTTP Method |
|
Request/Response Format |
|
Authentication | Basic |
Username |
|
Password | admin |
Runtime | Dashboard/Worker |
Parameter description
Parameter | Description |
|---|---|
|
|
curl command syntax
Sample curl command
curl -X GET https://localhost:9443/permissions/app/MONSample output
Response
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |
|---|
Check whether a specific user role is granted a specific permission
Overview
Description | Checks whether the specified user role is granted a specific permission. |
|---|---|
API Context |
|
HTTP Method | GET |
Request/Response Format |
|
Authentication |
|
Username |
|
Password |
|
Runtime | Dashboard/Worker |
Parameter description
Parameter | Description |
|---|---|
| The ID of a specific permission. The API checks whether this permission is granted to the specified user role. |
| The ID of a specific user role. The API checks whether this user role is granted the specified permission ID. |
curl command syntax
Sample curl command
curl -X GET https://localhost:9443/permissions/auth/8dc31fec-8364-3082-9f88-c7ca7d979873/adminSample output
Response
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |
|---|
Delete a permission string
Overview
Description | Deletes the specified permission string. |
|---|---|
API Context |
|
HTTP Method |
|
Request/Response Format |
|
Authentication |
|
Username |
|
Password |
|
Runtime | Dashboard/Worker |
Parameter description
Parameter | Description |
|---|---|
| The ID of the permission string to be deleted. |
curl command syntax
Sample curl command
curl -X DELETE https://localhost:9443/permissions/e9687c6f-b5b2-3216-b3bd-82e7a8e14367Sample output
Response
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |
|---|
List roles with a specific permission
Overview
Description | Lists the user roles that are currently granted the specified user role. |
|---|---|
API Context |
|
HTTP Method |
|
Request/Response Format |
|
Authentication |
|
Username |
|
Password |
|
Runtime | Dashboard/Worker |
Parameter description
Parameter | Description |
|---|---|
| The ID of the permission for which the user roles need to be listed. |
curl command syntax
Sample curl command
curl -X GET https://localhost:9443/permissions/8dc31fec-8364-3082-9f88-c7ca7d979873/rolesSample output
Response
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |
|---|
Revoke a specific permission for all roles
Overview
Description | Revokes the specified permission for all the user roles. |
|---|---|
API Context |
|
HTTP Method | POST |
Request/Response Format |
|
Authentication |
|
Username |
|
Password |
|
Runtime | Dashboard/Worker |
Parameter description
Parameter | Description |
|---|---|
| The ID of the permission that needs to be revoked for all user roles. |
curl command syntax
Sample curl command
curl -X POST https://localhost:9443/permissions/revoke/8dc31fec-8364-3082-9f88-c7ca7d979873Sample output
Response
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |
|---|
Revoke a specific permission for a specific role
Overview
Description | Grants or revokes a permission for the specified user role. The permission is passed as an array in the body of the request. |
|---|---|
API Context |
|
HTTP Method | POST |
Request/Response Format |
|
Authentication |
|
Username |
|
Password |
|
Runtime | Dashboard/Worker |
Parameter description
Parameter | Description |
|---|---|
| The ID of the user role for which the permission given in the request body needs to be granted or revoked. |
curl command syntax
Sample curl command
curl -X POST 'https://localhost:9443/permissions/roles/admin?action=revoke' -H 'content-type: application/json' -d ' { "appName":"MON", "permissionString":"MON.manager"}'Sample output
Response
HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes. |
|---|