PrizmDoc Viewer v13.20 Release - Updated
API Reference / PAS REST API / Viewer Support / Legacy Create Session
In This Topic
    Legacy Create Session
    In This Topic

    Introduction

    DEPRECATED: The legacy create session REST API is deprecated in PAS and is available for backwards compatibility only. Please use the newer viewing sessions REST API instead.

    Available URLs

    URL Description
    GET /CreateSession?document={document name} Creates a viewing session based on a specific document in storage.
    GET /CreateSession?form={formDefinitionId} Creates a viewing session for the document referenced by a form definition.

    GET /CreateSession?document={document name}

    Note that this URL is only available with PrizmDoc Viewer Self-Hosted.

    Routes key: LegacyCreateSession

    Creates a viewing session based on a specific document in storage.

    GET pas_base_url/CreateSession?document=Sample.doc
    

    To make the equivalent call using the new ViewingSession API:

    POST pas_base_url/ViewingSession
    Content-Type: application/json
    
    {
        "source": {
            "type": "document",
            "fileName": "Sample.doc"
        }
    }
    

    Successful Response

    HTTP/1.1 200 OK
    Content-Type: application/json
    
    {
        "viewingSessionId": "XYZ..."
    }
    
    

    Error Responses

    When the document does not exist:

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

    When an unknown error occurs while gathering data:

    HTTP/1.1 580 Server Error
    Content-Type: application/json
    
    {
        "errorCode": "InternalError"
    }
    
    

    GET /CreateSession?form={formDefinitionId}

    Note that this URL is only available with PrizmDoc Viewer Self-Hosted.

    Routes key: LegacyCreateSession

    Creates a viewing session for the document referenced by a form definition.

    GET pas_base_url/CreateSession?form=03f3e9c4a976419da576276acc427700
    

    There is no equivalent to this call in the new ViewingSession API. Instead, the user should refer to the templateDocumentId field in the form definition JSON object, and use it as a document to create a viewing session.

    Error Responses

    When the form definition does not exist:

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

    When the document referenced by the form definition does not exist:

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

    When an unknown error occurs while gathering data:

    HTTP/1.1 580 Server Error
    Content-Type: application/json
    
    {
        "errorCode": "InternalError"
    }