Versions Compared

Key

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

...

As of Version2021 Summer
HTTP MethodPOST
Response FormatJSON
Description


Excerpt
Update requests trigger this webhook after successful update directly before the return. This concerns content updates, metadata updates and tag updates.


The body contains the object list that will be returned. The body is modified by the webhook and returned afterwards.

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

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



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


Code Block
languageyml
{
	"objects": [
		{
			"properties": {
				"system:objectId": {
					"value": "d7bd24b0-f8aa-49dc-a698-5513763d347a"
				},
				"system:baseTypeId": {
					"value": "system:document"
				},
				"system:objectTypeId": {
					"value": "document"
				},
				"system:createdBy": {
					"value": "275c826c-6a61-4e89-9512-8d935a1631e5"
				},
				"system:creationDate": {
					"value": "2021-05-21T14:16:50.010Z"
				},
				"system:lastModifiedBy": {
					"value": "275c826c-6a61-4e89-9512-8d935a1631e5"
				},
				"system:lastModificationDate": {
					"value": "2021-05-22T00:35:30.180Z"
				},
				"system:versionNumber": {
					"value": 3
				},
				"system:tenant": {
					"value": "default"
				},
				"system:traceId": {
					"value": "981f85ee55debc7d"
				},
				"testString": {
					"value": "new test import"
				}
			},
			"contentStreams": [
				{
					"contentStreamId": "99F9EE58-BA38-11EB-A4CA-43B80C415ED8",
					"archivePath": "default/DOCUMENT/9F/9E/E/",
					"length": 431397,
					"mimeType": "message/rfc822",
					"fileName": "test.txt",
					"digest": "11857B6FAD61E41AFB3E7398BA1BA4BFB6B0A5422762FF41A0907BC0BFF7748F",
					"repositoryId": "repo242"
				}
			],
			"options": {
				"action": 300,
				"action_bckp": 300,
				"detail": "OBJECT_METADATA_CHANGED",
				"previousVersion": {
					"properties": {
						"system:traceId": {
							"value": "e48801d4a97cb6ff"
						},
						"system:objectTypeId": {
							"value": "document"
						},
						"system:versionNumber": {
							"value": 2
						},
						"testString": {
							"value": "test import"
						},
						"system:createdBy": {
							"value": "275c826c-6a61-4e89-9512-8d935a1631e5"
						},
						"system:creationDate": {
							"value": "2021-05-21T14:16:50.010Z"
						},
						"system:lastModificationDate": {
							"value": "2021-05-21T14:17:27.880Z"
						},
						"system:baseTypeId": {
							"value": "system:document"
						},
						"system:tenant": {
							"value": "default"
						},
						"system:lastModifiedBy": {
							"value": "275c826c-6a61-4e89-9512-8d935a1631e5"
						},
						"system:objectId": {
							"value": "d7bd24b0-f8aa-49dc-a698-5513763d347a"
						}
					},
					"contentStreams": [
						{
							"contentStreamId": "99F9EE58-BA38-11EB-A4CA-43B80C415ED8",
							"archivePath": "default/DOCUMENT/9F/9E/E/",
							"length": 431397,
							"mimeType": "message/rfc822",
							"fileName": "test.txt",
							"digest": "11857B6FAD61E41AFB3E7398BA1BA4BFB6B0A5422762FF41A0907BC0BFF7748F",
							"repositoryId": "repo242"
						}
					]
				},
				"tenant": "default",
				"user": "root",
				"authorities": [
					"ACL_ADMIN",
					"YUUVIS_TENANT_ADMIN",
					"uma_authorization"
				]
			}
		}
	]
}


Example Predicate

Check if the update is a metadata update: spel:options!=null && options['action']==300

Check if the update is a tag update: spel:options!=null && T(java.util.List).of(110,210,310).contains(options['action'])

...