PrizmDoc® v14.1 Release - Updated
PrizmDoc / API Reference / PAS REST API / Viewer Support / Image Stamps
In This Topic
    Image Stamps
    In This Topic

    Introduction

    The image stamps REST API is used by our viewer to load image stamps. It is unusual for your application to need to use this REST API.

    By default, a PAS installation contains two image stamps: a green check and a red X. To customize your image stamps, see Add Custom Image Stamps.

    Available URLs

    URL Description
    GET /ImageStampList Gets list of available image stamps.
    GET /ImageStamp/{imageStampId}/q?format={formatStr} Gets image data for an image stamp.

    GET /ImageStampList

    Routes key: GetImageStamps

    GET pas_base_url/ImageStampList
    
    

    NOTE: See the Base URL for PAS topic for more information.

    Successful Response

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        imageStamps : [
            { id: "ZmlsZTEuZ2lm", displayName: "file1.gif" },
            { id: "ZmlsZTIucG5n", displayName: "file2.png" }
        ]
    }
    
    

    GET /ImageStamp/{imageStampId}/q?format={formatStr}

    Routes key: GetImageStamp

    Gets image data for an image stamp. The query string parameter format defined the format of the response, and supports the following values:

    • Base64: Returns a JSON object containing the image as a base64 encoded string, as well as a hash of the original image.
    • Image: Returns the raw image file itself.

    The raw image file itself is returned if no format or an unsupported format is specified.

    Getting Base64 data

    GET pas_base_url/ImageStamp/ZmlsZTIucG5n/q?format=Base64
    
    

    NOTE: See the Base URL for PAS topic for more information.

    Successful Response

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "dataHash": "1ca8d2e80b6f8f2774f3bc0e6422bc653b0e4d80",
        "dataUrl": "data:image/png;base64,..."
    }
    
    

    Getting the image data

    GET pas_base_url/ImageStamp/ZmlsZTIucG5n/q?format=Image
    
    

    NOTE: See the Base URL for PAS topic for more information.

    Successful Response

    HTTP/1.1 200 OK
    Content-Type: {content type of the image}
    
    <<binary image data>>
    
    

    Error Responses

    When an invalid imageStampId is requested:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json
    
    {
        "errorCode": "BadRequest"
    }
    
    

    When a valid imageStampId is requested but it does not exist:

    HTTP/1.1 404 Not Found
    Content-Type: application/json
    
    {
        "errorCode": "NotFound"
    }