Get Permissions
curl --request GET \
--url https://api.studio.prisme.ai/v2/{subjectType}/{subjectId}/permissions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.studio.prisme.ai/v2/{subjectType}/{subjectId}/permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/{subjectType}/{subjectId}/permissions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"result": [
{
"target": {
"id": "userId1"
},
"permissions": {
"role": "admin"
}
},
{
"target": {
"id": "userId2"
},
"permissions": {
"policies": {
"read": true
}
}
},
{
"target": {
"public": true
},
"permissions": {
"policies": {
"read": true
}
}
}
]
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Permissions
Get Permissions
Retrieve permissions for the ‘subjectType’ ‘subjectId’
GET
/
v2
/
{subjectType}
/
{subjectId}
/
permissions
Get Permissions
curl --request GET \
--url https://api.studio.prisme.ai/v2/{subjectType}/{subjectId}/permissions \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.studio.prisme.ai/v2/{subjectType}/{subjectId}/permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.studio.prisme.ai/v2/{subjectType}/{subjectId}/permissions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"result": [
{
"target": {
"id": "userId1"
},
"permissions": {
"role": "admin"
}
},
{
"target": {
"id": "userId2"
},
"permissions": {
"policies": {
"read": true
}
}
},
{
"target": {
"public": true
},
"permissions": {
"policies": {
"read": true
}
}
}
]
}{
"error": "BadParameters",
"message": "<string>",
"details": "<unknown>"
}{
"error": "AuthenticationError",
"message": "Unauthenticated"
}{
"error": "ForbiddenError",
"message": "Forbidden"
}{
"error": "ObjectNotFound",
"message": "<string>"
}Authorizations
BearerAuthOrgApiKeyAuthBearerAuth & OrgApiKeyAuth
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The target subject type
Available options:
pages, workspaces The target subject id (i.e workspaceId if subjectType is 'workspace')
Response
Success Response
Hide child attributes
Hide child attributes
Hide child attributes
Hide child attributes
Example:
[
{
"target": { "id": "userId1" },
"permissions": { "role": "admin" }
},
{
"target": { "id": "userId2" },
"permissions": { "policies": { "read": true } }
},
{
"target": { "public": true },
"permissions": { "policies": { "read": true } }
}
]
Was this page helpful?
⌘I