Versions Compared

Key

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

...

Page Properties
hiddentrue
idDONE

Product Version
Report Notepresentable
Assignee

Resources & Remarks

Modification History

NameDateProduct VersionAction
Antje08 FEB 20212.4New page properties macro.
Nils24 MAY 20212021 summeradded delete endpoints
Nils27 MAY 20212021 SummerAffected API Requests and Action Codes
Agnieszka03 JUNE 20212021 SummerrLANG



As of Version2019 Winter
HTTP MethodPOST
Response FormatJSON
Description


Excerpt

Delivers a list of predicate-matching objects to a secondary recipient.

Any request returning an object list triggers this

Webhook

webhook directly before the return. Applies whenever object lists are part of the HTTP response:

  • Search
Queries
  • queries
  • Object
Imports
  • Iiports
  • Object GETs
  • Object
Metadata Updates
  • metadata updates
  • Moving
Content
  • content


Thus, for example, properties can be extracted in order to hide them for

specified

individual users.

The body contains the object list that will be returned. In most cases, this list is of length 1. Only for the search endpoint, there are also numItemshasMoreItems and totalNumItems. The body is modified by the

Webhook

webhook and returned afterwards.

The predicate is applied to every single object in the list. The

Webhook

webhook is triggered for the whole object list as soon as one object satisfies the predicate.

Requirements for
external endpoint
External EndpointThe target URL must be a POST endpoint accepting and returning a list of objects.
Affected API Requests and Action Codes/History Codes


POST /api/dms/objects

100 - OBJECT_CREATED

101 - OBJECT_CREATED_WITH_CONTENT (since 2021 Summer)

POST /api/dms/objects/{objectId}
PATCH /api/dms/objects/{objectId}
300 - OBJECT_METADATA_CHANGED
POST /api/dms/objects/{objectId}/contents/file301 - OBJECT_DOCUMENT_CHANGED (since 2021 Summer)
DELETE /api/dms/objects/{objectId}/contents/file (as of 2023 Summer)201 - OBJECT_CONTENT_DELETED
POST /api/dms/objects/{objectId}/versions/{versionNr}/actions/restore (as of 2022 Spring)325 - OBJECT_RESTORED_FROM_VERSION
POST /api/dms/objects/tags/{name}/state/{state}?query=<SQL>110 - OBJECT_TAG_CREATED
310 - OBJECT_TAG_UPDATED
DELETE /api/dms/objects/{objectId}/tags/{name}210 - OBJECT_TAG_DELETED
POST /api/dms/objects/{objectId}/tags/{name}/state/{state}110 - OBJECT_TAG_CREATED
POST /api/dms/objects/{objectId}/tags/{name}/state/{state}?overwrite=true310 - OBJECT_TAG_UPDATED
POST /api/dms/objects/{objectId}/actions/move/contents/repositories/{repositoryId}
POST /api/dms/objects/{objectId}/versions/{versionNr}/actions/move/contents/repositories/{repositoryId}
303 - OBJECT_UPDATE_CONTENT_MOVED
POST /api/dms/objects/search-
GET /api/dms/objects/{objectId}-
GET /api/dms/objects/{objectId}/versions-
GET /api/dms/objects/{objectId}/versions/{versionNr}-
DELETE /api/dms/objects/{objectId} (since 2021 summer)

200 - OBJECT_DELETED (the delete request was successful)

201 - OBJECT_CONTENT_DELETED (the object is flagged for delete and the content and the object in the SQL database is deleted, but the deletion in Elasticsearch failed)

202 - OBJECT_FLAGGED_FOR_DELETE (the object is flagged for deletion, which makes it invisible, but it is not actually deleted. If asynchronous deletion is activated in the service configuration, this is the only possible action.)

DELETE /api/dms/objects

200 - OBJECT_DELETED (the delete request was successful. all deletable objects in the batch are deleted)

201 - OBJECT_CONTENT_DELETED (the deletable objects in the batch are flagged for deletion, their contents are deleted and their representations in the SQL database are deleted, but the deletion in Elasticsearch failed)

202 - OBJECT_FLAGGED_FOR_DELETE (the deletable objects in the batch are flagged for deletion, which makes them invisible, but they are not actually deleted. If asynchronous deletion is activated in the service configuration, this is the only possible action.)

Note:

  • In a batch deletion, it is possible that some objects are deletable and others are not due to different reasons (see option system:deletionResult described in the endpoint DELETE /api/dms/objects).
  • During the deletion processing, objects always have the same action value, no matter if they are deletable or not. Consider the action value to decide what should be done with the objects.
  • Successful and failed deletion processing can be distinguished by the option system:deletionResult of each individual DMS object in the batch.
DELETE /api/dms/objects/{objectId}/versions/{versionNr} (since 2021 summer)220 - VERSION_DELETED
Restart


Called by ServiceAPI-gateway service, Repository service
HeaderAuthorization-Header
Example Request Body


Code Block
languageyml
{
  "objects" : [ {
    "properties" : {
      "appEmail:subject" : {
        "value" : "any subject"
      },
      "appEmail:to" : {
        "value" : [ "user1@example.de" ]
      }
    }
  }, {
    "properties" : {
      "appEmail:subject" : {
        "value" : "another subject"
      },
      "appEmail:to" : {
        "value" : [ "user2@example.de" ]
      }
    }
  } ],
  "numItems" : 2,
  "hasMoreItems" : true,
  "totalNumItems" : 356
}


Example PredicateCheck if the object
type is
has the property appEmail:
email
bcc.

spel

:'appEmail

:

email'.equals(options['currentVersion']['

properties

']

['

system

appEmail:

objectTypeId

bcc']

['value'])

!=null