Archive

The archive contains all applications that have been archived and on which a final assessment decision has been made.

The archive can list individual documents, based on a search query. Since the archive may contain a lot of documents, results are generally paginated if the underlying system supports it.

See also

Querying Containers for details of how the archive can also be represented as a list of applications.

Note

In order to access the archive, a user must have administrator or archive privileges.

This example shows how to retrieve the content of the archive from the TrustID Cloud:

Request

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

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

For endpoint details, see /dataAccess/advancedQuery/.

Response

{
    "Success": true,
    "Message": "Operation executed successfully.",
    "Documents": [
        ...
    ],
    "Page": 0,
    "PageSize": 250,
    "PaginationSupported": false,
    "TotalPages": 1,
    "TotalRecords": 12,
    "TotalRecordsMatched": 12
}

The TrustID Cloud responds by providing a list of documents that match the archive query. By default, all archived documents are returned. The result might be paginated and information about the current page and page size are provided in the following result properties:

ArchiveQueryResponse.Page

The page number requested (starting with 0).

ArchiveQueryResponse.PageSize

The number of records per page.

ArchiveQueryResponse.PaginationSupported

true if pagination is supported. If this is false then only the first page is returned.

ArchiveQueryResponse.TotalPages

The total number of pages.

ArchiveQueryResponse.TotalRecords

The total number of records in the system.

ArchiveQueryResponse.TotalRecordsMatched

The total number of records that matched all the filters provided.

Quick Query Filter

Instead of returning all documents within the archive, query arguments can be used to filter documents.

The following example uses a general filter which is applied to all common document properties, such as name-related fields and/or document number.

Request

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

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "Arguments": {
        "QuickQuery": "Banderas"
    }
}

For endpoint details, see /dataAccess/advancedQuery/.

Note

The filter is generally case-insensitive and yields all resulting documents where the filter criteria are contained within specific document properties.

See also

Additional Filters for more information on the available query properties.

Date Range Filter

Query results can be filtered by date range as shown below, based on the date when a document was scanned or created:

Request

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

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "RangeFrom": "/Date(...)/",
    "RangeUntil": "/Date(...)/"
}

For endpoint details, see /dataAccess/advancedQuery/.

Note

When using a range-based filter, one (or both) of the date boundaries can be omitted in order to search only for documents that meet one boundary condition.

Operator Filter

Results can be filtered on the basis of the operator who originally scanned or created a document. Set the ScannedBy query argument to the operator’s username, as shown below:

Request

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

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "Arguments": {
        "ScannedBy": "admin"
    }
}

For endpoint details, see /dataAccess/advancedQuery/.

You can list all available usernames of all operators of the system, as shown below:

Request

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

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

For endpoint details, see /dataAccess/advancedQuery/.

Additional Filters

The TrustID Cloud provides a number of additional filter options that are outside of the scope of this documentation. However, the following list of additional filter properties provides a starting point for implementing additional filter criteria.

Each filter property can be specified as follows:

Property

Filters documents based on:

Status

Document status (operator or auditor status).

Mrz

The Machine-Readable Zone (MRZ).

Audited

Whether audited (or not).

MRZCorrected

Whether the MRZ has been corrected manually.

MinAgeFailed

Whether minimum age validation failed.

MaxAgeFailed

Whether maximum age validation failed.

Firstname

First name.

Middlename

Middle name(s).

Lastname

Last name(s).

NationalityCode

Document holder’s nationality.

IssuingCountryCode

Document’s issuing country.

PersonalNumber

Personal number.

Gender

Document holder’s gender.

DocumentNumber

Document number.

VisaNumber

Visa number.

DocumentType

Document type (e.g. Passport, Visa etc).

BranchName

Branch.

AuditedBy

Operator who audited a document.

ExpiryDate

Expiry date of the document.

FilterExpiryDateOption

Declares how the expiry date filter is matched.

DateOfBirth

Date of birth of the document holder.

FilterDateOfBirthDateOption

Declares how the DateOfBirth filter is matched.

CustomFields

Document-level custom fields.

Result Sorting

Results can be sorted by individual columns as shown below:

