Skip to main content

The ACLService service displays various operations you can perform on ACLs:

  • get retrieves all ACLs in the scope.

  • create creates a list of securityObjects. The list of objects must be supplied as input, before they can be created in the application.

  • getForComponent retrieves a component's ACL from the component's category and identifier.

  • getById retrieves ACLs from the list of their identifiers.

  • updateById updates ACLs using their identifiers.

  • deleteById deletes ACLs based on their identifiers.

ACL recovery

The examples below show how to retrieve ACLs using the various operations of get.


GET:

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
curl -X GET "<CORE_HOST>/rest/acl/" \
-H "token: <TOKEN>"

GET FOR COMPONENT:

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <CATEGORY> component category
# <IDS> component identifier
curl -X GET "<CORE_HOST>/rest/acl/<CATEGORY>/<IDS>" \
-H "token: <TOKEN>"

GET BY ID:

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <IDS> identifiers of ACLs to retrieve
curl -X GET "<CORE_HOST>/rest/acl/<IDS>" \
-H "token: <TOKEN>"

ACL creation

The examples below show how to create ACLs using the operation of create.

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
curl -X POST "<CORE_HOST>/rest/acl/" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"entries": [
{
"principal": "*",
"permission": "UPDATE_CONTENT",
"grant": "ALLOW"
}],
"id": "acl_test",
"name": "ACL test"
}
]'

ACL modification

The examples below show how to update ACLs using the operation ofupdate.

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <IDS> identifiers of ACLs to be modified
curl -X POST "<CORE_HOST>/rest/acl/<IDS>" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '[
{
"entries": [
{
"principal": "*",
"permission": "UPDATE_CONTENT",
"grant": "DENY"
}],
"id": "acl_test",
"name": "ACL test"
}
]'

Deleting ACL

The examples below show how to delete ACLs using the operation of delete.

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <IDS> identifiers of ACLs to be deleted
curl -X DELETE "<CORE_HOST>/rest/acl/<IDS>" \
-H "token: <TOKEN>"