Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Everything within this section is only visible while editing. Use status for "stub" (red) "progress" (yellow) "review" (blue) and "refactor" (grey). Everything contained within the table is displayed in the (INTERNAL) Reports page.

audit cleanup -t default
(with the example tenant default)
  • Antje: page created
  • Antje: table with history codes created
  • (warning) Needs to be moved to the Document Lifecycle page as subpage - if the DLM page is ready to get published
  • (warning) Heading 1 "Summary" deleted for now - needs to be added later on if the concept is written in detail
  • Antje: Cleanup Section startet in the hidden part

Cleanup of the Audit Trail

It is possible to delete old audit trail entries by means of the audit cleanup command provided by the Commander service, together with a configuration file ./config/system/cleanupConfiguration.json. The audit field in the JSON file contains the details on the deletion of the audit trail entries using the following parameters:

Contains a list of mappings of the minimum age of audit trail entry types and the corresponding cleanup timing.

Page Properties
hiddentrue
Status
Status
colourGrey
titleREFActure
Priority3.0
idREFACTURE

Product Version
Report Notepublished, only the object history - rest of the concept is outstanding
Assignee

Resources & Remarks

Remarks

In the example configuration below, the defaultCleanupAfterDays parameter implies that all audit trail entries can be deleted after 10 days, if not further specified in actions. However, two mappings are listed in actions overwriting the defaultCleanupAfterDays value for two audit trail entry types. The entries of Core API type 100 have do stay forever and will be never deleted. The entries of Core API type 400 can be deleted already after 1 day. The parameter comment, in this example, contains the indication constant of the audit trail entry type.

Code Block
languageyml
titleExample cleanupConfiguration.json
{
	"audit": {
		"defaultCleanupAfterDays": 10,
		"actions": [				
			{
				"comment": "OBJECT_CREATED",
				"action": 100, 
				"cleanupAfterDays": -1
			},
			{
				"comment": "DOCUMENT_ACCESSED",
				"action": 400,
				"cleanupAfterDays": 1
			}			
		]
	}
}

When the lifetime of the audit trail entries is exceeded, they are not automatically deleted. The deletion of entries takes place only as a result of the execution of the audit cleanup command in the Commander service AND if the specified lifetime is exceeded. When executed, the command reads the cleanupConfiguration.json file. If the file does not exist, the defaultCleanupAfterDays value is set to -1 and thus no entry will be deleted from the audit trail.

To the audit cleanup command, two parameters can be given:

ParameterDescriptionExample
-h | --helpDisplay the help for the command.audit cleanup -h
-t | --tenantSpecify the target tenant. If not specified, the command is executed for all tenants.
ParameterDescription
defaultCleanupAfterDaysAn Integer default value for the cleanupAfterDays parameter. It is valid for any action that is not listed in actions.
actions
ParameterDescription
commentAn optional String parameter for the purpose of help. The value is arbitrary and is not evaluated in the Commander service. 
actionThe Integer Core API code specifying the audit trail entry type. Only existing values are considered. Not existing values lead to ignoring of the mapping element.
cleanupAfterDays

The Integer minimum age of audit trail entries with the history code action in days. Any entry of type action older than cleanupAfterDays will be deleted when the audit cleanup command is executed.

Only values >= 0 are valid. If a negative value is set, audit trail entries of the corresponding type will be never deleted.

  • Antje: Cleanup Section moved to Commander tooling page

For a cleanup the audit trail, the commander service can be used as a tool to remove audit trail entries.

>>> audit-cleanup Command


Modification History

NameDateProduct VersionAction
Antje08 FEB 20212.4New page properties macro.
Antje03 JAN 20222022 Springrestoring added (325)
Antje23 NOV 20222022 Winterpost text rendition (306) added
Antje28 NOV 20222022 Winterrestructure table



Excerpt
hiddentrue

The audit trail is the history protocol of an object, serving to document its total lifecycle. There are many different actions that trigger the creation of a new entry in the respective object's audit trail.

...

The audit trail is the history protocol of an object, serving to document its total entire lifecycle. There are many different actions that trigger the creation of a new entry in the respective object's audit trail. In this article, an overview of the different history codes is provided , that can occur in the audit trail.

Anchor
auditTrail_HistoryCodes
auditTrail_HistoryCodes

History Codes

The GET "/dms/objects/{id}/history” REST endpoint returns a list of changes made to the object with the id ID {objectId}. The meanings of the individual history codes are listed in the table below.

Core API
Explanation
Action code
DescriptionConstant
DetailSubaction codeEndpoints triggering the entryDescriptionExplanation
Import:
100
Object created
OBJECT_CREATED-POST /api/dms/objectsObject createdThe specified object was created by functions of the client or by an import.
101OBJECT_CREATED_WITH_CONTENT-POST /api/dms/objects
101
Document created
OBJECT_CREATED_WITH_CONTENT
The object was created using functions of the client or via an import operation.
110OBJECT_TAG_CREATED: [<name>, <state>]<state>POST /api/dms/objects
110
/{objectId}/tags/{name}/state/{state}Object tag created
OBJECT_TAG_CREATED
A tag for the object was created.
Deletion:
200OBJECT_DELETED-

DELETE /api/dms/objects/{objectId}

/tags

DELETE /api/dms/objects/{

name

objectId}/

state

versions/{

state}Deletion:200

versionNr} (up to 2023 Summer)

