Skip to main content

Delete annotation

This API is responsible for soft deleting an annotation.

[DELETE]/api/v1/annotations/{id}

Response: The id of the deleted annotation.

Header

Header used on this API are those taken from header standards of TS Digital.

Content-type is accepted in application/json

Query Parameters

Parameters used to make a successful request.

  • id: Unique identifier associated with the annotation to be deleted. (required)

Body

No body is needed to make this request.

Response

On successful response

If successful, the API responds with HTTP code 200(OK) with the following body:

{
  "id": "string"
}
  • id: the unique identifier of the deleted annotation
On error response

In the event of an error, the API responds with a body JSON with the following format:

{
  "code": "string",
  "timestamp": "2022-10-28T13:01:00.754Z",
  "message": "string",
  "subErrors": [
    {}
  ]
}
  • code: A string representation of the HTTP error code, linked with the returned http error
  • timestamp: Date and time of the answer, expressed as a string.
  • message: Message expressing error.

Possible errors are:

  • 400: The request is malformed (parameters with incorrect format, invalid or inconsistent parameters).
  • 401: An authorization token has not been provided or the authorization token provided is invalid (eg: it has expired).
  • 403: The provided token is valid, but the user is not authorized to perform the operation.
  • 404: No annotation found with the given id.
  • 500: An unexpected error occurred.