Archived

If you are looking for the last documentation in the 4.x series, see 4.7.5. Looking for another version? See all documentation.

Fedora generates event messages when a resource is created, updated or deleted.

The messages are composed for headers and body.  

Message Headers

HeaderDescriptionValuesSample 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:d0f9d030-8fac-474c-882c-0858a7f948ef
org.fcrepo.jms.identifier
The identifier portion of the URI of the changed resource
/test1234
org.fcrepo.jms.timestamp
Timestamp in epoch time (milliseconds since January 1st, 1970)
1519419333657
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
org.fcrepo.jms.eventType
A comma separated list of URIs identifying the event types that describe the resource that changed.
http://fedora.info/definitions/v4/event#ResourceCreation
http://fedora.info/definitions/v4/event#ResourceModification
http://fedora.info/definitions/v4/event#ResourceDeletion
http://fedora.info/definitions/v4/event#ResourceCreation,
http://fedora.info/definitions/v4/event#ResourceModification
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_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36



Message Body

The format of the body is JSON-LD

Below is an example of a message emitted on resource creation.

{"id":"http://localhost:8080/rest/test1234",
 "type": [
	"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/prov#Entity"],
  "isPartOf":"http://localhost:8080/rest",
  "wasGeneratedBy":{"type":["http://fedora.info/definitions/v4/event#ResourceCreation",
                            "http://fedora.info/definitions/v4/event#ResourceModification",
                            "http://www.w3.org/ns/prov#Activity"],
                    "identifier":"urn:uuid:d0f9d030-8fac-474c-882c-0858a7f948ef",
                    "atTime":"2018-02-23T20:55:33.657Z"},
  "wasAttributedTo":[{"type":"http://www.w3.org/ns/prov#Person","name":"bypassAdmin"},
                     {"type":"http://www.w3.org/ns/prov#SoftwareAgent","name":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36"}],
  "@context":{"prov":"http://www.w3.org/ns/prov#",
              "foaf":"http://xmlns.com/foaf/0.1/",
              "dcterms":"http://purl.org/dc/terms/",
              "xsd":"http://www.w3.org/2001/XMLSchema#",
              "type":"@type",
              "id":"@id",
              "name":{"@id":"foaf:name","@type":"xsd:string"},
              "identifier":{"@id":"dcterms:identifier","@type":"@id"},
              "isPartOf":{"@id":"dcterms:isPartOf","@type":"@id"},
              "atTime":{"@id":"prov:atTime","@type":"xsd:dateTime"},
              "wasAttributedTo":{"@id":"prov:wasAttributedTo","@type":"@id"},
              "wasGeneratedBy":{"@id":"prov:wasGeneratedBy","@type":"@id"}
             }
}


Below is an example of a message emitted on resource update. 

{ ...
  "wasGeneratedBy":{"type":["http://fedora.info/definitions/v4/event#ResourceModification","http://www.w3.org/ns/prov#Activity"],
                    "identifier":"urn:uuid:d0f9d030-8fac-474c-882c-0858a7f948ef",
                    "atTime":"2018-02-23T20:55:33.657Z"},
  ...
}

Below is an example of a message emitted on resource deletion.


{ ...
  "wasGeneratedBy":{"type":["http://fedora.info/definitions/v4/event#ResourceDeletion","http://www.w3.org/ns/prov#Activity"],
                    "identifier":"urn:uuid:d0f9d030-8fac-474c-882c-0858a7f948ef",
                    "atTime":"2018-02-23T20:55:33.657Z"},
  ...
}


See :

How to Inspect Event Messages Generated by Fedora