Question: How do we set single permissions for resources using the REST API?
Answer: The POST method accepts a single permission descriptor.
Please find below Method and URL used to set the single permission of resource:
Method: POST, URL: http://<host>:<port>/jasperserver[-pro]/rest_v2/permissions
The content for this request need to be passed in JSON format. The content of the JSON object would usually describe the single permission.
eg.
{
"uri":"/properties",
"recipient":"role:/ROLE_USER",
"mask":"1"
}
The Return values for this request is as below:
a) For Success: 201 Created - The request was successful.
b) For Failure: 204 No Content - 400 Bad Request - The permission is already assigned or the given mask is invalid.
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now