PUT /rest/bpm/wle/v1/search/query[?columns={string}][&condition={string}][&sort={string}][&secondSort={string}][&organization={string}][&size={integer}][&offset={integer}][&saveAsName={string}][&run={String}][&shared={boolean}][&filterByCurrentUser={boolean}]POST /rest/bpm/wle/v1/search/query[?columns={string}][&condition={string}][&sort={string}][&secondSort={string}][&organization={string}][&size={integer}][&offset={integer}][&saveAsName={string}][&run={String}][&shared={boolean}][&filterByCurrentUser={boolean}]
autoColumn list.columns query parameter.v1/search/meta/column and v1/search/meta/businessData APIs.v1/search/meta/column API are returned.condition, sort, and secondSort query parameters might use column names that
are not in the result column set. When the condition query parameter is set, the referenced column values are used and the
referenced column values are automatically returned in the result.
The sort and secondSort query parameters are ignored when the referenced column values are not in the result column set.
Add these columns to the result column set to sort by these values.| Name | Value Type | Description |
|---|---|---|
| columns | string | A comma-separated list of column names that should be returned by the search.
The names of valid columns can be retrieved with the
v1/search/meta/column and v1/search/meta/businessData APIs. |
| condition | string |
A simple conditional expression to be used with the query.
An expression of the form <field>|<value> means "if <field> equals <value>".
An expression of the form <field>|<operation>|<value> means
"if <field> <operation> <value>".
For example, |
| sort | string | The name of the column on which to base the primary sort of the search results.
|
| secondSort | string | The name of the column on which to base the secondary sort of the search results.
|
| organization | string | A string indicating how the results should be organized. You can use the following values:
byTask and byInstance.
The default value is byInstance. |
| size | integer | Specifies the maximum number of entities to be returned. If this parameter is not specified or is set to zero, the default size specified in the configuration is used.
|
| offset | integer | Specifies the index (origin 0) of the first entity to be returned from the query result set.
Offset 0 refers to the first entity from the result set. Offset 1 refers to the second entity, and so on.
If no index is specified, the default value is 0.
|
| saveAsName | string | The name under which the custom search should be saved for the current user.
If no name is specified, the custom search is not saved.
|
| run | String | A flag that indicates whether this search query should be performed. If the parameter not specified, the default value is
true.
Use this parameter along with the saveAsName parameter to save the query without running it.
|
| shared | boolean | A flag that indicates whether this saved search should be shared with other users. If the parameter is set to
true, the saved search is shared with all users.
By default, the parameter is set to false, which means that the saved search is not shared with other users.
|
| filterByCurrentUser | boolean | Note: This parameter is used only when the request is executed by a user with IBM Business Automation Workflow Administrator rights on the server, otherwise it is ignored. This parameter is a flag that indicates whether the search results should be restricted to the entities that are
associated with the current user. A value of |
None
The default content type is application/json.
{ "description": "WLE Search Details",
"type": "object",
"properties":
{
"data": {"type": "[object]",
"description": "This field contains a list of zero or more Map objects. Each Map object represents a single row in the search result data and contains a key/value pair for each column of data within the row."
},
"firstColumnSort": {"type": "string",
"description": "The primary sort column."
},
"secondColumnSort": {"type": "string",
"description": "The secondary sort column."
},
"organization": {"type": "string",
"description": "A string which indicates how the search results are organized: 'byTask', 'byInstance'."
},
"autoColumns": {"type": "[string]",
"description": "A list of zero or more names of columns that were automatically added to the search results."
},
"offset": {"type": "integer",
"description": "The offset value that was specified on the original request. This value represents the index (within the overall query result set) of the first item being returned"
},
"size": {"type": "integer",
"description": "The number of items being returned. System configuration default will be used if size is not specified or set to zero."
},
"requestedSize": {"type": "integer",
"description": "The number of items requested in the original request"
},
"totalCount": {"type": "integer",
"description": "Total number of results. This value will be the same as offset if number of result is less or equal to the offset value."
}
}
}
{
"status":"200",
"data":{
"data":[
{
"taskId":53,
"instanceName":"Employee Requisition for (53)",
"instanceId":53,
"bpdName":"HR Open New Position",
"taskAttachedInfoPathFormRef":null,
"taskStatus":"Closed",
"instanceStatus":"Completed",
"taskAttachedExtActivityRef":null,
"taskAssignedTo":{
"type":"User",
"who":"tw_user"
}
},
{
"taskId":54,
"instanceName":"Employee Requisition for (54)",
"instanceId":54,
"bpdName":"HR Open New Position",
"taskAttachedInfoPathFormRef":null,
"taskStatus":"Received",
"instanceStatus":"Active",
"taskAttachedExtActivityRef":null,
"taskAssignedTo":{
"type":"User",
"who":"tw_user"
}
}
],
"firstColumnSort":"instanceId",
"organization":"byInstance",
"autoColumns":[
"taskAssignedTo",
"taskAttachedExtActivityRef",
"taskAttachedInfoPathFormRef",
"taskId",
"taskStatus"
]
}
}
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/search"
elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://rest.bpm.ibm.com/v1/data/search"
xmlns:common="http://rest.bpm.ibm.com/v1/data/common"
xmlns:pref="http://rest.bpm.ibm.com/v1/data/root">
<import schemaLocation="Common.xsd" namespace="http://rest.bpm.ibm.com/v1/data/common"/>
<import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root"/>
<!--
This type is used to return metadata related to searches.
-->
<complexType name="SearchMetaResult">
<complexContent>
<extension base="pref:Data">
<sequence>
<!--
A list of strings that represent the requested metadata.
This could be a list of all possible task status values,
a list of all possible priority values, etc.
The data returned in this structure will depend on the
type of metadata requested.
-->
<element name="result" type="string" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!--
This type is used to return metadata related to a search,
when the requested type of metadata is specified as "savedSearch".
-->
<complexType name="SearchMetaTypedResult">
<complexContent>
<extension base="pref:Data">
<sequence>
<!--
This field represents a list of zero or more saved searches.
-->
<element name="result" type="tns:TypedString" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!--
This type models an element of type string which also contains
a string attribute named "type".
This type is used to represent a saved search, where the
element value contains the name of the saved search,
and the "type" attribute indicates whether the saved search
is for tasks or processes.
-->
<complexType name="TypedString">
<simpleContent>
<extension base="string">
<attribute name="type" type="string" />
</extension>
</simpleContent>
</complexType>
<!--
This type contains the results of performing a search.
-->
<complexType name="SearchDetails">
<complexContent>
<extension base="pref:Data">
<sequence>
<!--
This field contains a list of zero or more Map objects.
Each Map object represents a single row in the search result data,
and contains a key/value pair for each column of data within the row.
-->
<element name="data" type="common:Map" minOccurs="0"
maxOccurs="unbounded" />
<!-- The name of the primary sort column -->
<element name="firstColumnSort" type="string" />
<!-- The name of the secondary sort column -->
<element name="secondColumnSort" type="string" />
<!--
A string which indicates how the search results are organized.
This will be set to "byTask" or "byInstance".
-->
<element name="organization" type="string" />
<!-- A list of columns that were added automatically to the query -->
<element name="autoColumns" type="string" minOccurs="0"
maxOccurs="unbounded" />
<!-- Begin index of returned results -->
<element name="offset" type="int" />
<!-- Number of results returned -->
<element name="size" type="int" />
<!-- Number of results requested -->
<element name="requestedSize" type="int" />
<!-- Number of results available -->
<element name="totalCount" type="int" />
</sequence>
</extension>
</complexContent>
</complexType>
<!--
This type represents the result from executing a performance query
-->
<complexType name="PerformanceSearchDetails">
<complexContent>
<extension base="pref:Data">
<sequence>
<!--
This field contains a list of zero or more Map objects.
Each Map object represents a single row in the search result data,
and contains a key/value pair for each column of data within the row.
-->
<element name="data" type="common:Map" minOccurs="0" maxOccurs="unbounded"/>
<!-- The summarized (rolled up) result -->
<element name="rollupResult" type="string" minOccurs="0"/>
<!-- The primary sort column -->
<element name="firstColumnSort" type="string"/>
<!-- The secondary sort column -->
<element name="secondColumnSort" type="string"/>
<!-- The names of columns that were automatically added to the query results -->
<element name="autoColumns" type="string" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!--
This type represents the result from performing a performance instance query.
-->
<complexType name="PerformanceInstanceDetails">
<complexContent>
<extension base="pref:Data">
<sequence>
<!-- A list of tracked business data values that have changed -->
<element name="data" type="tns:TrackedBusinessData" minOccurs="0" maxOccurs="unbounded"/>
<!-- A list of tracked progress data -->
<element name="progress" type="tns:TrackedProgress" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!--
This type represents a tracked business data element that has changed.
-->
<complexType name="TrackedBusinessData">
<sequence>
<!-- The timestamp when the field's value changed -->
<element name="when" type="dateTime"/>
<!-- The ID of the step in which the field's value changed -->
<element name="stepID" type="string"/>
<!-- The name of the step in which the field's value changed -->
<element name="stepName" type="string"/>
<!-- The name of the tracked field whose value changed -->
<element name="field" type="string"/>
<!-- The new value of the field -->
<element name="value" type="anyType"/>
</sequence>
</complexType>
<!--
This type represents tracked progress information for a step within a process instance
-->
<complexType name="TrackedProgress">
<sequence>
<!-- The ID of the step -->
<element name="stepID" type="string"/>
<!-- The name of the step -->
<element name="stepName" type="string"/>
<!-- The timestamp when the step was reached -->
<element name="arrived" type="dateTime"/>
<!-- The timestamp when the step was started (if it was a task) -->
<element name="started" type="dateTime" minOccurs="0"/>
<!-- The user name of the user that started the task (if it was a task) -->
<element name="startedWho" type="string" minOccurs="0"/>
<!-- The timestamp when the step was finished (if it was finished) -->
<element name="finished" type="dateTime" minOccurs="0"/>
</sequence>
</complexType>
</schema>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bpm:ResponseData xmlns:bpm='http://rest.bpm.ibm.com/v1/data'>
<status>200</status>
<data xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='srch:SearchDetails' xmlns:srch='http://rest.bpm.ibm.com/v1/data/search'>
<data>
<item key='taskAssignedTo'>
<value xsi:type='cmn:TaskAssignedTo' xmlns:cmn='http://rest.bpm.ibm.com/v1/data/common'>
<type>User</type>
<who>tw_user</who>
</value>
</item>
<item key='bpdName'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>HR Open New Position</value>
</item>
<item key='instanceId'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:decimal'>53</value>
</item>
<item key='instanceName'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>Employee Requisition for (53)</value>
</item>
<item key='instanceStatus'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>Completed</value>
</item>
<item key='taskAttachedExtActivityRef' />
<item key='taskAttachedInfoPathFormRef' />
<item key='taskId'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:decimal'>53</value>
</item>
<item key='taskStatus'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>Closed</value>
</item>
</data>
<data>
<item key='taskAssignedTo'>
<value xsi:type='cmn:TaskAssignedTo' xmlns:cmn='http://rest.bpm.ibm.com/v1/data/common'>
<type>User</type>
<who>tw_user</who>
</value>
</item>
<item key='bpdName'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>HR Open New Position</value>
</item>
<item key='instanceId'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:decimal'>54</value>
</item>
<item key='instanceName'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>Employee Requisition for (54)</value>
</item>
<item key='instanceStatus'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>Active</value>
</item>
<item key='taskAttachedExtActivityRef' />
<item key='taskAttachedInfoPathFormRef' />
<item key='taskId'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:decimal'>54</value>
</item>
<item key='taskStatus'>
<value xmlns:ns5='http://www.w3.org/2001/XMLSchema' xsi:type='ns5:string'>Received</value>
</item>
</data>
<firstColumnSort>instanceId</firstColumnSort>
<organization>byInstance</organization>
<autoColumns>taskAssignedTo</autoColumns>
<autoColumns>taskAttachedExtActivityRef</autoColumns>
<autoColumns>taskAttachedInfoPathFormRef</autoColumns>
<autoColumns>taskId</autoColumns>
<autoColumns>taskStatus</autoColumns>
</data>
</bpm:ResponseData>
The default content type is application/json.
{ "description": "WLE Error Response",
"type": "object",
"properties":
{ "status": {"type": "string",
"description": "The status of the previous API call."
},
"exceptionType": {"type": "string",
"description": "The classname associated with the exception."
},
"errorNumber": {"type": "string",
"description": "Message ID of the exception."
},
"errorMessage": {"type": "string",
"description": "Message text of the exception."
},
"errorMessageParameters": {"type": ["string"], "optional": true,
"description":"Message text parameters of the exception."
},
"programmersDetails": {"type": "object", "optional": true,
"description":"Additional exception details, for example, a stack trace."
}
}
}
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://rest.bpm.ibm.com/v1/data/exception"
elementFormDefault="unqualified" xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:tns="http://rest.bpm.ibm.com/v1/data/exception"
xmlns:dat="http://rest.bpm.ibm.com/v1/data/root">
<import schemaLocation="BPMRestData.xsd" namespace="http://rest.bpm.ibm.com/v1/data/root" />
<!--
This type represents an error response.
-->
<element name="RestRuntimeException">
<complexType>
<sequence>
<element name="status" type="string"/>
<element name="Data" type="tns:ExceptionData">
</element>
</sequence>
</complexType>
</element>
<!--
This type contains detailed error information associated with an exception.
-->
<complexType name="ExceptionData">
<sequence>
<element name="status" type="string"/>
<!-- This specifies the java class name of the exception -->
<element name="exceptionType" type="string"/>
<!-- The message ID of the error message -->
<element name="errorNumber" type="string" minOccurs="0"/>
<!-- The complete error message -->
<element name="errorMessage" type="string"/>
<!-- The list of strings inserted into the error message -->
<element name="errorMessageParameters" type="string" minOccurs="0" maxOccurs="unbounded"/>
<!--
The stacktrace associated with the exception.
Note that this will be omitted unless the "server-stacktrace-enabled" property
is enabled in the server's 100Custom.xml file.
-->
<element name="programmersDetails" type="string"></element>
<!-- Prior responses. Set if a bulk command was used -->
<element name="responses" type="dat:BulkCommandResponses" minOccurs="0"></element>
<element name="errorData" type="tns:ErrorData" minOccurs="0" />
</sequence>
</complexType>
<complexType name="ErrorData">
<sequence>
<element name="code" type="string" />
<element name="data" type="string" minOccurs="0" />
</sequence>
</complexType>
</schema>
| Code | Description |
|---|---|
| 200 OK | Success completion. |
| 400 Bad Request | The parameters are not valid or they are missing. |
| 401 Unauthorized | The caller is not authorized for this request. |
| 406 Not Acceptable | The requested content type or content encoding is not supported. |
| 500 Internal Server Error | A severe problem has occurred, programmer's details are provided. |
7.5.0
Parent Topic: Search Resource