Search
Search-APIs are used to find the records in the environment. In combination with the configuration-APIs a set of specific search-fields can be presented. Familiarize yourself with these responses to include all possible options.
Search Globally
Endpoint: /publicapi/global/search-global
Method: POST
Content-Type: application/json
Search Api used for finding moderated documents inside Atlantis. The following steps can be used to start searching, sorting, and filtering.
Simple search
The following payload can be used a good starting point:
{
"data": {
"term": "*",
"startIndex": 0,
"endIndex": 9
}
}
Simple search with filter
In the result-response you get, based on configuration, filters from the response-property: data.filterFieldsWithOptions which can be used to filter on specific values.
{
"data": {
"term": "*",
"startIndex": 0,
"endIndex": 9,
"filterFields": [
{
"name": "Objectnaam",
"terms": [
"stoel"
]
}
]
}
}
Simple search with sorting
In the result-response you get, based on configuration, sort-options from the response-property: data.sortOptions which can be used to sort on specific values.
{
"data": {
"term": "*",
"startIndex": 0,
"endIndex": 9,
"sort": {
"name": "Periode",
"direction": "asc"
}
}
}
Response
The response will be the result of your search data. Using the current resultPage, you can receive the found documents.
Response will also include filterFields and sortOptions, which can be used to improve the result.
{
"data": {
"resultCount": 0,
"currentResultPage": [
{
"id": "string",
"title": "string",
"icoonUrl": "string",
"multimediaUrls": [
"string"
],
"resultFields": {},
"extraFields": {},
"location": "string"
}
],
"filterFieldsWithOptions": [
{
"name": "string",
"label": "string",
"HideBecauseParentFilterIsNotYetApplied": true,
"HideBecauseIamApplied": true,
"filterOptions": [
{
"Waarde": "string",
"Aantal": 0
}
]
}
],
"sortOptions": [
{
"name": "string"
}
]
}
}
Search globally using multiple search-fields
Endpoint: /publicapi/global/search-with-fields
Method: POST
Content-Type: application/json
When the base Search Api is not enough for your needs than you can use this API to search with specific search-fields. Search-fields can be retrieved from the configuration-api.
The following steps can be used to start searching with fields
Simple search with search-field
The following payload can be used a good starting point:
{
"data": {
"startIndex": 0,
"endIndex": 9,
"criteria": {
"searchFields": [
{
"name": "Vervaardiger",
"term": "*Henk*"
}
]
}
}
}
In this example two wildcards are used to search for Vervaardiger containing Henk.
Response
The response will be the result of your search data. Using the current resultPage, you can receive the found documents.
Response will also include filterFields and sortOptions, which can be used to improve the result.
{
"data": {
"resultCount": 0,
"currentResultPage": [
{
"id": "string",
"title": "string",
"icoonUrl": "string",
"multimediaUrls": [
"string"
],
"resultFields": {},
"extraFields": {},
"location": "string"
}
],
"filterFieldsWithOptions": [
{
"name": "string",
"label": "string",
"HideBecauseParentFilterIsNotYetApplied": true,
"HideBecauseIamApplied": true,
"filterOptions": [
{
"Waarde": "string",
"Aantal": 0
}
]
}
],
"sortOptions": [
{
"name": "string"
}
]
}
}
Shared environment notes
For shared environments like AtlantisLite, a special searchfield will be available to make sure you'll retrieve only records from the desired part of the environment.
For example; the field CMSegment will be available and prefilled with the prefix of the customer.
{
"data": {
"startIndex": 0,
"endIndex": 9,
"criteria": {
"searchFields": [
{
"name": "CMSegment",
"term": "DEVENTIT"
}
]
}
}
}