POST /audit/api/dms/objects/custom

As of Version

product version 2022 Spring

Request MethodPOST
Request Headers

Required headers:

  • Content-Type: application/json
  • Authorization: Bearer eyJraW...
    Contains the internal token (JWT) that the custom service receives from the corresponding caller.

Optional header:

  • x-b3-traceid: 6494b222b4a0c111
    Contains the traceId if the custom service receives it from the corresponding caller.
Response FormatHTTP status code
Specific Error CodesError Handling
Required Permissionsuccessful authentication
Description

Stores a custom audit entry specified in the JSON request body.

This internal endpoint of the AUDIT Service can be called by custom services running inside the yuuvis® Momentum cluster in order to allow for the creation of custom audit entries.

The following values are stored in the corresponding database table:

ColumnField value determined byComment
objectiddatabase
referredobjectidrequest body, property referredObjectIdRequired.
Specifies the system:objectId of the DMS object for which the audit entry is stored.
creationdate

database


createdbyJWT
tenantJWT
action-The value 10000 is always set.
traceidx-b3-traceid request header if available. If not specified, a null value is set.
detailrequest body, property detail
versionnumberrequest body, property system:versionNumberRequired.
Specifies the DMS object version for which the audit entry is stored.
subactionrequest body, property subactionCan be used to store any integer that can be used to differentiate between multiple types of custom audit entries.

As every audit entry, a custom audit entry can be retrieved via the endpoint GET /api/dms/objects/{objectId}/history.

Request Example


{
  "objects": [
    {
      "properties": 
      {
        "detail": {
          "value": "custom details"
        },
        "subaction": {
          "value": 4321
        },
        "referredObjectId": {
          "value": "a7facd2f-0354-490f-8eb3-59a47649492c"
        },
        "system:versionNumber": {
          "value": 2
        }
      }
    }
  ]
}
Response Example

200 OK