Getting details of a saved search with a REST API


Use this endpoint to get details of an existing saved search.

Notes
  • Before running this endpoint, you need to generate an authorization token by running the login endpoint. This token is used to authenticate a user into the product. You need to pass this token in the header each time you want to run the endpoint.
  • To log out from a given session, you need to run the logout endpoint.
For more information, see Developing.

This topic contains the following information:

Endpoint overview

Use the GET method to get details of existing saved searches or all the saved searches existing in the system.

To get details of a particular saved search, you need to specify the saved search name. You can also specify a portion of the saved search name to get details of all the saved searches matching that portion fully and partially. For example, if you provide "SS1" as the name, details for the saved searches "SS1", "SS12", and "ss13" are returned.

If you do not specify any name, details of the all the saved searches are returned.

This endpoint returns the following saved search details:

Request URL

GET <protocol>://<host>:<port>/olaengine/itdaws/searchservices/savedsearch?savedSearchName=<Name>&version=<apiVersion>

Parameter definitions

The following parameters can be used in the request URL.

Examples

The following examples illustrate the inputs for getting details of saved searches by using the GET method:

Example 1: Get details of all the saved searches

The following example illustrates the input and response for getting details of all the saved searches existing in the system.

Request URL

GET http://localhost:9797/olaengine/itdaws/searchservices/savedsearch

Response
{
   "savedSearchInfoList": [{
       "name": "API_Class",
       "id": "102be3d4-8729-44e8-b962-927bfdc30bbc",
       "source": "User",
       "sourceName": "admin"
    }, {
       "name": "CLM:CLMContentPack:Deprovisioning rate in last 7 days",
       "id": "bcb55c2a-8c30-4565-849f-0885f98db382",
       "source": "ContentPack",
       "sourceName": "CLMContentPack"
    }, {
       "name": "CLM:CLMContentPack:Failed Trasactions over last 7 days",
       "id": "ed2cabd7-4169-4199-8903-be689c30f7b8",
       "source": "ContentPack",
       "sourceName": "CLMContentPack"
    }, {
       "name": "warning_message",
       "id": "bc9cdd85-7da8-4fc0-b022-6fd52dff2939",
       "source": "User",
       "sourceName": "admin"
    }]
}

Example 2:  Get details of all the saved searches containing the specified name

The following example illustrates the input and response for getting details of all the saved searches containing "clm" in their names.

Request URL

GET http://localhost:9797/olaengine/itdaws/searchservices/savedsearch?savedSearchName=clm

Response
{
   "savedSearchInfoList": [{
       "name": "CLM:CLMContentPack:Deprovisioning rate in last 7 days",
       "id": "bcb55c2a-8c30-4565-849f-0885f98db382",
       "source": "ContentPack",
       "sourceName": "CLMContentPack"
    }, {
       "name": "CLM:CLMContentPack:Failed Trasactions over last 7 days",
       "id": "ed2cabd7-4169-4199-8903-be689c30f7b8",
       "source": "ContentPack",
       "sourceName": "CLMContentPack"
    }]
}

Response elements

The following sections help you understand the response elements:

Element definitions

Successful response sample

Response
{
   "savedSearchInfoList": [
        {
           "name": "ITDA data collected over time",
           "id": "itda_ss_1",
           "source": "User",
           "sourceName": "admin"
        }
    ]
}

Unsuccessful response sample

Note: The following response is displayed when no matching saved searches were found. You need to ensure that the saved search name is correct. Alternatively, you can run the API to list details of all the saved searches. For more information, see the examples.

{
   "savedSearchInfoList": []
}

HTTP status codes

The following table describes the status codes that are likely to appear while working with this endpoint.


 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*