diff --git a/docs/tutorial/DataNotification.md b/docs/tutorial/DataNotification.md index 27183f0f99a769c45d7b89c94b440e793629772e..132d9f2c1fd6d9f4b442e3c9eec6196f07517f7b 100644 --- a/docs/tutorial/DataNotification.md +++ b/docs/tutorial/DataNotification.md @@ -53,38 +53,82 @@ A sample output is shown below. Please note the "name" of the topic. This is req ``` [ - { - "name": "records-changed", - "description": "This notification is sent whenever a record is created, updated or deleted.", - "state": "ACTIVE", - "example": [ - { - "id": "common:abc:123", - "kind": "common:petrel:regularheightfieldsurface:1.0.0", - "op": "create" - }, - { - "id": "common:abc:123", - "kind": "common:petrel:regularheightfieldsurface:1.0.1", - "op": "update", - "previousVersionKind": "common:petrel:regularheightfieldsurface:1.0.0" - }, - { - "id": "common:abc:123", - "kind": "common:petrel:regularheightfieldsurface:1.0.0", - "op": "delete", - "deletionType": "soft" - }, - { - "id": "common:abc:1234", - "kind": "common:petrel:regularheightfieldsurface:1.0.0", - "op": "delete", - "deletionType": "hard" - } - ... - ] - }, - ... + { + "name": "recordstopic", + "description": "This notification is sent whenever a new record or record version is created, updated or deleted in storage. 'previousVersionKind' is noted upon 'kind' update. Record deletion is noted as a soft 'deletionType'. Record purge is noted as a hard 'deletionType'.", + "state": "ACTIVE", + "example": [ + { + "id": "osdu:abc:123", + "kind": "osdu:petrel:regularheightfieldsurface:1.0.0", + "op": "create" + }, + { + "id": "osdu:abc:345", + "kind": "osdu:petrel:regularheightfieldsurface:1.0.1", + "op": "update", + "previousVersionKind": "osdu:petrel:regularheightfieldsurface:1.0.0" + }, + { + "id": "osdu:abc:567", + "kind": "osdu:petrel:regularheightfieldsurface:1.0.0", + "op": "delete", + "deletionType": "soft" + }, + { + "id": "osdu:abc:789", + "kind": "osdu:petrel:regularheightfieldsurface:1.0.0", + "op": "delete", + "deletionType": "hard" + } + ] + }, + { + "name": "schemachangedtopic", + "description": "This notification is sent whenever a new schema is created or updated via schema-service.", + "state": "ACTIVE", + "example": [ + { + "kind": "osdu:wks:wellbore:1.0.0", + "op": "update" + }, + { + "kind": "osdu:wks:wellbore:2.0.0", + "op": "create" + } + ] + }, + { + "name": "statuschangedtopic", + "description": "Every Service/Stage would publish their respective status changed information in this topic.", + "state": "ACTIVE", + "example": [ + { + "kind": "status", + "properties": { + "correlationId": "12345", + "recordId": "osdu:file:3479d828-a47d-4e13-a1f8-9791a19e1a7e", + "recordIdVersion": "1610537924768407", + "stage": "STORAGE_SYNC", + "status": "FAILED", + "message": "acl is not valid", + "errorCode ": 400, + "timestamp ": 1622118996000 + } + }, + { + "kind": "dataSetDetails", + "properties": { + "correlationId": "12345", + "dataSetId": "12345", + "dataSetIdVersion": "1", + "dataSetType": "FILE", + "recordCount": 10, + "timestamp ": 1622118996000 + } + } + ] + } ] ``` @@ -657,6 +701,5 @@ properties: ## Current Limitations <a name="limitation"></a> - There is no filtering applied on messages (such as based on the kind etc.) at the moment in OSDU. All the messages will be pushed to consumers. -- Updates to existing records are notified as `create` event with attribute `recordUpdated` set to true. [Back to Table of Contents](#TOC)