Skip to main content

Meta Change Notifications

GET 

/qlibs/:qlibid/q/:qhit/watch/meta/:path

Subscribe to and retrieve notifications for content metadata updates for the given content and metadata path. This endpoint delivers notifications through Server-Sent Events (SSE).

  • if qhit is a content hash, the corresponding content ID is determined and watched for latest version changes
  • if the path ends in a link (relative or absolute), the link object itself is watched for changes, not the data that it points to
  • if the path contains relative links in non-leaf elements, they are traversed
  • if the path contains absolute links in non-leaf elements, the call fails with HTTP 400 Bad Request

Update notifications are delivered as JSON objects sent in data-only messages:

{
"qid": ":qid",
"latest": ":hash",
"target": "/meta/some/path",
"meta": {},
"error": {}
}

Per default, the metadata returned in the event's meta field is un-resolved, i.e. metadata links will not be resolved. However, the endpoint accepts most query parameters of Get Metadata Subtree and therefore link resolution can be enabled with resolve.

error is an optional field that is present only if metadata retrieval fails.

See the metadata section for more information on links.

Request

Responses

The subscription has succeeded. No data is returned initially. SSE events thereafter upon metadata change.