Skip to content

Activities

Jana Rajakumar edited this page Feb 21, 2018 · 5 revisions

Reference: https://iiif.library.utoronto.ca/presentation/v2/#!/Discovery_ActivityStreams/ActivityByIdGet

An Activity contains all the relevant information of the request and response. Each POST, PUT and DELETE request will log a corresponding activity which is later used to construct the Discovery Page.

(Example):

{
  "id": "http://localhost:8000/activity/5a381fe63b0eb74d720584d6",
  "username": "user",
  "requestPath": "/b28928118/manifest",
  "requestMethod": "POST",
  "remoteAddress": "127.0.0.1",
  "serverHostname": "Latitude",
  "requestBody": {
    "annotation": {
      "@id": "https://wellcomelibrary.org/iiif/b28928118/imageanno/8d2ad60b-1ca6-4a80-a0b1-b3aca48a62a1",
      "@type": "oa:Annotation",
      "motivation": "sc:painting",
      "resource": {
        "@id": "https://dlcs.io/iiif-img/wellcome/1/8d2ad60b-1ca6-4a80-a0b1-b3aca48a62a1/full/!1024,1024/0/default.jpg",
        "@type": "dctypes:Image",
        "format": "image/jpeg",
        "height": 1024,
        "width": 623
      },
      "on": "http://localhost:8000/b28928118/canvas/c0",
      "order": 1
    }
  },
  "responseBody": {
    "responseCode": 201,
    "responseBody": {
      "@id": "http://localhost:8000/book1/annotation/8d2ad60b-1ca6-4a80-a0b1-b3aca48a62a1",
      "@type": "oa:Annotation"
    }
  },
  "responseStatus": 200,
  "startTime": "2017-12-18T15:07:02.731",
  "endTime": "2017-12-18T15:07:02.993"
}

An Activity can be deleted by sending a DELETE request to /activity/{id}. This action can only be performed by an Admin user.

Similarly, all Activities can be deleted by sending a DELETE request to /activity. This action can only be performed by an Admin user.

Clone this wiki locally