Skip to main content

Facts represent audit trail events recorded on components (documents, folders, tasks, virtual folders). Each fact captures an action performed by a user on a component.

Retrieving facts

The examples below show how to retrieve facts for a document. The same pattern applies to folders (/rest/folders), tasks (/rest/tasks) and virtual folders (/rest/virtualFolders).

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <ID> document identifier
curl -X GET "<CORE_HOST>/rest/documents/<ID>/facts" \
-H "token: <TOKEN>"
info

The same endpoint pattern is available for all component types:

  • Documents: GET /rest/documents/<ID>/facts
  • Folders: GET /rest/folders/<ID>/facts
  • Tasks: GET /rest/tasks/<ID>/facts
  • Virtual folders: GET /rest/virtualFolders/<ID>/facts

Creating a fact

The examples below show how to create a fact for a document.

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
# <ID> document identifier
curl -X POST "<CORE_HOST>/rest/documents/<ID>/facts" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"action": "CUSTOM_ACTION",
"description": "Custom audit event",
"technical": false
}'

Searching for facts

Facts can be searched using a SearchRequest object, which allows filtering by component, user, action, date range, etc.

# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN> authentication token
curl -X POST "<CORE_HOST>/rest/facts" \
-H "token: <TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"searchCriteria": [
{
"name": "objectId",
"value": "documentId"
},
{
"name": "action",
"value": "CUSTOM_ACTION"
}
],
"paginationContext": {
"maxResults": 50,
"pageIndex": 0
}
}'