Accelerate the Value of Data

Find Saved Search

Returns requests found by specified filtering, ordering and paging params.

Request:

POST <tenanturi>/personal/findSavedSearches[?countResults=<true/false>][&findPublic=<true/false>]
Table 1. Parameters
Parameters Name Required Details
Headers Authorization Yes Information about authentication access token in format "Bearer <accessToken>" (see details in Authentication API ).
Content-Type Yes Should be "Content-Type: application/json".
Body   Yes

JSON Array with objects representing saved search request objects to create.

Each object must have offset and max properties, all other are optional.

Filter can contain such fields:

  • offset-number of requests to skip from beginning of resultset (paging)
  • max- page size
  • startsWith- filters by name
  • favoriteOnly- filters by isFavorite
  • sortBy- sorting option, can be "NAME", "CREATE_DATE" and "UPDATE_DATE"
  • sortOrder- sorting option, can be "ASC" and "DESC"
  • includes- array of strings which are used to search by full equality of name; requests found such way are appended to each page besides regular page size (max).

 

Query countResults No

Fulfill search query and return count of found profiles for each returned query.

findPublic No Looks for not only current user's requests but among public requests of other users also.

Response

Represents sent filter with two appended fields: "total"- count of found requests (doesn't consider "includes") and "result"- final resultset.

Request

POST <tenant
URI>/personal/findSavedSearches?countResults=true&findPublic=true
Headers:Authorization:Bearer 204938ca-2cf7-44b0-b11a-1b4c59984512,
Content-Type:application/json
Body:{
   "offset":0,
   "max":4,
   "startsWith":"su",
   "favoriteOnly":true,
   "sortOrder":"desc",
   "sortBy":"NAME",
   "includes":[
      "Admin search query #4"
   ]
   }

Response

{
   "startsWith":"su",
   "includes":[
      "Admin search query #4"
   ],
   "favoriteOnly":true,
   "offset":0,
   "max":4,
   "sortBy":"NAME",
   "sortOrder":"DESC",
   "total":1,
   "result":[
      {
         "URI":"searchRequests/01LBxoX",
         "name":"super-search #1",
         "description":"Conscious description",
         "query":"filter=(equals(type,'configuration/entityTypes/HCP'))",
         "isFavorite":true,
         "uiState":{
            "searchPanelLength":100,
            "searchPanelWidth":100
         },
         "createDate":1398116799771,
         "updateDate":1398123175636,
         "isPublic":false,
         "count":0,
         "owner":"mike"
      }
   ]
   }