Retrieving Content

The TrustID Cloud provides mechanisms to retrieve individual content data such as applications, individual documents, or images.

Retrieving Applications

Individual applications can be retrieved separately as shown below:

Request

POST {{server}}/VPE/dataAccess/retrieveDocumentContainer/
Content-Type: application/json

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "ContainerId": "..."
}

For details, see the /dataAccess/retrieveDocumentContainer/ endpoint.

Response

This contains the actual data of the document container through the DocumentContainerResponse.Container property.

{
    "Success": true,
    "Message": "Operation executed successfully.",

    "Container": {
        ...
    }
}

The property RetrieveDocumentContainerRequest.ContainerId is the unique identifier of the document container retrieved through this endpoint.

Note

Document containers can be retrieved if the application has been archived. Applications cannot be retrieved while they are being constructed and before they are published.

The current user must have permission to retrieve the application.

Retrieving Documents

When a document container is retrieved, all data is self-contained within the application response message, including all the application’s documents. However, if required, individual documents can be retrieved separately as shown below:

Request

POST {{server}}/VPE/dataAccess/retrieveDocument/
Content-Type: application/json

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "ContainerId": "...",
    "DocumentId": "..."
}

Response

{
    "Success": true,
    "Message": "Operation executed successfully.",

    "Document": {
        ...
    }
}

For endpoint details, see /dataAccess/retrieveDocument/.

The response contains the actual data of the document through the DocumentResponse.Document property.

Note

Individual documents can be retrieved if the corresponding application has been archived. Documents cannot be retrieved while they are being constructed and the corresponding application has not been published.

The current user must have permission to retrieve the document.

Retrieving Image Data

There are two ways to retrieve the actual data of a document image.

Method 1

Request

POST {{server}}/VPE/dataAccess/retrieveImage/
Content-Type: application/json

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "ImageId": "..."
}

For endpoint details, see /dataAccess/retrieveImage/.

The only argument required for this endpoint is the unique identifier of the image. The response is a data stream representing the binary image data.

Method 2

Here the image is received by using a simple GET request that makes it possible to embed the resulting URL using an HTML IMG tag:

Request:

<img src="{{server}}/VPE/dataAccess/image/?id=...&DeviceId=...&SessionId=..." alt="">

For details see /dataAccess/image/.

Note

In method 2 security-related properties such as the device identifier and session identifier may be exposed as GET arguments. If the connection is over HTTPS, all headers and GET arguments are encrypted but GET arguments may still appear in the web server log files and/or in the browser history.

If there is an error the response may be an empty data stream.

PDF Report

The TrustID Cloud can generate a PDF-based assessment report for an application. This summarises the application and document data.

There are two ways to generate a PDF report for an application.

Method 1

Request

POST {{server}}/VPE/dataAccess/exportPDF/
Content-Type: application/json

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "ContainerId": "..."
}

For endpoint details, see /dataAccess/exportPDF/.

The response is a binary data stream that represents a PDF file.

Method 2

A PDF report can be downloaded directly by using a simple GET request with the /dataAccess/downloadPDF/ endpoint. This endpoint makes it possible to embed a download link within an HTML document, for example:

Download link:

<a href="{{server}}/VPE/dataAccess/downloadPDF/?id=...&DeviceId=...&SessionId=..."download>Download PDF </a>

Note

In method 2 security-related properties such as the device identifier and session identifier may be exposed as GET arguments. If the connection is over HTTPS, all headers and GET arguments are encrypted but GET arguments may still appear in log files of the web server and/or in the history of the browser.

The response may be an empty data stream if there is an error condition.

Retrieving Branches

Each user of the TrustID system is allocated to a branch. Obtain a list of all branches configured on the system as shown below.

This may be useful if you are submitting queued applications, or you need to search for applications on a branch basis.

Request

POST {{server}}/VPE/dataAccess/queryBranchesX/
Content-Type: application/json

{
    "DeviceId": "device-id",
    "SessionId": "..."
}

For endpoint details, see /dataAccess/queryBranchesX/.