/api/search
Note
If the plugin is not configured or enabled, endpoints other than /api/search/lookup
will return an exception.
/api/search/tsmeta -
/api/search/tsmeta_summary - TSMETA_SUMMARY Response
/api/search/tsuids -
/api/search/uidmeta - UIDMETA Response
/api/search/annotation -
Verbs
GET
POST
Requests
Parameters used by the search endpoint include:
Query String:
POST:
{
"query": "name:*",
"limit": 4,
"startIndex": 5
}
Depending on the endpoint called, the output will change slightly. However common fields include:
Name | Data Type | Description | Example |
---|---|---|---|
type | String | The type of query submitted, i.e. the endpoint called. Will be one of the endpoints listed above. | TSMETA |
query | String | name:sys.cpu.* | |
limit | Integer | The maximum number of items returned in the result set. Note that the actual number returned may be less than the limit. | 25 |
startIndex | Integer | The starting index for the current result set as provided in the query | 0 |
metric | String | The metric used for the lookup | |
tags | Array | The list of tag pairs used for lookup queries. May be an empty list. | [ ] |
time | Integer | The amount of time it took, in milliseconds, to complete the query | 120 |
totalResults | Integer | The total number of results matched by the query | 1024 |
results | Array | The result set. The format depends on the endpoint requested. | See Below |
This endpoint will almost always return a 200
with content body. If the query doesn’t match any results, the results
field will be an empty array and totalResults
will be 0. If an error occurs, such as the plugin being disabled or not configured, an exception will be returned.
TSMETA Response
The TSMeta endpoint returns a list of matching TSMeta objects.
TSMETA_SUMMARY Response
The TSMeta Summary endpoint returns just the basic information associated with a timeseries including the TSUID, the metric name and tags. The search is run against the same index as the TSMeta query but returns a subset of the data.
{
"type": "TSMETA_SUMMARY",
"query": "name:*",
"metric": "*",
"tags": [],
"limit": 3,
"time": 565,
"results": [
"tags": {
"fqdn": "web01.mysite.com"
},
"metric": "app.apache.connections",
"tsuid": "0000150000070010D0"
},
{
"tags": {
},
"metric": "app.apache.connections",
"tsuid": "0000150000070010D5"
},
{
"tags": {
"fqdn": "web03.mysite.com"
},
"metric": "app.apache.connections",
"tsuid": "0000150000070010D6"
}
],
"startIndex": 0,
"totalResults": 9688066
}
The TSUIDs endpoint returns a list of TSUIDS that match the query. The search is run against the same index as the TSMeta query but returns a subset of the data.
UIDMETA Response
{
"type": "UIDMETA",
"query": "name:*",
"metric": "*",
"tags": [],
"limit": 3,
"time": 517,
"results": [
"uid": "000007",
"type": "TAGK",
"name": "fqdn",
"notes": "",
"created": 1362655264,
"custom": null,
"displayName": ""
},
{
"uid": "0010D0",
"type": "TAGV",
"name": "web01.mysite.com",
"description": "",
"notes": "",
"created": 1362720007,
"custom": null,
"displayName": ""
},
{
"uid": "0010D5",
"type": "TAGV",
"name": "web02.mysite.com",
"description": "",
"notes": "",
"created": 1362720007,
"custom": null,
"displayName": ""
}
],
"startIndex": 0,
Annotation Response
The Annotation endpoint returns a list of Annotation objects that match the query.