diff --git a/directory.td.json b/directory.td.json index cbb30b21..657a02d1 100644 --- a/directory.td.json +++ b/directory.td.json @@ -393,19 +393,16 @@ "description": "TD registration events", "uriVariables": { "type": { - "title": "Event type", + "title": "Event type(s)", + "description": "Multiple types passed as type={type} pairs for SSE", "type": "string", "enum": [ - "created_td", - "updated_td", - "deleted_td" + "create", + "update", + "delete" ] }, - "td_id": { - "title": "Identifier of TD in directory", - "type": "string" - }, - "include_changes": { + "full": { "title": "Include TD changes inside event data", "type": "boolean" } @@ -413,60 +410,18 @@ "forms": [ { "op": "subscribeevent", - "href": "/events{?type,td_id,include_changes}", + "href": "/events{?type,full}", "subprotocol": "sse", "contentType": "text/event-stream", "htv:headers": [ { - "description": "ID of the last event for reconnection", - "htv:fieldName": "Last-Event-ID", - "htv:fieldValue": "" + "description": "ID of the last event provided by reconnecting clients", + "htv:fieldName": "Last-Event-ID" } ], "data": { - "oneOf": [ - { - "type": "object", - "description": "The schema of event data", - "properties": { - "td_id": { - "type": "string", - "format": "iri-reference", - "description": "Identifier of TD in directory" - } - } - }, - { - "type": "object", - "description": "The schema of create event data including the created TD", - "properties": { - "td_id": { - "type": "string", - "format": "iri-reference", - "description": "Identifier of TD in directory" - }, - "td": { - "type": "object", - "description": "The created TD in a create event" - } - } - }, - { - "type": "object", - "description": "The schema of the update event data including the updates to TD", - "properties": { - "td_id": { - "type": "string", - "format": "iri-reference", - "description": "Identifier of TD in directory" - }, - "td_updates": { - "type": "object", - "description": "The partial TD composed of modified TD parts in an update event" - } - } - } - ] + "description": "Partial or complete TD", + "type": "object" }, "scopes": "notifications" } diff --git a/index.html b/index.html index d6e5aa34..6a6da6b2 100644 --- a/index.html +++ b/index.html @@ -1291,11 +1291,7 @@

Management

Notification

-

- The query and payload specification are subject to change for - simplification and consistency with other API features - (e.g. Anonymous TD, partial TD format [[RFC7396]]). -

+

The Notification API is to notify clients about the changes to Thing Descriptions maintained within the directory. @@ -1312,17 +1308,19 @@

Notification

Event Types
- The server MUST produce events for creation, update, and deletion of - Thing Descriptions represented by `created_td`, `updated_td`, `deleted_td` - keywords respectively. + The server MUST produce events attributed to the lifecycle of + the Thing Descriptions within the directory using + `create`, `update`, and `delete` event types.
Event Filtering
- The API supports server-side filtering of events to reduce resource consumption + The API enables server-side filtering of events to reduce resource consumption by delivering only the events required by clients. - The filtering is based on query parameters passed to the server at + Client libraries may offer additional filtering capabilities on + the client-side. + The server-side filtering is based on query parameters passed to the server at connection time. The filtering behavior is described below:
@@ -1361,34 +1361,100 @@

Notification

The event data MUST contain the JSON serialization of the event object. - The event data object is defined by the following rules: + The event data object is a Partial TD or the whole TD object + depending on the request: