Examples

PATCH /api/v2/annotations/1
{
  "data": {
    "id": "1",
    "type": "annotations",
    "attributes": {
      "message": "MyString",
      "annotable-attribute": "executive_summary",
      "section-id": "30",
      "is-starred": true,
      "is-secret": false,
      "created-at": "2017-08-29 10:49:03 +0800"
    },
    "relationships": {
      "annotator": {
        "data": {
          "type": "annotators",
          "id": "888"
        }
      },
      "annotable": {
        "data": {
          "type": "annotables",
          "id": "150"
        }
      }
    }
  }
}
401
{
  "errors": [
    {
      "title": "You are not authorized to access this request"
    }
  ]
}

Params

Param name Description
id
required

Annotation ID

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hyphen(-) with no leading or trailing space.

data
required

Annotation information

Validations:

  • Must be a Hash

data[type]
optional

Validations:

data[attributes]
optional

Validations:

  • Must be a Hash

data[attributes][starred]
optional

Annotation is starred

Validations:

  • Must be one of: true, false.