Versions Compared

Key

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


Page Properties
hiddentrue

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.

Status

Status
colourGrey
titleREFActure

Priority3.0
Notepublished, only the object history - rest of the concept is outstanding
Assignee

Resources

Remarks
  • 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:

ParameterDescription
defaultCleanupAfterDaysAn Integer default value for the cleanupAfterDays parameter. It is valid for any action that is not listed in actions.
actions

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

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.


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.audit cleanup -t default
(with the example tenant default)



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.


Section
bordertrue


Column

Table of Contents

Table of Contents
exclude(Table of Contents|Read on|Another Tutorial|Another Concept Article|Another interesting Tutorial|Retrieving Document History Entries|Endpoint for retrieving a document's history)


Introduction

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. 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 {objectId}. The meanings of the individual history codes are listed in the table below.

Core APIDescriptionConstantExplanationEndpoints triggering the entry
Import:
100Object createdOBJECT_CREATEDThe specified object was created by functions of the client or by an import./api/dms/objects
101Document createdOBJECT_CREATED_WITH_CONTENTThe object was created using functions of the client or via an import operation./api/dms/objects

110Object tag createdOBJECT_TAG_CREATEDA tag for the object was created./api/dms/objects/{objectId}/tags/{name}/state/{state}
Deletion:
200Object irrevocably deletedOBJECT_DELETEDThe object was deleted and cannot be restored.

/api/dms/objects/{objectId}

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

202Object marked for deletionOBJECT_FLAGGED_FOR_DELETEThe object was moved to the recycle bin.

/api/dms/objects/{objectId}


210Object tag deletedOBJECT_TAG_DELETEDA tag for the object was deleted./api/dms/objects/{objectId}/tags/{name}
Update:
300Index data modifiedOBJECT_METADATA_CHANGEDThe index data of the object or its status was edited using functions of the client or via an update carried out during the import operation.

/api/dms/objects/{objectId}

/api/dms/objects/{objectId}

301Content changedOBJECT_DOCUMENT_CHANGEDThe document was edited using functions of the client or via an update carried out during the import operation./api/dms/objects/{objectId}/contents/file
303Object updated and content movedOBJECT_UPDATE_CONTENT_MOVEDThe object was updated and the document was moved.

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

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


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

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

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

Retrieve:

400

Output contentDOCUMENT_ACCESSEDThe document content was read by the user, printed, or otherwise output. No changes were made./api/dms/objects/{objectId}/contents/file
401Index data retrievedMETADATA_ACCESSEDDie Indexdaten des Objektes wurden zur Ansicht abgerufen.

/api/dms/objects/search

/api/dms/objects/{objectId}

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

402Text preview downloadedRENDITION_TEXT_ACCESSEDThe text rendition of the object's document file was retrieved./api/dms/objects/{objectId}/contents/renditions/text

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