PrizmDoc Viewer v13.6 - Updated
Markup Layers
API Reference > PAS API > Markup Layers

Introduction

Available URLs

URL Description
GET /MarkupLayers/u{viewingSessionId} Gets the list of all available markup layers for the particular document.
POST /MarkupLayers/u{viewingSessionId} Creates a new markup layer using the provided data.
GET /MarkupLayers/u{viewingSessionId}/{layerRecordId} Gets a particular layer record from the server.
PUT /MarkupLayers/u{viewingSessionId}/{layerRecordId} Updates an existing markup layer record with new data. This will overwrite all old data with the new uploaded data.
DELETE /MarkupLayers/u{viewingSessionId}/{layerRecordId} Deletes a markup layer record from the server.

GET /MarkupLayers/u{viewingSessionId}

Routes key: GetMarkupLayers

Gets the list of all available markup layers for the particular document.

GET pas_base_url/MarkupLayers/u1234

Successful Response

HTTP/1.1 200 OK
Content-Type: application/json

[
    {
        "name": "layer name 1",
        "layerRecordId": "2fee93fadf2ed11df",
        "originalXmlName": ""
    },
    {
        "name": "layer name 2",
        "layerRecordId": "32f993b09fb0f2236",
        "originalXmlName": ""
    }
]

Error Responses

When the document cannot be identified based on the viewing session:

HTTP/1.1 502 Bad Gateway
Content-Type: application/json

{
    "errorCode": "BadGateway"
}

When an unknown error occurs while gathering data:

HTTP/1.1 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 pas_base_url/MarkupLayers/u1234
Content-Type: application/json

{
    "name": "layer name 1",
    "comments": [],
    "data": {},
    "marks": [{ array of mark objects }]
}

Successful Response

HTTP/1.1 201 Created
Content-Type: application/json

{
    "layerRecordId": "2fee93fadf2ed11df"
}

Error Responses

When the document cannot be identified based on the viewing session:

HTTP/1.1 502 Bad Gateway
Content-Type: application/json

{
    "errorCode": "BadGateway"
}

When an unknown error occurs while gathering data:

HTTP/1.1 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 pas_base_url/MarkupLayers/u1234/2fee93fadf2ed11df

Successful Response

HTTP/1.1 200 OK
Content-Type: application/json

{
    ...markup layer data...
}

Error Responses

When the markup layer record does not exist:

HTTP/1.1 404 Not Found
Content-Type: application/json

{
    "errorCode": "NotFound"
}

When the document cannot be identified based on the viewing session:

HTTP/1.1 502 Bad Gateway
Content-Type: application/json

{
    "errorCode": "BadGateway"
}

When an unknown error occurs while gathering data:

HTTP/1.1 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 pas_base_url/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 pas_base_url/MarkupLayers/u1234/2fee93fadf2ed11df
Content-Type: application/json
X-HTTP-Method-Override: PUT

Successful Response

HTTP/1.1 200 OK

Error Responses

When the markup layer record does not exist:

HTTP/1.1 404 Not Found
Content-Type: application/json

{
    "errorCode": "NotFound"
}

When the document cannot be identified based on the viewing session:

HTTP/1.1 502 Bad Gateway
Content-Type: application/json

{
    "errorCode": "BadGateway"
}

When an unknown error occurs while gathering data:

HTTP/1.1 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 pas_base_url/MarkupLayers/u1234/2fee93fadf2ed11df

Alternatively, the POST method is supported for this request in combination with an X-HTTP-Method-Override header, as such:

POST pas_base_url/MarkupLayers/u1234/2fee93fadf2ed11df
X-HTTP-Method-Override: DELETE

Successful Response

HTTP/1.1 204 No Content

Error Responses

When the markup layer record does not exist:

HTTP/1.1 404 Not Found
Content-Type: application/json

{
    "errorCode": "NotFound"
}

When the document cannot be identified based on the viewing session:

HTTP/1.1 502 Bad Gateway
Content-Type: application/json

{
    "errorCode": "BadGateway"
}

When an unknown error occurs while gathering data:

HTTP/1.1 580 Server Error
Content-Type: application/json

{
    "errorCode": "InternalError"
}