This documentation is for WSO2 Stream Processor 4.4.0 (the latest version of WSO2 SP. View documentation for the Streaming Integrator, the successor of WSO2 SP.

All docs This doc
                                                                                                                                                                                                                                                                                                                                       
||
Skip to end of metadata
Go to start of metadata

Add a permission string

Overview

DescriptionAdds a new permission string.
API Context/permissions
HTTP MethodPOST
Request/Response Formatapplication/json
AuthenticationBasic
Usernameadmin
Passwordadmin
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"}' -k

Sample 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

DescriptionReturns the permission ID for a given permission string.
API Context /permissions/app/{appName}
HTTP MethodGET
Request/Response Formatapplication/json
AuthenticationBasic
Usernameadmin
Passwordadmin
RuntimeDashboard/Worker

Parameter description

ParameterDescription
{appName}

curl command syntax

 


Sample curl command

curl -X GET https://localhost:9443/permissions/app/MON

Sample 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

DescriptionChecks whether the specified user role is granted a specific permission.
API Contextpermissions/auth/{permissionID}/{roleName}
HTTP MethodGET
Request/Response Format
Authentication
Username
Password
RuntimeDashboard/Worker

Parameter description

ParameterDescription
{permissionID}The ID of a specific permission. The API checks whether this permission is granted to the specified user role.
{roleName}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/admin

Sample output

 

Response

HTTP Status Code

200 or 404

For descriptions of the HTTP status codes, see HTTP Status Codes.

Delete a permission string 

Overview

DescriptionDeletes the specified permission string.
API Context/permissions/{permissionID}
HTTP MethodDELETE
Request/Response Format
Authentication
Username
Password
RuntimeDashboard/Worker

Parameter description

ParameterDescription
{permissionID}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-82e7a8e14367

Sample 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

DescriptionLists the user roles that are currently granted the specified user role.
API Context/permissions/{permissionsID}/roles
HTTP MethodGET
Request/Response Format
Authentication
Username
Password
RuntimeDashboard/Worker

Parameter description

ParameterDescription
{permissionsID}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/roles

Sample 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

DescriptionRevokes the specified permission for all the user roles.
API Context /permissions/ revoke/ {permissionID}
HTTP MethodPOST
Request/Response Format
Authentication
Username
Password
RuntimeDashboard/Worker

Parameter description

ParameterDescription
{permissionID}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-c7ca7d979873

Sample 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

DescriptionGrants or revokes a permission for the specified user role. The permission is passed as an array in the body of the request.
API Context/permissions/roles/{roleID}?action=revoke/grant
HTTP MethodPOST
Request/Response Formatapplication/json
Authentication
Username
Password
RuntimeDashboard/Worker

Parameter description

ParameterDescription
{roleID} 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.

  • No labels