To make it easier to integrate third-party applications, Athento allows you to use URLs (which can be linked or embedded in e-frames) to preview documents resulting from a field filter.
Previewing the results of the query
To do so, use the following pattern in the URL:
https://app.athento.com/file/preview/_/?filter=<filter>&page=<page>&sort=<column>&hf=<hide>
where:
- <filter>, is the set of fields (with their values) that Athento will use to obtain the documents that contain those values in the indicated fields (queries). As filters you can use the following:
- series=<space_name>: Indicates the spaces where the documents are stored.
- excluded_series=<space_name>: documents on these spaces will be ignored.
- type=<form_name>: Indicates the form the documents belong to.
- excluded_type=<form_name>: documents using this form will be ignored.
- <field_name>=<field_value>: Indicates the name and value of the field to use as a filter.
If you want to use several filters you can join them with the & character, for example <filter1>&<filter2>. Filters of the same type can be joined.
Other optional URL parameters:
- <page>, indicates the document index to display according to the result obtained.
- <sort>, indicates the sort column for filter execution:
- id, creation_date, filename
The "-" symbol can be used in front of the column to indicate descending sorting.
- id, creation_date, filename
- <hf>, is used to hide the values of the filter used, by default, it is false, indicating that the filter is displayed.
Query example
If you want to preview the documents associated to a specific customer (001) of a specific company (0056) and this information exists in the document fields, Athento can offer the preview of all the documents that meet these two values.
In this case, the filter to use would be:
metadata.customer_ID=001&metadata.customer_company=0056
To make the query more secure, it should be base64 encoded.
bWV0YWRhdGEuY3VzdG9tZXJfSUQ9MDAxJm1ldGFkYXRhLmN1c3RvbWVyX2NvbXBhbnk9MDA1Ng==
Also, a text string must be included before and after the query.
The complete URL would be as follows:
https://app.athento.com/file/preview/_/?filter=12341234bWV0YWRhdGEuY3VzdG9tZXJfSUQ9MDAxJm1ldGFkYXRhLmN1c3RvbWVyX2NvbXBhbnk9MDA1Ng==12341234
If the user accessing this page is authenticated, he/she will be able to see the preview of the documents. Otherwise, authentication must be done via token.
Comments
0 comments
Please sign in to leave a comment.