Update preview annotations

PUT /actions/preview-files/{preview_file_id}/update-annotations

Allow to modify the annotations stored at the preview level. Modifications are applied via three fields, additions to give all the annotations that need to be added, updates that list annotations that needs to be modified, and deletions to list the IDs of annotations that needs to be removed.

Path parameters

  • preview_file_id string(uuid) Required

    Preview file unique identifier

application/json

Body Required

  • additions array[object]

    Annotations to add

  • updates array[object]

    Annotations to update

  • deletions array[string(uuid)]

    Annotation IDs to remove

Responses

  • 200 application/json

    Preview annotations updated

    Hide response attributes Show response attributes object
    • id string(uuid)

      Preview file unique identifier

    • annotations array[object]

      Updated annotations

PUT /actions/preview-files/{preview_file_id}/update-annotations
curl \
 --request PUT 'http://api.example.com/actions/preview-files/a24a6ea4-ce75-4665-a070-57453082c25/update-annotations' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"additions":[{"x":100,"y":200,"type":"drawing"}],"updates":[{"x":150,"y":250,"id":"uuid"}],"deletions":["a24a6ea4-ce75-4665-a070-57453082c25"]}'
Request examples
{
  "additions": [
    {
      "x": 100,
      "y": 200,
      "type": "drawing"
    }
  ],
  "updates": [
    {
      "x": 150,
      "y": 250,
      "id": "uuid"
    }
  ],
  "deletions": [
    "a24a6ea4-ce75-4665-a070-57453082c25"
  ]
}
Response examples (200)
{
  "id": "a24a6ea4-ce75-4665-a070-57453082c25",
  "annotations": [
    {}
  ]
}