Old Release

This documentation covers an old version of Fedora. Looking for another version? See all documentation.

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Fedora generates event messages when a resource is created, updated or deleted. The messages are composed for headers and body. ActivityStreams JSON is now used for message bodies of transmitted events. The new ActivityStreams based JSON-LD uses proper actor values for emitted messages.

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: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#Delete

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

Message Body

The format of the body is JSON-LD.  

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

{
	"id": "urn:uuid:2096784f-8915-4f76-9114-10f516553554",
	"type": ["Create", "Update"],
	"name": "create resource, update resource",
	"published": "2018-04-24T14:40:11.763Z",
	"actor": [{
		"type": ["Person"],
		"id": "info:fedora/local-user#bypassAdmin"
	}, {
		"type": ["Application"],
		"name": "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"
	}],
	"object": {
		"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/ldp#BasicContainer", "http://www.w3.org/ns/prov#Entity"],
		"id": "http://localhost:8080/rest/test1",
		"isPartOf": "http://localhost:8080/rest"
	},
	"@context": ["https://www.w3.org/ns/activitystreams", {
		"prov": "http://www.w3.org/ns/prov#",
		"dcterms": "http://purl.org/dc/terms/",
		"type": "@type",
		"id": "@id",
		"isPartOf": {
			"@id": "dcterms:isPartOf",
			"@type": "@id"
		}
	}]
}

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

{
	"id": "urn:uuid:b511e8bc-add1-47ac-bb6c-20e068b424fc",
	"type": ["Update"],
	"name": "update resource",
	"published": "2018-04-24T17:58:49.495Z",
	"actor": [{
		"type": ["Person"],
		"id": "info:fedora/local-user#bypassAdmin"
	}, {
		"type": ["Application"],
		"name": "curl/7.54.0"
	}],
	"object": {
		"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/ldp#BasicContainer", "http://www.w3.org/ns/prov#Entity"],
		"id": "http://localhost:8080/rest/8e/5c/ce/65/8e5cce65-8272-4046-beb0-b7992bf07828",
		"isPartOf": "http://localhost:8080/rest"
	},
	"@context": ["https://www.w3.org/ns/activitystreams", {
		"prov": "http://www.w3.org/ns/prov#",
		"dcterms": "http://purl.org/dc/terms/",
		"type": "@type",
		"id": "@id",
		"isPartOf": {
			"@id": "dcterms:isPartOf",
			"@type": "@id"
		}
	}]
}

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

{
	"id": "urn:uuid:31410238-7a73-4014-a457-1b6d7df5adac",
	"type": ["Delete"],
	"name": "delete resource",
	"published": "2018-04-24T17:51:15.968Z",
	"actor": [{
		"type": ["Person"],
		"id": "info:fedora/local-user#bypassAdmin"
	}, {
		"type": ["Application"],
		"name": "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"
	}],
	"object": {
		"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/ldp#BasicContainer", "http://www.w3.org/ns/prov#Entity"],
		"id": "http://localhost:8080/rest/test1",
		"isPartOf": "http://localhost:8080/rest"
	},
	"@context": ["https://www.w3.org/ns/activitystreams", {
		"prov": "http://www.w3.org/ns/prov#",
		"dcterms": "http://purl.org/dc/terms/",
		"type": "@type",
		"id": "@id",
		"isPartOf": {
			"@id": "dcterms:isPartOf",
			"@type": "@id"
		}
	}]
}



  • No labels