ActivityStreams JSON is now used for message bodies of transmitted events.
The new ActivityStreams based JSON-LD uses proper actor values for emitted messages.
Fedora generates event messages when a resource is created, updated or deleted.
The messages are composed for headers and body.
Message Headers
Header | Description | Values | Sample Value |
---|---|---|---|
org.fcrepo.jms.user | The Fedora user who made the change. | bypassAdmin | |
org.fcrepo.jms.eventID | A UUID associated with the event | urn:uuid:2096784f-8915-4f76-9114-10f516553554 | |
org.fcrepo.jms.identifier | The identifier portion of the URI of the changed resource | /test1 | |
org.fcrepo.jms.timestamp | Timestamp in epoch time (milliseconds since January 1st, 1970) | 1524580811763 | |
org.fcrepo.jms.baseURL | The base portion of the identifiers URI. | http://localhost:8080/rest | |
org.fcrepo.jms.resourceType | A comma separated list of URIs identifying the types that describe the resource that changed. | http://www.w3.org/ns/ldp#Container, http://fedora.info/definitions/v4/repository#Resource, http://fedora.info/definitions/v4/repository#Container, http://www.w3.org/ns/ldp#RDFSource, http://www.w3.org/ns/ldp#BasicContainer | |
org.fcrepo.jms.eventType | A comma separated list of URIs identifying the event types that describe the resource that changed. | https://www.w3.org/ns/activitystreams#Create, https://www.w3.org/ns/activitystreams#Update | https://www.w3.org/ns/activitystreams#Create, https://www.w3.org/ns/activitystreams#Update |
org.fcrepo.jms.userAgent | The type of client user agent that was used to effect the change to the resource. | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.117 Safari/537.36 |
Notifications Events:
For every resource whose state is changed as a result of an HTTP operation, there must be a corresponding notification made available describing that change.
Examples
{ "@context": "https://www.w3.org/ns/activitystreams", "id": "urn:uuid:3c834a8f-5638-4412-aa4b-35ea80416a18", "type": "Create", "name": "Resource Creation", "actor": "http://example.org/agent/fedoraAdmin", "object": { "id": "http://example.org/fcrepo/rest/resource/path", "type": [ "ldp:Container", "ldp:RDFSource" ] } }
{ "@context": [ "https://www.w3.org/ns/activitystreams", { "isPartOf": { "@id": "http://purl.org/dc/terms/isPartOf", "@type": "@id" } } ], "id": "urn:uuid:be29ae69-2134-f1b0-34be-2f91b6d1f029", "type": "Update", "name": "Resource Modification", "published": "2016-07-04T13:46:39Z", "inbox": "http://example.org/ldn/inbox/path", "actor": [ { "id": "#actor0", "type": "Person", "name": "fedo raAdmin" }, { "id": "#actor1", "type": "Service", "name": "APIX-core/0.1" } ], "object": { "id": "http://example.org/fcrepo/rest/resource/path", "updated": "2016-07-04T13:44:39Z", "type": [ "ldp:Container", "ldp:RDFSource", "http://example.org/type/CustomType" ], "isPartOf": "http://example.org/fcrepo/rest/" } }