Create a Saved Search
post
/rest/v19/searchResources/{resourceVarName}
Use this endpoint to create a new saved search for the specified resource.
Request
Path Parameters
-
resourceVarName(required): string
The unique variable name to identify the process.
Root Schema : savedSearchItemCreateInputModel
Type:
Show Source
object
-
aggregations:
object SavedSearchGroupByModel
-
description:
string
Example:
This is a dummy description
-
fields(required):
array fields
-
mongoQuery(required):
object mongoQuery
Additional Properties Allowed: additionalProperties
-
name(required):
string
Example:
savedSearchDummy
-
orderBy:
array orderBy
Nested Schema : SavedSearchGroupByModel
Type:
Show Source
object
-
attribute:
string
-
sort:
string
Default Value:
desc
Allowed Values:[ "asc", "desc" ]
Response
200 Response
Successfully created the saved search
Root Schema : savedSearchItem
Type:
Show Source
object
-
active:
boolean
-
aggregations:
object SavedSearchGroupByModel
-
default:
boolean
-
deletable:
string
-
description:
string
Example:
This is a dummy description
-
fields:
array fields
- hidden: boolean
-
links:
array links
-
mongoQuery:
object mongoQuery
Additional Properties Allowed: additionalProperties
-
name:
string
Example:
savedSearchDummy
-
orderBy:
array orderBy
-
queryUuid:
number
-
savedSearchNumber:
number
-
searchType:
string
Allowed Values:
[ "_user_defined_search", "_my_quotes_search", "_my_approval_search" ]
- shared: boolean
-
siteLevelDefault:
boolean
-
updatable:
boolean
-
userId:
number
-
userKey:
string
-
userLevelDefault:
boolean
-
userName:
string
Nested Schema : SavedSearchGroupByModel
Type:
Show Source
object
-
attribute:
string
-
sort:
string
Default Value:
desc
Allowed Values:[ "asc", "desc" ]
Nested Schema : links
Type:
Show Source
array
-
Array of:
object reference links
Title:
reference links
Reference links for the Parent, Self, Children and Related as applicable
Nested Schema : reference links
Type:
object
Title:
reference links
Reference links for the Parent, Self, Children and Related as applicable
Show Source
-
href:
string
Title:
URL to the related object
URL to the related object -
name:
string
-
rel:
string
Title:
Link Relationship to the current object
Default Value:self
Link Relationship to the current object
404 Response
Resource not found
Examples
The following examples show how to update access for the specified saved search by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.
curl - X POST -H "Authorization: Bearer <token>" - H "Content-type: application/json" https://sitename.oracle.com/rest/v19/searchResources/commerceDocumentsOraclecpqoTransaction
Request Body Sample
{ "_entity": "Quote", "name": "Vision Quotes In Process", "fields": ["transactionID_t", "version_t", "version_number_versionTransaction_t", "_customer_t_company_name", "transactionName_t", "status_t", "totalContractValue_t", "owner_t", "createdDate_t", "lastUpdatedDate_t", "totalAnnualValue_t"], "orderBy": ["lastUpdatedDate_t:desc"], "mongoQuery": { "$and": [{ "_customer_t_company_name": { "$regex": "Vision" } }, { "status_t": { "$eq": "OPEN" } } ] } }
Response Body Sample
{ "_entity": "Quote", "name": "Vision Quotes In Process", "updatable": true, "deletable": false, "queryUuid": 38712115, "savedSearchNumber": 38712115, "default": false, "shared": false, "active": true, "fields": ["transactionID_t", "version_t", "version_number_versionTransaction_t", "_customer_t_company_name", "transactionName_t", "status_t", "totalContractValue_t", "owner_t", "createdDate_t", "lastUpdatedDate_t", "totalAnnualValue_t"], "orderBy": ["lastUpdatedDate_t:desc"], "mongoQuery": { "$and": [{ "_customer_t_company_name": { "$regex": "Vision" } }, { "status_t": { "$eq": "OPEN" } } ] }, "searchType": "user_defined_search", "siteLevelDefault": false, "userLevelDefault": false, "hidden": false, "links": [{ "rel": "self", "href": "http://sitename.oracle.com/rest/v19/searchResources/commerceDocumentsOraclecpqoTransaction/38712115", "name": "self" }, { "rel": "canonical", "href": "http://sitename.oracle.com/rest/v19/searchResources/commerceDocumentsOraclecpqoTransaction/38712115", "name": "canonical" }, { "rel": "parent", "href": "http://sitename.oracle.com/rest/v19/searchResources/commerceDocumentsOraclecpqoTransaction", "name": "parent" } ] }