Markup Layers
GET /MarkupLayers/u{viewingSessionId}
Routes key: GetMarkupLayers
Gets the list of all available markup layers for the particular document.
GET http://localhost:3000/MarkupLayers/u1234
Successful Response:
200 OK
Content-Type: application/json
[
{
"name": "layer name 1",
"layerRecordId": "2fee93fadf2ed11df",
"originalXmlName": ""
},
{
"name": "layer name 2",
"layerRecordId": "32f993b09fb0f2236",
"originalXmlName": ""
}
]
Errored Responses:
When the document cannot be identified based on the viewing session:
502 Bad Gateway
Content-Type: application/json
{ "errorCode": "BadGateway" }
When an unknown error occurs while gathering data:
580 Server Error
Content-Type: application/json
{ "errorCode": "InternalError" }
POST /MarkupLayers/u{viewingSessionId}
Routes key: CreateMarkupLayer
Creates a new markup layer using the provided data.
POST http://localhost:3000/MarkupLayers/u1234
Content-Type: application/json
{
"name": "layer name 1",
"comments": [],
"data": {},
"marks": [{ array of mark objects }]
}
Successful Response:
201 Created
Content-Type: application/json
{ "layerRecordId": "2fee93fadf2ed11df" }
Errored Responses:
When the document cannot be identified based on the viewing session:
502 Bad Gateway
Content-Type: application/json
{ "errorCode": "BadGateway" }
When an unknown error occurs while gathering data:
580 Server Error
Content-Type: application/json
{ "errorCode": "InternalError" }
GET /MarkupLayers/u{viewingSessionId}/{layerRecordId}
Routes key: GetMarkupLayer
Gets a particular layer record from the server.
GET http://localhost:3000/MarkupLayers/u1234/2fee93fadf2ed11df
Successful Response:
200 OK
Content-Type: application/json
{ the markup layer data }
Errored Responses:
When the markup layer record does not exist:
404 Not Found
Content-Type: application/json
{ "errorCode": "NotFound" }
When the document cannot be identified based on the viewing session:
502 Bad Gateway
Content-Type: application/json
{ "errorCode": "BadGateway" }
When an unknown error occurs while gathering data:
580 Server Error
Content-Type: application/json
{ "errorCode": "InternalError" }
PUT /MarkupLayers/u{viewingSessionId}/{layerRecordId}
Routes key: UpdateMarkupLayer
Updates an existing markup layer record with new data. This will overwrite all old data with the new uploaded data.
PUT http://localhost:3000/MarkupLayers/u1234/2fee93fadf2ed11df
Content-Type: application/json
Alternatively, the POST
method is supported for this request in combination with an X-HTTP-Method-Override
header, as such:
POST http://localhost:3000/MarkupLayers/u1234/2fee93fadf2ed11df
Content-Type: application/json
X-HTTP-Method-Override: PUT
Successful Response:
200 OK
Errored Responses:
When the markup layer record does not exist:
404 Not Found
Content-Type: application/json
{ "errorCode": "NotFound" }
When the document cannot be identified based on the viewing session:
502 Bad Gateway
Content-Type: application/json
{ "errorCode": "BadGateway" }
When an unknown error occurs while gathering data:
580 Server Error
Content-Type: application/json
{ "errorCode": "InternalError" }
DELETE /MarkupLayers/u{viewingSessionId}/{layerRecordId}
Routes key: DeleteMarkupLayer
Deletes a markup layer record from the server.
DELETE http://localhost:3000/MarkupLayers/u1234/2fee93fadf2ed11df
Alternatively, the POST
method is supported for this request in combination with an X-HTTP-Method-Override
header, as such:
POST http://localhost:3000/MarkupLayers/u1234/2fee93fadf2ed11df
X-HTTP-Method-Override: DELETE
Successful Response:
204 No Content
Errored Responses:
When the markup layer record does not exist:
404 Not Found
Content-Type: application/json
{ "errorCode": "NotFound" }
When the document cannot be identified based on the viewing session:
502 Bad Gateway
Content-Type: application/json
{ "errorCode": "BadGateway" }
When an unknown error occurs while gathering data:
580 Server Error
Content-Type: application/json
{ "errorCode": "InternalError" }