Request

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

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "DocumentSortingColumn": "ScanDate",
    "SortingDirection": "Descending"
}

The properties DocumentSortingColumn and SortingDirection control the column and the sorting direction

The result can be sorted by the following columns:

Sorting column

Value

Sort by:

DocumentSortingColumn.ApplicantName

ApplicantName

Applicant name.

DocumentSortingColumn.DocumentType

DocumentType

Document type.

DocumentSortingColumn.ScanDate

ScanDate

Scanned/created date.

The result can be sorted in ascending or descending order:

Sorting Direction

Value

Sort by:

SortingDirection.Ascending

Ascending

Ascending order.

SortingDirection.Descending

Descending

Descending order (reversed).

See the /dataAccess/advancedQuery/ endpoint reference.

Query Pagination

The archive may contain a lot of documents (depending on your specific requirements), which is why the TrustID Cloud returns a paginated result if possible.

When a result is requested, only a certain subset of the entire dataset is returned. By default, the first page (0) is returned. The maximum page size is 250 records, which is the default if PageSize is omitted.

The current page and the requested page size can be specified as arguments to the request message as shown below. Below we requested the second page (page 1), based on a page size of 30 records per page.

Request

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

{
    "DeviceId": "device-id",
    "SessionId": "...",
    "Page": 1,
    "PageSize": 30
}

For endpoint details, see /dataAccess/advancedQuery/.

The response contains the following useful information about the actual page and page size:

ArchiveQueryResponse.Page

The actual page number returned (starting with 0). This might not be the page number originally specified.

ArchiveQueryResponse.PageSize

The actual page size used by the system. This might not be the page size originally specified.

ArchiveQueryResponse.TotalPages

The total number of pages in the system, based on the page size used.

Note

The system may change the current page and/or page size if the provided values are out of range.

The maximum number of records per page is 250 records.

Pagination Support

Some TrustID Cloud installations may not provide pagination, depending on the underlying database used.

If pagination is not supported, the response from the /dataAccess/advancedQuery/ endpoint indicates this using the ArchiveQueryResponse.PaginationSupported property, which is true if pagination is supported, otherwise false.

In addition, the configuration object included in the login response indicates whether pagination is supported, as shown below:

Request

POST {{server}}/VPE/session/login/
Content-Type: application/json

{
    "DeviceId": "device-id",
    "Username": "admin",
    "Password": "********"
}

Response

This includes the configuration data:

{
    "Success": true,
    "Message": "Operation executed successfully.",
    "Configuration": [
        {
            "Key": "support.pagination",
            "Value": "False"
        },
    ],
    ...
}

Note

If pagination is not supported the TrustID Cloud always returns the first page, regardless of the provided page argument.

Querying Containers

Instead of querying and yielding documents from the archive, entire containers can be searched. Results can be paginated as described above.

The following example shows how applications are queried:

Request

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

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

See the /dataAccess/archiveContainerQuery/ endpoint reference.

Request

The TrustID Cloud responds with a list of document containers that match the archive query:

{
    "Success": true,
    "Message": "Operation executed successfully.",
    "Containers": [
        ...
    ],
    "Page": 0,
    "PageSize": 250,
    "PaginationSupported": false,
    "TotalPages": 1,
    "TotalRecords": 8,
    "TotalRecordsMatched": 8
}

Querying using application-level custom fields

When querying against applications, a number of search criteria can be specified against application-level custom fields. This is shown below:

Request

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

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

    "FlexibleFieldSearchSpecifications": [{
           "__type": "FlexibleFieldSearchIntegerValues:#TT.Models",
           "FlexibleFieldName": "jobApplicationId",
           "IntExactMatchList": ["4088", "4089", "3790"]
     },
     {
           "__type": "FlexibleFieldSearchStringValues:#TT.Models",
           "FlexibleFieldName": "departmentName",
           "StringExactMatchList": ["IT", "HR"]
     }]
}

Here the /dataAccess/archiveContainerQuery/ endpoint is used to search against application-level custom fields.

See also

FlexibleFieldSearchSpecification for more information about how to specify different search criteria.