Permissions Interface API documentation version v1
http://github.com/org/folio/mod-auth/_tenantPermissions
tenant permissions API implementation
This API provides a callback point for Okapi when new permission sets are added to the tenant
/_/tenantpermissions
get
Dummy get endpoint
post
Load new permissionSets into the permission module when a module gets enabled for a tenant
post /_/tenantpermissions
Load new permissionSets into the permission module when a module gets enabled for a tenant
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Okapi Permissions Set",
"type": "object",
"description": "A set of permissions populated by Okapi",
"properties": {
"moduleId": {
"description": "The ID of the Okapi module that provides these permissions",
"type": "string"
},
"perms": {
"description": "A set of permissions",
"type": "array",
"items": {
"type": "object",
"$ref": "okapiPermission.json"
}
}
}
}
Example:
{
"moduleId": "sample-module",
"perms": [
{
"permissionName": "everything",
"displayName": "every possible permission",
"description": "All permissions combined",
"subPermissions": [
"sample.needed",
"sample.extra"
]
}
]
}
HTTP status code 201
Permissions loaded successfully
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Okapi Permissions Set",
"type": "object",
"description": "A set of permissions populated by Okapi",
"properties": {
"moduleId": {
"description": "The ID of the Okapi module that provides these permissions",
"type": "string"
},
"perms": {
"description": "A set of permissions",
"type": "array",
"items": {
"type": "object",
"$ref": "okapiPermission.json"
}
}
}
}
HTTP status code 400
Bad request
Body
Media type: text/plain
Type: any
Example:
Bad request
HTTP status code 422
Validation errors
Body
Media type: application/json
Type: json
Content:
{
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "A set of errors",
"type": "object",
"properties": {
"errors": {
"description": "List of errors",
"id": "errors",
"type": "array",
"items": {
"type": "object",
"$ref": "error.schema"
}
},
"total_records": {
"type": "integer"
}
}
}
Example:
{
"errors": [
{
"message": "may not be null",
"type": "1",
"code": "-1",
"parameters": [
{
"key": "moduleTo",
"value": "null"
}
]
}
]
}
HTTP status code 500
Internal server error
Body
Media type: text/plain
Type: any
Example:
Error