Understanding Search API fields and parameters
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.
Search API is a publicly accessible HTTP/JSON API designed to facilitate robust read-only search capabilities. The Search API is a read-only interface designed for querying search conditions and executing search results efficiently. To utilize this API, certain requirements must be met: the Module Package Cache must be enabled, a valid user account is required, and the IP address must be whitelisted. These requirements ensure secure and optimized access to the search functionalities.
Global and System Fields
Global and System fields are always available to be searched against and can be found within a subscriber's cross module functions screen.
For single module searches, all fields in the module are available for searching and filtering
For multi module searches, only Global, System, and Custom Common Fields are available.
- "Global" fields will be identified by '_' preceding the field name
- "Common" fields are fields that can be mapped to other Data fields in modules. This allows for searching across multiple modules and getting meaningful values returned for that module.
- "Common" fields will be identified by '_Common' preceding the fieldName.
- "Global" and "Common" fields can be found in the subscriber cross module functions screen.
- All Date operators currently only filter down to the Day value. Working with dates will be in the format of "YYYYMMDD" This design is optimized for performance, it also means that virtual fields won't be available.
- The "Name" column will list the names of the fields.
Continuous improvement of BI Reporting tools
The Search API currently returns header-level field data. We are working on a series of enhancements to provide support for querying and returning task and child level field data and integrated into the Ideagen Platform. Ideagen has already released many of the JasperSoft features into the Miramar UI, such as charts and report grouping, into native BI search and filters. Additional support for child-level reporting will be introduced in future releases.
Global Common Fields
These common fields are available for all objects.
| Name | Type | Description | Sample Value(s) |
|---|---|---|---|
_AllAssigned |
Person or Team List | Cumulative list of task assignees | T2024002658 P134657 P249492 |
_Assigned |
Person or Team | Current task assignee | P249492 |
_AssignedDate |
Date | Date of most recent task assignment | 20200617 |
_AssignedTo |
Person | Current assigned person or team | Hansen, Seth |
_CreatedBy |
Person | Person who created this object | Jones, Elizabeth |
_CreatedOn |
Date | Date this object was created | 20200228T0355 PST |
_CreationProcess |
Text | Process that generated this object | YWSObject |
_Identifier |
Text | The system identifier of this object | CR-2020-4598 |
_LastAssigned |
Person List | Persons or teams who were last assigned a task | Scott, Ryan; George, Cheryl |
_LastUpdatedBy |
Person | Person who last updated this object | Jensen, Ann |
_LastUpdatedOn |
DateTime | Date and time this object was last updated. Stored at GMT offset | 20200914T232032533Z |
_LastUpdatingProcess |
Text | Process that last updated this object | ScheduledJob |
_Module |
Text | The module code associated with this object | APP-CR |
_ObjectID |
Numeric | The unique ID number that identifies this object | 107665401 |
_ObjectURL |
URL | An authenticated session direct link to this object | https://tw.devonway.com/c&Action=Open&Module=L-BASIC&ObjectID=107665401 |
_ReportingAuthority |
ReportingAuthority | The Reporting Authority associated with this object | RA1, RA2, RA3 |
_Status |
Discrete values | The object status | OP (Open), CL (Closed) |
_Type |
Discrete values | The object type | R (Regular), M (Model) |
_Version |
Numeric | The object version number, incremented on each change | 73 |
_ViewedBy |
Person List | Persons who have viewed this object since it was last assigned | 2024018922, 361742 |
_WorkingStep |
Discrete values | Current workflow step of this object | Resolve |
_WorkingTask |
Discrete values | Current workflow task of this object |
System Common Fields
These fields represent common concepts across modules and contain data from various module fields that have been mapped (to these fields) by module developers.
| Name | Type | Description | Sample Value(s) |
|---|---|---|---|
_CommonClassifiedInformationLabel |
Discrete values | A label that signifies the level of data classification | Official Use Only |
_CommonDateClosed |
Date | The date the object status moved to Closed | 20200530T102833530 |
_CommonDueDate |
Date | The date this object, or the current task, is due | 20210516 |
_CommonDescription |
Text | A brief description of an object's content | During startup, a continuous drain of steam condensation was noticed. |
_CommonIdentifier |
Text | A unique value that identifies an object | 7745-TLP-PROC-20-0106 |
_CommonStatus |
Discrete values | The state of an object | Pending Review |
_CommonTitle |
Text | The title or synopsis of an object's content | Failure of Air Handling Unit coils |
_Common{SomeNameHere} |
ANY Type | Custom common fields defined for the subscriber will be prepended with the common when created. Any number of fields can be created on this screen for the subscriber | See Above |
Parameters
There are multiple parameters that can be set on a query. Not all the parameters are required and some have default values that will be used.
The following is a list of parameters that are available and what their functions are. The parameters are case sensitive and will need to be set as shown below.
| Parameter | Valid Options | Default Value | Example | Description |
|---|---|---|---|---|
size |
any positive Integer | 20 | "size": 15 | This determines the number of results you wish to have returned. TODO: cap the max size? |
page |
any positive Integer | 0 | "page": 3 | 0 based paging. This determines the starting point of results. Takes size and multiplies it by this value to get the starting value (0 based) |
includeUnreadCount |
true/false | true | "includeUnreadCount": false | This will return a parameter of totalUnread for the query executed. False will remove this from the query |
datasetSearch |
true/false | false | "datasetSearch": false | (Current not supported) will determine if the query should execute against a dataset instead of the standard Object search index |
highlight |
true/false | true | "highlight": false | This turns on or off highlighting when doing a search. if no fields are specified, nothing gets highlighted, if a All_Data search is done, then some identifying fields will be added by default for highlighting |
returnFormat |
NAME, SUB_CODE, FIELD_CODE | NAME | "returnFormat": "sub_code" | This controls the field masking that is applied to fields. If you want the fields returned by something other than their name value, you can set this. If a field is asked for by name, it will return it by name. otherwise, this option adjusts the naming on the fields when returned |
sort |
Comma separated list of sort | NULL (will sort by relevance) | "sort": "LUDT desc,Name asc" | This is an optional parameter that determines how to sort. Expecting it in a "field direction" format |
modules |
List of module codes you want to search against | NULL (will Search all modules you have access to) | "modules": ["moduleA", "moduleB"] | This will allow you to search one or more modules for data. The valid searchable fields change whether you are searching single or multiple modules. |
returnFields |
List of field values you want returned | NULL | "returnFields": ["FieldName", "CS1", "CS_1"] | This is a list of fields you wish returned in addition to the default return fields for searches. This will vary based on Multi Module searches or Single Module searches. This will be discussed later |
highlightFields |
List of fields to highlight | NULL | "highlightFields":["FieldName","CS1", "CS_1"] | Adds fields to the list of fields to be highlighted. |
facet |
Formatted "bucket" query | NULL | "facet" : { "NameForFacet" : { "type" : "terms", "field":"fieldName"}} | This will take a formatted Facet query for bucketing results. This will be discussed in detail further down |
query |
Formatted query to match against | NULL (if not supplied will treat this as a match all query) | "query" : { "condition" : "equals", "field" : "fieldA", "term": ["matchMe"]} | This is the search that will get executed and find values that match the conditions defined within. The Query format will be discussed in detail further down |
stats |
List of Stat objects to collect stats on | NULL | "stats" : [{ "field" : "fieldname", "sum": true, "min": true, "max": true, tag:["facetPivotTagMatch"]}] | This tells the search engine to perform stats on specific fields and which values to return for the stat. |
Return Fields
It's recommended for the body payload to contain a returnFields entry with the list of the necessary fields to be returned from the query (such as a SELECT portion of a SQL query).
{
…
"returnFields": [
"FieldName_A",
"FieldName_B",
"…",
"FieldName_Z"
]
…
}