Use this endpoint to get details of an existing saved search.
Notes
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.logout
endpoint.For more information, see Developing.
This topic contains the following information:
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:
Item | Description |
---|---|
Saved search name | Name of the saved search. |
Saved search ID | Unique number by which you can identify the saved search. The saved search ID can be used to perform a search while running the following APIs:
Using the search ID while performing a search (rather than a saved search name) might be more useful in scenarios when duplicate saved search names occur. Duplicate saved searches can occur in a scenario where one user creates a saved search with a particular name, while another user creates a saved search with the same name and also marks it as public. In this scenario, the first user can see two saved searches with the same name. Similarly, a duplicate saved search can occur when you import a content pack containing saved search with a duplicate name. |
Source | Source of the saved search, whether the source is a content pack, shared by another user, or created by the user. |
Source name | Name of the source – content pack name or user name (based on the source details). |
GET <protocol>://<host>:<port>/olaengine/itdaws/searchservices/savedsearch?savedSearchName=<Name>&version=<apiVersion>
The following parameters can be used in the request URL.
Parameter name | Description |
---|---|
Required | Protocol that you want to use for communication with the Console Server. Can be one of the following:
|
Required | Host name of the Console Server. |
Required | Port number of the Console Server. The default port is 9797. |
Optional | Name of an existing saved search for which you want to get details. |
version Optional | Version of the API. You can specify the version as Tip: Generally the API version is the same as the product version on which the API can be run. |
The following examples illustrate the inputs for getting details of saved searches by using the GET method:
The following example illustrates the input and response for getting details of all the saved searches existing in the system.
GET
http://localhost:9797/olaengine/itdaws/searchservices/savedsearch
{ "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" }] }
The following example illustrates the input and response for getting details of all the saved searches containing "clm" in their names.
GET
http://localhost:9797/olaengine/itdaws/searchservices/savedsearch?savedSearchName=clm
{ "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" }] }
The following sections help you understand the response elements:
The endpoint response contains the following main elements:
Response element | Description |
---|---|
Array | Can be one of the following:
|
{ "savedSearchInfoList": [ { "name": "ITDA data collected over time", "id": "itda_ss_1", "source": "User", "sourceName": "admin" } ] }
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": [] }
The following table describes the status codes that are likely to appear while working with this endpoint.HTTP status codes
Status code | Description |
---|---|
200 | Request completed successfully. Also displayed if no matching saved searches were found. |
401 | Authorization error (invalid authorization token or authorization token not present). |
500 | Error occurred while processing the request. Occurrence of this error is rare. For more information, see the error message. Alternatively, see the itda.log located at %BMC_ITDA_HOME%\logs. |