Advanced search for Reports collection
SEARCH is an experience/resource type API designed to provide support to the search of Reports collection. This is part of the advanced query search.
The operation uses the next query objects:
- Filters: every filter applied MUST be present with the provided value set.
- Restrictions: every object returned in the collection MUST be validated on the restriction.
Every restriction and filter is applied with AND operation. As example:
POST simulations/{simulationId}/open-positions/search
{
"filters": [
{
"attribute": "attributeId",
"values": [
"attributeValue"
]
}
],
"restrictions": [
{
"attribute": "numericAttributeId",
"type": "decimal",
"operator": "and",
"values": [
{
"restriction": "lte",
"value": "2.0"
},
{
"restriction": "gte",
"value": "1.0"
}
]
}
]
}
This is equivalent to: WHERE attributeId IN (“attributeValue”) AND numericAttributeId > 1.0 AND numericAttributeId < 2.0
Results could be ordered by any field.
Query Parameters
Pagination options for the collection search. It permits the next modifiers:
- page[size]
- page[number]
Default values defined are page[number]=1 and page[size]=20
Pagination options for the collection search. It permits the next modifiers:
- page[size]
- page[number]
Default values defined are page[number]=1 and page[size]=20
Sort query parameter permits the sorting of the collection by the values of the attribute provided in the parameter:
GET simulations?sort=+attribute
The type of sort:
- (+) Indicates ascending order. +attribute
- (-) Indicates descending order. -attribute
- If no symbol is provided, any default order could be returned
If sort is not provided, the collection is returned in a default order by ID.
The name of the attribute should exists in the object. If the name does not exists, it returns 400 Bad Request.
Path Parameters
UUID type implementing the RFC 4122.
Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$
Example:95b1b467-bd69-4436-8181-96c16408c230
Body
application/json
Body
QueryType
Filters restricting the search. All of the values in the Array represent AND operation.
Show Child Parameters
List of restrictions applied to the collection
Show Child Parameters
Response
application/vnd.api+json
Response
Ok
ReportsJsonApiType
Collection in JSON:API format. Collection is paginated
Show Child Parameters
Data structure for all operations.
Show Child Parameters
Show Child Parameters
Path Parameters
Query Parameters
Body
Download
Document download endpoints
Download operation for documents in different formats
This endpoint downloads any document present in the platform using path parameters.
For document downloading, we will proceed as:
GET /download?id=2e3d0448-5bf5-4fd3-926e-36f43c24162a&type=REPORT
The user should provide the type of document to download, report and the ID of the report to download.
To retrieve the document ID, it is present in the operation search available for reports. Please, check the documentation available for document query.
Query Parameters
UUID type implementing the RFC 4122.
Match pattern:^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$
Example:95b1b467-bd69-4436-8181-96c16408c230
Document type to download
Allowed values:REPORT
Response
application/octet-stream
Response
Download document in Base64
Query Parameters
QueryType
objectFilters restricting the search. All of the values in the Array represent AND operation.
Show Child Parameters
List of restrictions applied to the collection
Show Child Parameters
FilterType
objectName of the attribute to be restricted, filtered or searched
Example:sessionDate
Value of the filter or restriction done.
Example:20200101, 20200102