Executing a Search API request
Who is this article for?
Users who need to search records that meet a variety of requirements and assist with populating data repositories
Restricted access to Users with interface development roles. It is a read-only HTTP/JSON API.
Established repositories can be leveraged in conjunction with third-party reporting tools, based on the data retrieved through the executed Search API. Only authenticated active users can execute an API. The Authentication routes provide ways to authenticate and create an active session for searching. Most use cases will use DWAYSessionId created from other API calls.
Example 1:
HTTP Request Type: POST
HTTP Path: /api/v1/search
Headers
Accept: application/jsonContent-Type: application/json
DWAYSessionId: Y2FybDoxOTA3MDgxNjA3MDU5NTVYMDAwMTExNzg5MzUxMDA=subscriber:{subscriber_code}
Request Body
The request body is a search Domain Specific Language (DSL).
Ideagen Query DSL is the primary design consideration to map the platform Model to an easy-to-use query language. This will allow for quick understanding and the ability to form complex queries.
{
"modules": [ "L-COURS" ],
"returnFields": [ "_Identifier", "Name", "Course", "City", "State", "Status" ],
"query": {
"condition": "and"
"query": [
{
"condition": "equals"
"field": "State",
"term": "UT",
"type": "STRICT",
"highlight": true
},
{
"condition":"equals",
"field": "Status",
"term": ["Active", "Open"],
"highlight": true
}
]
},
"sort": "_Identifier asc",
"size": 20,
"page": 0
}
Response Body
{
"success": true,
"totalResultFound": 1,
"time": 1,
"status": 0,
"startPosition": 0,
"returnSize": 10,
"page": 0,
"results": [
{
"_ModuleCode": "L-COURS",
"_Identifier": "COURS 2020-0001",
"Name": "Valley Views",
"Course": "course",
"City": "Layton",
"State": "UT",
"_highlights": { "_Identifier": "COURS <em>2020</em>-0001" }
}
]
}
Example 2:
Retrieve all the items updated since the time specified.
The following query returns up to one hundred results for module A that have been updated since Jan 1st, 2021, on or after 12:00am.
{
"pageSize": 100,
"modules": ["moduleA"],
"query": {
"condition": "greater_than_equal_to",
"field": "_LastUpdatedOn",
"term": ["2021-01-01T00:00:00"]
}
}Supported accuracy is down to the second.