PrizmDoc v13.3 - Updated
Markup Burners
API Reference > PrizmDoc Server RESTful API > Markup Burners

Markup Burners

The MarkupBurner APIs is designed to "burn" a markup into a document.

Available URLs

URL Description
POST /PCCIS/V1/MarkupBurner Creates and starts a new MarkupBurner.
GET /PCCIS/V1/MarkupBurner/{processId} Gets the status and result of an existing MarkupBurner.
POST /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner Starts a new MarkupBurner using the source document of a viewing session and a provided XML markup definitions file as input.
GET /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner/{processId} Gets the status of a MarkupBurner for a viewing session.
GET /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner/{processId}/Document?ContentDispositionFilename={ContentDispositionFilename} Gets the output result of a MarkupBurner process for a viewing session.

POST /PCCIS/V1/MarkupBurner

Creates and starts a new MarkupBurner.

A MarkupBurner represents a process that runs on the server to "burn" markup into a document. The "burning" process makes the markup definitions a permanent part of a document. The server process is started by this request then a response is sent. Use the GET /PCCIS/V1/MarkupBurner/{processId} URL below to get the status and results of an in-progress or completed MarkupBurner process.

The input required to create a MarkupBurner is two WorkFile objects; one representing the XML which defines the markup to burn, the other representing the source document on which to burn the markup. Refer to the work file API topic for more information.

A new document is created that contains the burned-in markup. The source document will not be modified. The new document will be made available by a new WorkFile ID.

By default, MarkupBurner objects will be automatically deleted 20 minutes after they are created.

Request

Request Headers

Name Description
Content-Type Must be application/json
Accusoft-Affinity-Token The affinityToken of the work files specified by input.documentFileId and input.markupFileId. Required when server clustering is enabled.

Request Body

In the request body, provide JSON containing the following properties:

Successful Response

Response Body

If successful, this method returns JSON containing the following properties:

Error Responses

Status Code Description
400 Bad Request, if input.documentFileId, input.markupFileId is missing or invalid format, or if minSecondsAvailable is not a number.
405 Method Not Allowed, if POST HTTP method is not used.

Examples

Creating a MarkupBurner

Request

POST prizmdoc_server_base_url/PCCIS/V1/MarkupBurner
Content-Type: application/json
Accusoft-Affinity-Token: ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=

{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "markupFileId": "aQ1BdViqmUisBuevJKO9Sw"
    },
    "minSecondsAvailable": 60
}

Response

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

{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "markupFileId": "aQ1BdViqmUisBuevJKO9Sw"
    },
    "expirationDateTime": "2014-12-17T20:38:39.796Z",
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "affinityToken": "ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=",
    "state": "processing",
    "percentComplete": 0,
    "errorCode": null,
    "output": null
}

GET /PCCIS/V1/MarkupBurner/{processId}

Gets the status and result of an existing MarkupBurner.

Requests can be sent to this URL repeatedly while state is "processing".

When state is "complete", the new document with burned-in annotations will be made available by a new WorkFile ID in the output.documentFileId. Refer to the work file API topic to find out how to download a WorkFile.

If the markup burning process encountered an error, the state property will be "error", the errorCode property will contain an error code string and output will be null.

Request

Request Headers

Name Description
Content-Type Must be application/json
Accusoft-Affinity-Token The affinityToken of the work files specified by input.documentFileId and input.markupFileId. Required when server clustering is enabled.

URL Parameters

Parameter Description
{processId} The id of the process.

Response Body

If successful, this method returns JSON containing the following properties:

Error Responses

Status Code Description
404 Not Found, if {processId} does not exist.
405 Method Not Allowed, if GET HTTP method is not used.

Examples

Request

GET prizmdoc_server_base_url/PCCIS/V1/MarkupBurner/ElkNzWtrUJp4rXI5YnLUgw
Accusoft-Affinity-Token: ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=

Response when the state is "processing"

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

{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "markupFileId": "aQ1BdViqmUisBuevJKO9Sw"
    },
    "expirationDateTime": "2014-12-17T20:38:39.796Z",
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "affinityToken": "ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=",
    "state": "processing",
    "percentComplete": 100,
    "errorCode": null,
    "output": null
}

Response when the state is "complete"

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

{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "markupFileId": "aQ1BdViqmUisBuevJKO9Sw"
    },
    "expirationDateTime": "2014-12-17T20:38:39.796Z",
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "affinityToken": "ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=",
    "state": "complete",
    "percentComplete": 100,
    "errorCode": null,
    "output": {
        "documentFileId": "vry3FPE0zQqYwhzndRccOQ"
    }
}

Response when the state is "error" because the work file that represents document to burn could not be found

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

{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "markupFileId": "aQ1BdViqmUisBuevJKO9Sw"
    },
    "expirationDateTime": "2014-12-17T20:38:39.796Z",
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "affinityToken": "ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=",
    "state": "error",
    "percentComplete": 0,
    "errorCode": "DocumentFileIdDoesNotExist"
}