Object irrevocably deleted
OBJECT_DELETED
The object was deleted and cannot be restored.
201 (as of 2023 Summer)OBJECT_CONTENT_DELETED-DELETE /api/dms/objects/{objectId}/contents/fileBinary content of the object is removed.A new object version was created that has no contentStreams section anymore.
202OBJECT_FLAGGED_FOR_DELETE-

DELETE /api/dms/objects/{objectId}

/versions/{versionNr}202

Object marked for deletion
OBJECT_FLAGGED_FOR_DELETE
The object was moved to the recycle bin.
210OBJECT_TAG_DELETED: [<name>, <state>]<state>DELETE /api/dms/objects/{objectId}
210
/tags/{name}Object tag deleted
OBJECT_TAG_DELETED
A tag for the object was deleted.
220VERSION_DELETED: [<versionNr>]-DELETE /api/dms/objects/{objectId}/
tags
versions/{
name}
versionNr} (as of 2023 Autumn)Object version deleted.The object version was deleted and cannot be restored.
Update:
300
Index data modified
OBJECT_METADATA_CHANGED
The index data
-

POST /api/dms/objects/{objectId}

PATCH /api/dms/objects/{objectId}

Metadata modifiedThe metadata of the object or its status was edited using functions of the client or via an update carried out during the import operation.
301OBJECT_DOCUMENT_CHANGED-DELETE /api/dms/objects/{objectId}
/
api/dms/objects
tags/{
objectId
name}
301
Content changed
OBJECT_DOCUMENT_CHANGED
The document was edited using functions of the client or via an update carried out during the import operation.
/api/dms/objects/{objectId}/contents/file
303
Object updated and content moved
OBJECT_UPDATE_CONTENT_MOVED
The object was updated and the document was moved.
-

POST /api/dms/objects/{objectId}/actions/move/
contents/repositories/{repositoryId}

POST /api/dms/objects/{objectId}/versions/{versionNr}/
actions/move/contents/repositories/{repositoryId}

310Object tag modifiedOBJECT_TAG_UPDATEDOne of the object's tags was changed.

Object updated and content movedThe object was updated and the document was moved.

306 

(as of 2022 Winter)

RENDITION_CHANGED

1

POST /api/dms/objects/{objectId}/contents/renditions/textText rendition added/updated.A rendition of the binary content file of a DMS object was added or updated via endpoint. The subaction specifies the type of rendition.
310OBJECT_TAG_UPDATED: [<name>, <state>]-

POST /api/dms/objects/{objectId}/tags/{name}/state/{state}?overwrite=true

POST /api/dms/objects/tags/{name}/state/{state}?query=<SQL>

Object tag modifiedOne of the object's tags was changed.
325

OBJECT_RESTORED_FROM_VERSION: [<versionNr>]

-POST /api/dms/objects/{objectId}/versions/{versionNr}/actions/restoreObject restored from an old versionThe data of the old object version were used to update the current object version.
340DOCUMENT_MOVED-

POST /api/dms/objects/{objectId}

PATCH /api/dms/objects/{objectId}

system:parentId property modifiedThe value for the system:parentId property was modified (added, updated, removed). Additionally, an audit entry with action 300 was created.
Retrieve:

400

Output contentIndex data retrieved

DOCUMENT_ACCESSED-

GET /api/dms/objects/{objectId}/contents/file

GET /api/dms/objects/{objectId}/versions/{versionNr}/contents/file

GET /api/dms/objects/{objectId}/contents/renditions​/pdf

Output content

The document content was read by the user, printed, or otherwise output. No changes were made.

/api/dms/objects/{objectId}/contents/file401

As of 2022 Summer: If a user retrieves the binary content file of the same object version multiple times within 10 minutes, only the first retrieval is documented in the audit trail.

The following processes internally retrieve the object's binary content file and thus trigger the creation of an audit entry as well:

  • the first retrieval of a PDF rendition after the object creation
401METADATA_ACCESSED
Die Indexdaten des Objektes wurden zur Ansicht abgerufen.
-

POST /api/dms/objects/search

GET /api/dms/objects/{objectId}

GET /api/dms/objects/{objectId}/versions

402Text preview downloadedRENDITION_TEXT_ACCESSEDThe text rendition of the object's document file was retrieved.

GET /api/dms/objects/{objectId}/contents/renditions​/pdf

Metadata retrieved

The object's metadata were retrieved for viewing.

The following processes internally retrieve the object's metadata and thus trigger the creation of an audit entry as well:

  • each retrieval of a PDF rendition 
402RENDITION_ACCESSED1GET /api/dms/objects/{objectId}/contents/renditions​/textText rendition accessed

Rendition of the binary content accessed.

If a user retrieves the same type of rendition for the same object multiple times within 10 minutes, only the first retrieval is documented in the audit trail.

The subaction specifies the type of rendition

2GET /api/dms/objects/{objectId}/contents/
renditions/text
renditions​/pdfPDF rendition accessed

Info
iconfalse

Read on

Section


Column
width45%

Retrieving Document History Entries 

Insert excerpt
Retrieving Document History Entries
Retrieving Document History Entries
nopaneltrue
 Keep reading


Column
width45%

Endpoint for retrieving a document's history

This endpoint retrieves the history entries of a DMS object identified by objectIdHistory entries document modifications of or actions performed on a DMS object. Keep reading



...