Open Dashboard
This endpoint allows you to open directly a number of Xtracta App document-related dashboards. This can be useful if you want to quickly enable features such as rejection handling without having to build out your own interface.
Key Benefits:
- Users do not need to separately login – they can open UIs already logged in and browsed directly to where they need to be
- The UI is cut down from the full dashboard – only show users what they need to see
- You can quickly build out your integration with the Xtracta App and your application – while maintaining an interface which feels just like it's part of what the user is using (using the re-branding capabilities of the Xtracta App)
POST Parameters
| Parameter | Required | Value | Description |
|---|---|---|---|
api_key | {key} | An API key that has access to the resource you want to query for | |
workflow_id | {integer} | The ID of the workflow you wish to open the dashboard for | |
document_status | indexing, qa, reject | The status of the documents you wish to show. Usually this is set to reject | |
fields | {string} | Comma separated field names to show the value of against each returned document. Use only lowercase letters, dashes (-), and underscores (_) | |
expire | {integer} | Length of time (in seconds) the returned URL will be valid before it expires. Max: 259200 (3 days), Default: 600 (10 min) | |
document_expire | {integer} | Time in seconds the document URL is valid. Max: 259200, Default: 600 | |
no_lockout | 1, {null} | If set to 1, forces the document to open even if another user has it open. Normally, two users can't open the same doc simultaneously | |
page | {integer} | Page number to start on if pagination occurs | |
items_per_page | {integer} | Max number of documents per page. Default is 10, Max is 100 | |
documents_order | asc, desc | Order to display returned documents based on document IDs (older first or newer first). Default is desc | |
buttons | save, output, indexing, qa, reject, archive, delete, save_and_learn | Additional buttons to display for an opened document. Comma separated. By default, two buttons are displayed: "Save" and "Cancel". Save = Output when using the API |
Dashboard Features: This endpoint provides quick access to rejection handling and other document management features without requiring separate login or building custom interfaces.
Code Examples
The cURL, PHP, Python, Node.js, and C# examples call Xtracta from a trusted server. The React example calls an application-defined backend proxy so the API key is never exposed in browser code.
Store XTRACTA_API_KEY as a server-side environment variable. Never embed it in browser-delivered code.
curl --request POST 'https://api-app.xtracta.com/v1/documents/ui' \ --header 'Accept: application/json' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'api_key=<API_KEY>' \ --data-urlencode 'workflow_id=<WORKFLOW_ID>' \ --data-urlencode 'document_status=reject'
Sample Request
POST https://api-app.xtracta.com/v1/documents/ui HTTP/1.1 api_key=123&workflow_id=456&document_status=reject
Sample Response
<?xml version="1.0" encoding="UTF-8"?>
<documents_response>
<status>200</status>
<message>The request has been successfully processed</message>
<url>https://api-app.xtracta.com/v1/dashboard/index.html?t=ABC1234567890...</url>
<expire>1425898940</expire>
</documents_response>
Schema Definition
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:simpleType name="ConfidenceType">
<xs:union>
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:minInclusive value="0"/>
<xs:maxInclusive value="100"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value=""/>
</xs:restriction>
</xs:simpleType>
</xs:union>
</xs:simpleType>
<xs:element name="documents_response">
<xs:complexType>
<xs:sequence>
<xs:element name="status" type="xs:integer" minOccurs="0"/>
<xs:element name="message" type="xs:string" minOccurs="0"/>
<xs:element name="url" type="xs:anyURI" minOccurs="0"/>
<xs:element name="expire" type="xs:integer" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Error Responses
For JSON and XML responses generated by this endpoint, the response is wrapped in documents_response and includes the HTTP status code and a message.
| Status | Message | Description |
|---|---|---|
400 | <parameter> must be natural number | Workflow, document, pagination, and expiry values must use supported positive integers. |
400 | <parameter> must be greater than ... / <parameter> must be less than ... | Keep URL-expiry values within the configured range. |
400 | <parameter> must be one of the values of [...] | Use a supported document status or document order. |
400 | <parameter> must be '0' or '1' | Boolean dashboard options accept only 0 or 1. |
400 | Neither valid workflow_id nor document_id is specified | Supply workflow_id or document_id. |
403 | Document is not in valid status to process this request (...) | The selected document cannot be opened in its current state. |
403 | This document is not available because of the billing issue. | Resolve the billing issue, then retry. |
404 | No documents found | Check the document ID and API-key access. |
409 | Document is being processed by someone else | Wait for the active user or process to release the document. |
500 | Failed to generate the New ELS URL for document ... | Retry and contact support with the document ID and request timestamp if it persists. |
Authentication, permission, IP-access-control, and rate-limit failures can be returned before the dashboard URL is generated. Confirm the API key and caller access first.