Response when the state is "error" because the work file that represents markup file could not be found

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

{
    "input": {
        "documentFileId": "ek5Zb123oYHSUEVx1bUrVQ",
        "markupFileId": "aQ1BdViqmUisBuevJKO9Sw"
    },
    "expirationDateTime": "2014-12-17T20:38:39.796Z",
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "affinityToken": "ejN9/kXEYOuken4Pb9ic9hqJK45XIad9LQNgCgQ+BkM=",
    "state": "error",
    "percentComplete": 0,
    "errorCode": "MarkupFileIdDoesNotExist"
}

POST /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner

Starts a new MarkupBurner using the source document of a viewing session and a provided XML markup definitions file as input. When the asynchronous process is ultimately finished, the output will be a new document which includes the provided markup as part of the document itself (the original source document of the viewing session is left unaltered).

This is a specialized URL which allows you to do markup burning against the source file of an existing viewing session without needing to use the work file API.

This request merely begins the markup burning process. Once started, you poll the status of the process using the GET /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner/{processId} URL below to know when the process has completed.

Request

Request Headers

Name Description
Content-Type Specifies the type of content being provided to the markup burner process. Must be application/xml.

URL Parameters

Parameter Description
{viewingSessionId} The id provided in the response from POST /PCCIS/V1/ViewingSession.

Request Body

The body of the request should be XML defining the markup that needs to be burned into a copy.

Response Body

If successful, a JSON object which may contain:

Error Responses

Status Code Description
404 Not Found, if {viewingSessionId} does not exist.
405 Method Not Allowed, if POST HTTP method is not used.

Examples

Request

POST prizmdoc_server_base_url/PCCIS/V1/ViewingSession/uDLbVh9sTmXJAmd1GeXbS9Gn3WHxs8oib2xPsW2xEFjnIDdoJcudPtxciodSYFQq6zYGabQ_rJIecdbkImTTkSA/MarkupBurner
Content-Type: application/xml

<<XML markup data>>

Response

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

{
    "processId": "ElkNzWtrUJp4rXI5YnLUgw",
    "state": "processing",
    "percentComplete": 0,
    "errorCode": null,
    "output": null
}

GET /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner/{processId}

Gets the status of a MarkupBurner for a viewing session.

Requests are typically sent to this URL repeatedly as long as the state is "processing".

When state is "complete", a new document with the provided markup burned into it will be available at:

GET /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner/{processId}/Document

If an error occurred and the output could not be created, the state property will be "error" and the errorCode property will contain an error code string.

Request

URL Parameters

Parameter Description
{viewingSessionId} The id provided in the response from POST /ViewingSession.
{processId} The id of the process.

Response Body

If successful, a JSON object which may contain:

Error Responses

Status Code Description
404 Not Found, if either the {viewingSessionId} or {processId} do not exist.
405 Method Not Allowed, if GET method is not used.

Examples

Request

GET prizmdoc_server_base_url/PCCIS/V1/ViewingSession/uDLbVh9sTmXJAmd1GeXbS9Gn3WHxs8oib2xPsW2xEFjnIDdoJcudPtxciodSYFQq6zYGabQ_rJIecdbkImTTkSA/MarkupBurner/5rGUUh3Qxhf6VXm8RkBPfA

Response when the state is "processing"

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

{
    "processId": "5rGUUh3Qxhf6VXm8RkBPfA",
    "state": "processing",
    "percentComplete": 0,
    "errorCode": null,
    "output": null
}

Response when the state is "complete"

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

{
    "processId": "5rGUUh3Qxhf6VXm8RkBPfA",
    "state": "complete",
    "percentComplete": 100,
    "errorCode": null,
    "output": null
}

GET /PCCIS/V1/ViewingSession/u{viewingSessionId}/MarkupBurner/{processId}/Document?ContentDispositionFilename={ContentDispositionFilename}

Gets the output result of a MarkupBurner process for a viewing session.

Request

URL Parameters

Parameter Description
{viewingSessionId} The id provided in the response from POST /ViewingSession.
{processId} The id of the process which identifies the MarkupBurner task as a string.
{ContentDispositionFilename} The filename as a string, without extension, to use in the Content-Disposition header of the response (the file extension will automatically be added). The default value is "document"

Error Responses

Status Code Description
404 Not Found, which may occur if any of the following are true: the MarkupBurner has not completed yet or no such MarkupBurner exists or no such ViewingSession exists
405 Method Not Allowed, if GET method is not used.

Examples

Request

GET prizmdoc_server_base_url/PCCIS/V1/ViewingSession/uDLbVh9sTmXJAmd1GeXbS9Gn3WHxs8oib2xPsW2xEFjnIDdoJcudPtxciodSYFQq6zYGabQ_rJIecdbkImTTkSA/MarkupBurner/ElkNzWtrUJp4rXI5YnLUgw/Document

Response

HTTP/1.1 200 OK

<<PDF data>>