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
Body ()
Root Schema : savedSearchItemCreateInputModel
Type: object
Show Source
Nested Schema : SavedSearchGroupByModel
Type: object
Show Source
Nested Schema : fields
Type: array
Show Source
Nested Schema : mongoQuery
Type: object
Additional Properties Allowed
Show Source
Nested Schema : orderBy
Type: array
Show Source
Back to Top

Response

200 Response

Successfully created the saved search
Body ()
Root Schema : savedSearchItem
Type: object
Show Source
Nested Schema : SavedSearchGroupByModel
Type: object
Show Source
Nested Schema : fields
Type: array
Show Source
Nested Schema : mongoQuery
Type: object
Additional Properties Allowed
Show Source
Nested Schema : orderBy
Type: array
Show Source

404 Response

Resource not found
Back to Top

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"
    }
  ]
}
Back to Top