Notification Pattern

Acknowledge and Accept

Description: This pattern is used to acknowledge and accept a request (offer). This should be interpreted to mean that the target intends to act on the request in some way. It does not imply any kind of outcome beyond this.
Pattern Categories: Acknowledgements

Properties

@context

The @context must include:

id

Notify payloads must describe an AS 2.0 activity. The activity has an id which must be a URI, and the use of URN:UUID is recommended. An HTTP URI may be used instead, but in such cases the URI should resolve to a useful resource.

type

The activity has a type with the value Accept

actor

The actor describes the party responsible for this activity. The actor has:

  • An id which must be a URI identifying the actor (HTTP URIs are preferred, but any valid URI is permitted)
  • A type which should be one of: Application, Group, Organization, Person or Service from AS 2.0.
  • The actor may also have a name

origin

The origin describes the system which has sent the notification. The origin has:

  • An id which is an HTTP URI identifying the sending system
  • A type which should include the value Service from AS 2.0.
  • An inbox which is the HTTP URI of the LDN inbox for the origin

inReplyTo

This particular example has the following properties:

inReplyTo is specified because this is a response to a previous notification. inReplyTo takes the URI (URN:UUID or HTTP URI) which identifies the activity for which this is a response.

context

When the object describes the result of some service acting on a resource, the context may be used to refer to that second resource. This particular example has the following properties:

  • An id which identifies the resource which was the object of the original offer.
  • An ietf:cite-as which contains the persistent HTTP URI (sometimes called the "PID") which is to be used to cite or link to the object of the original offer.
  • A type describing the content file.

object

The object describes the resource which is the main focus of this notification. This particular example has the following properties:

  • An id which identifies the original offer activity which this notification is acknowledging.
  • An object which identifies the resource which was the object of the original offer
  • The type which is Offer

target

The target describes the system which is intended to receive the notification. The target has:

  • An id which is an HTTP URI identifying the receiving system
  • A type which should include the value Service from AS 2.0.
  • An inbox which is the HTTP URI of the LDN inbox for the target

Example JSON-LD Payload

{
  "@context": [
    "https://www.w3.org/ns/activitystreams",
    "https://purl.org/coar/notify"
  ],
  "actor": {
    "id": "https://generic-service.com",
    "name": "Generic Service",
    "type": "Service"
  },
  "context": {
    "id": "https://some-organisation.org/resource/0021",
    "ietf:cite-as": "https://doi.org/10.4598/12123487",
    "type": "Document"
  },
  "id": "urn:uuid:4fb3af44-d4f8-4226-9475-2d09c2d8d9e0",
  "inReplyTo": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd",
  "object": {
    "id": "urn:uuid:0370c0fb-bb78-4a9b-87f5-bed307a509dd",
    "object": "https://some-organisation.org/resource/0021",
    "type": "Offer"
  },
  "origin": {
    "id": "https://generic-service.com/system",
    "inbox": "https://generic-service.com/system/inbox/",
    "type": "Service"
  },
  "target": {
    "id": "https://some-organisation.org",
    "name": "Some Organisation",
    "type": "Organization"
  },
  "type": "Accept"
}

Example scenarios which use this pattern

ID Scenario Participating Systems
5 Repository requests review (on behalf of corresponding author) Repository <-> Review Service