Instana Synthetic Test Playback Results API
The endpoints of this group retrieve the results for defined Synthetic tests. **Note on names in TagFilter/TagFilterExpression**: From R243, the name used in a TagFilter or a TagFilterExpression has the format: synthetic.\. It can be one of the following: synthetic.id (id is the test result id), synthetic.testId, synthetic.testName, synthetic.locationId, synthetic.applicationId, synthetic.serviceId, synthetic.syntheticType, synthetic.locationName, and synthetic.locationLabel. If it is a metric name, then the format is: synthetic.metrics\. For example, synthetic.metricsResponseTime, synthetic.metricsStatus. The names used prior to R243 should be considered as deprecated. They will be accepted temporarily and will be removed in an upcoming release. ## Get Synthetic test playback results The endpoint returns the aggregated Synthetic test result data ### Mandatory Parameters **testId** An array of the unique identifiers of Synthetic tests **metrics** A list of metric objects that define which metric should be returned, with the defined aggregation. Each metrics objects consists of minimum two items: 1. *metric* select a particular metric. This is the list of available metrics for all types of Synthetic Tests: synthetic.metricsResponseTime (ms), synthetic.metricsResponseSize (bytes), synthetic.metricsStatusCode (an integer represents an HTTP response code, e.g., 200, 401, 500), synthetic.metricsRequestSize (bytes), synthetic.metricsUploadSpeed (bytes per second), synthetic.metricsDownloadSpeed (bytes per second), synthetic.metricsRedirectTime (ms), synthetic.metricsRedirectCount, synthetic.metricsConnectCount, synthetic.metricsStatus (an integer, 1-success or 0-failure), and synthetic.tags (list of custom properties and values). The following metrics are only available for the HTTPAction type Synthetic Tests: synthetic.metricsBlocking (bytes), synthetic.metricsDns (bytes), synthetic.metricsConnect (bytes), synthetic.metricsSsl (bytes), synthetic.metricsSending (bytes), synthetic.metricsWaiting (bytes), and synthetic.metricsReceiving (bytes). The metric synthetic.customMetrics (list of custom metrics and values) is only available for SSLCertificate and DNS tests. For SSLCertificate, the custom metrics are returned as metrics. For DNS, the custom metrics are returned in the *ismDetails* field. The metric synthetic.tags adds the latest list of custom properties to the response. 2. *aggregation* Depending on the selected metric, different aggregations are available e.g., SUM, MEAN, P90 (90th percentile), DISTINCT_COUNT, and MAX. MAX is only allowed for synthetic.tags. **timeFrame** As in our UI you can specify the timeframe for metrics retrieval. ``` windowSize to (ms) (unix-timestamp) <----------------------| ``` The timeFrame might be adjusted to fit the metric granularity so that there is no partial bucket. For example, if the query timeFrame is 08:02 - 09:02 and the metric granularity is 5 minutes, the timeFrame will be adjusted to 08:05 - 09:00. The adjusted timeFrame will be returned in the response payload. If the query does not have any metric with granularity, a default granularity will be used for adjustment. ### Optional Parameters **metrics** By default you will get an aggregated metric for the selected timeframe * *granularity* * If it is not set you will get an aggregated value for the selected timeframe * If the granularity is set you will get data points with the specified granularity **in seconds** * The granularity should not be greater than the `windowSize` (important: `windowSize` is expressed in **milliseconds**) * The granularity should not be set too small relative to the `windowSize` to avoid creating an excessively large number of data points (max 600) * The granularity values are the same for all metrics **pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics 1. *page* select the page number you want to retrieve 2. *pageSize* set the number of Synthetic test results you want to return with one query **order** You can order the returned items alphanumerical by label, either ascending or descending 1. *by* Use the metric name, e.g. "synthetic.metricsResponseTime", to order by its value 2. *direction* either ascending (ASC) or descending (DESC) **tagFilters** It serves as a filter to narrow down return results. It will be replaced by **tagFilterExpression**. **tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with logical operators AND or OR. A payload only needs either tagFilters or tagFilterExpression as a filter, not both. Either tagFilters or tagFilterExpression can specify a custom property by its key and value. ``` "tagFilters":[{ "name":"synthetic.tags", "key":"location", "value":"Denver", "operator":"EQUALS" }] ``` To narrow down the result set you have two options to search for a test. **locationId | applicationId** * *synthetic.locationId:* filter by locationId * *synthetic.applicationId:* filter by applicationId ### Defaults **metrics** * *granularity:* 0 **timeFrame** ``` "timeFrame": { "windowSize": 60000, "to": {current timestamp} } ``` **locationId | applicationId** * no filters are applied in the default call ### Sample payload to get a Synthetic test result ``` { "testId": ["tUmWgvzdo1Q1vpVRpzR5", "Pg0Q1UqHRd7OMysohVLd"], "//comment1": "Get test results from last 30 minutes (windowSize), data are aggregated every 10 minutes (granularity)", "//comment2": "The granularity values for responseTime and responseSize must be the same" "metrics": [ { "aggregation": "MEAN", "granularity": 600, "metric": "synthetic.metricsResponseTime" }, { "aggregation": "MEAN", "granularity": 600, "metric": "synthetic.metricsResponseSize" }], "timeFrame": { "to": 0, "windowSize": 1800000 } } ``` ## Get a list of Synthetic test playback results (analytic function) The endpoint returns the Synthetic test result data based upon the specified analytic function. The *tagFilterExpression* is applied to the result data and is then grouped by the synthetic.testId before the analytic function is applied. Optionally, after the analytic function is applied to the result data, the *tagFilters* can further filter the result. ### Mandatory Parameters **analyticFunction** It is a string. Valid values are *FIRST_VALUE* and *LAST_VALUE*. **syntheticMetrics** It is an array of metrics. The available metrics for all types of Synthetic Tests: synthetic.id (a string representing the test result ID), synthetic.metricsResponseTime (ms), synthetic.metricsResponseSize (bytes), synthetic.metricsStatusCode (an integer represents an HTTP response code, e.g., 200, 401, 500), synthetic.metricsRequestSize (bytes), synthetic.metricsUploadSpeed (bytes per second), synthetic.metricsDownloadSpeed (bytes per second), synthetic.metricsRedirectTime (ms), synthetic.metricsRedirectCount, synthetic.metricsConnectCount, synthetic.metricsStatus (an integer, 1-success or 0-failure), and synthetic.tags (list of custom properties and values). The following metrics are only available for the HTTPAction type Synthetic Tests: synthetic.metricsBlocking (bytes), synthetic.metricsDns (bytes), synthetic.metricsConnect (bytes), synthetic.metricsSsl (bytes), synthetic.metricsSending (bytes), synthetic.metricsWaiting (bytes), and synthetic.metricsReceiving (bytes). The metric synthetic.customMetrics (list of custom metrics and values) is only available for SSLCertificate and DNS tests. For SSLCertificate, the custom metrics are returned as metrics. For DNS, the custom metrics are returned in the *ismDetails* field. The metric synthetic.tags adds the latest list of custom properties to the response. **timeFrame** As in our UI you can specify the timeframe for metrics retrieval. ``` windowSize to (ms) (unix-timestamp) <----------------------| ``` ### Optional Parameters **includeLocationIdGrouping** A boolean. The default grouping for the API is synthetic.testId. Specify *true* to change the grouping to synthetic.testId, synthetic.locationId. The default for this parameter is *false*. **pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics 1. *page* select the page number you want to retrieve 2. *pageSize* set the number of Synthetic test results you want to return with one query **order** You can order the returned items alphanumerical by label, either ascending or descending 1. *by* Use the metric name, e.g. "synthetic.metricsResponseTime" to order by that value 2. *direction* either ascending (ASC) or descending (DESC) **tagFilterExpression** It serves as a filter to define the scope of relevant results that will be grouped and then applied to the analytic function. Its type can be either EXPRESSION or TAG_FILTER with logical operators *AND* or *OR*. **tagFilters** The tagFilters are applied to the result set generated by the analytic function. An example: if there are three tests and their last value status are 1, 0, 1 (indicating success, failure, success) and **tagFilters** is not specified, then the API with LAST_VALUE will return three tests with the stated statuses. If **tagFilters** is specified with synthetic.metricsStatus equal to 0 (failed), then the final result set will be the tests that failed the last time that they ran and in this example will be one record consisting of the test with status 0. Either tagFilters or tagFilterExpression can specify a custom property by its key and value. ``` "tagFilters":[{ "name":"synthetic.tags", "key":"location", "value":"Denver", "operator":"EQUALS" }] ``` ### Sample payload to retrieve the response_size and response_time from the last result of each test that ran within the last five minutes. Include both scheduled and on-demand tests. ```json { "syntheticMetrics":["synthetic.metricsResponseSize","synthetic.metricsResponseTime"], "analyticFunction": "LAST_VALUE", "order":{ "by":"synthetic.startTime", "direction":"DESC" }, "tagFilterExpression": { "type":"EXPRESSION", "logicalOperator":"AND", "elements":[{ "stringValue":"All", "name":"synthetic.runType", "operator":"EQUALS" }] }, "timeFrame": { "to": 0, "windowSize": 300000 } } ``` ### Sample payload to retrieve the response_size and response_time from the last result of each test that ran within the last five minutes. Include both scheduled and on-demand tests. Only return results for tests that failed the last time that they ran. ```json { "syntheticMetrics":["synthetic.metricsResponseSize","synthetic.metricsResponseTime"], "analyticFunction": "LAST_VALUE", "order":{ "by":"synthetic.startTime", "direction":"DESC" }, "tagFilterExpression": { "type":"EXPRESSION", "logicalOperator":"AND", "elements":[{ "stringValue":"All", "name":"synthetic.runType", "operator":"EQUALS" }] }, "tagFilters":[{ "numberValue": 0, "name":"synthetic.metricsStatus", "operator":"EQUALS" }], "timeFrame": { "to": 0, "windowSize": 300000 } } ``` ## Get a list of Synthetic test playback results (no aggregation) ### Mandatory Parameters **syntheticMetrics** It is an array of metrics. The available metrics for all types of Synthetic Tests: synthetic.id (a string representing the test result ID), synthetic.metricsResponseTime (ms), synthetic.metricsResponseSize (bytes), synthetic.metricsStatusCode (an integer represents an HTTP response code, e.g., 200, 401, 500), synthetic.metricsRequestSize (bytes), synthetic.metricsUploadSpeed (bytes per second), synthetic.metricsDownloadSpeed (bytes per second), synthetic.metricsRedirectTime (ms), synthetic.metricsRedirectCount, synthetic.metricsConnectCount, synthetic.metricsStatus (an integer, 1-success or 0-failure), and synthetic.tags (list of custom properties and values). The following metrics are only available for the HTTPAction type Synthetic Tests: synthetic.metricsBlocking (bytes), synthetic.metricsDns (bytes), synthetic.metricsConnect (bytes), synthetic.metricsSsl (bytes), synthetic.metricsSending (bytes), synthetic.metricsWaiting (bytes), and synthetic.metricsReceiving (bytes). The metric synthetic.customMetrics (list of custom metrics and values) is only available for SSLCertificate and DNS tests. For SSLCertificate, the custom metrics are returned as metrics. For DNS, the custom metrics are returned in the *ismDetails* field. The metric synthetic.tags adds the latest list of custom properties to the response. **timeFrame** As in our UI you can specify the timeframe for metrics retrieval. ``` windowSize to (ms) (unix-timestamp) <----------------------| ``` ### Optional Parameters **pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics 1. *page* select the page number you want to retrieve 2. *pageSize* set the number of Synthetic test results you want to return with one query **order** You can order the returned items alphanumerical by label, either ascending or descending 1. *by* Use the metric name, e.g. "synthetic.metricsResponseTime" to order by that value 2. *direction* either ascending (ASC) or descending (DESC) **tagFilters** It serves as a filter to narrow down return results. It will be replaced by **tagFilterExpression**. **tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with logical operators AND or OR. A payload only needs either tagFilters or tagFilterExpression as a filter, not both. Either tagFilters or tagFilterExpression can specify a custom property by its key and value. ``` "tagFilters":[{ "name":"synthetic.tags", "key":"location", "value":"Denver", "operator":"EQUALS" }] ``` ### Sample payload to get a list of Synthetic test results with tagFilters ```json { "syntheticMetrics":["synthetic.metricsResponseTime","synthetic.metricsResponseSize"], "order":{ "by":"synthetic.metricsResponseTime", "direction":"DESC" }, "tagFilters":[{ "stringValue":"hYziqsaXSJmQsehOWg1S", "name":"synthetic.testId", "operator":"EQUALS" }], "timeFrame": { "to": 0, "windowSize": 1800000 } } ``` ### Sample payload to get a list of Synthetic test results with tagFilterExpression ```json { "syntheticMetrics":["synthetic.metricsResponseTime","synthetic.metricsResponseSize"], "order":{ "by":"synthetic.metricsResponseTime", "direction":"DESC" }, "tagFilterExpression": { "type":"EXPRESSION", "logicalOperator":"AND", "elements":[{ "stringValue":"hYziqsaXSJmQsehOWg1S", "name":"synthetic.testId", "operator":"EQUALS" }, { "name": "synthetic.locationId", "operator": "EQUALS", "stringValue": "abcdefgXSJmQsehOWg1S" }] }, "timeFrame": { "to": 0, "windowSize": 1800000 } } ``` ### Sample payload to get the custom metrics of a Synthetic SSLCertificate test ```json { "syntheticMetrics":["synthetic.customMetrics"], "tagFilters":[{ "stringValue":"dk6yzb9fxCDlB6axIhUu", "name":"synthetic.testId", "operator":"EQUALS" }], "timeFrame": { "to": 0, "windowSize": 172800000 } } ``` ## Get a list of Synthetic tests with Success Rate and Average Response Time data The endpoint returns a list of Synthetic tests with Success Rate and Average Response Time result data ### Mandatory Parameters **metrics** 1. *metric* select a particular metric. Right now, only synthetic.metricsResponseTime (ms) is supported. 2. *aggregation* MEAN 3. *granularity* 60 **timeFrame** As in our UI you can specify the timeframe for metrics retrieval. ``` windowSize to (ms) (unix-timestamp) <----------------------| "timeFrame": { "windowSize": 60000, "to": {current timestamp} } ``` ### Optional Parameters **pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics 1. *page* select the page number you want to retrieve 2. *pageSize* set the number of Synthetic test results you want to return with one query **order** You can order the returned items alphanumerical by label, either ascending or descending 1. *by* Use the metric name, "synthetic.metricsResponseTime", to order by its value 2. *direction* either ascending (ASC) or descending (DESC) **tagFilters** It serves as a filter to narrow down return results. The name of a tagFilter is one of the following: synthetic.syntheticType, synthetic.locationId, and synthetic.applicationId. It will be replaced by **tagFilterExpression**. ``` "tagFilters":[{ "stringValue":"hYziqsaXSJmQsehOWg1S", "name":"synthetic.applicationId", "operator":"EQUALS" }] ``` **tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with logical operators AND or OR. ``` "tagFilterExpression": { "type":"EXPRESSION", "logicalOperator":"AND", "elements":[{ "name": "synthetic.metricsStatus", "operator": "EQUALS", "numberValue": 1 }, { "name": "synthetic.locationId", "operator": "EQUALS", "stringValue":"WnjlKKbgzLDnyGra6PAs" }] } ``` A payload only needs either tagFilters or tagFilterExpression as a filter, not both. Either tagFilters or tagFilterExpression can specify a custom property by its key and value. ``` "tagFilters":[{ "name":"synthetic.tags", "key":"location", "value":"Denver", "operator":"EQUALS" }] ``` To narrow down the result set you have three options to search for a test. **syntheticType | locationId | applicationId** * *synthetic.syntheticType:* filter by syntheticType, either HTTPAction or HTTPScript * *synthetic.locationId:* filter by locationId * *synthetic.applicationId:* filter by applicationId Tests can also be filtered by their active state (`true`/`false`) using the custom property label `synthetic.testActive`. ``` "tagFilters": [{ "name":"synthetic.testActive", "operator":"EQUALS", "booleanValue": false }] ``` ### Defaults **syntheticType | locationId | applicationId** * no filters are applied in the default call ### Sample payload to get a list of active Synthetic tests with SuccessRate and Average Response Time results ``` { "metrics": [ { "aggregation": "MEAN", "granularity": 60, "metric": "synthetic.metricsResponseTime" }], "tagFilterExpression": { "type":"EXPRESSION", "logicalOperator":"AND", "elements":[{ "name": "synthetic.locationId", "operator": "EQUALS", "stringValue": "abcdefgXSJmQsehOWg1S" }, { "name": "synthetic.testActive", "operator": "EQUALS", "booleanValue": true }] }, "timeFrame": { "to": 0, "windowSize": 3600000 } } ``` ## Get a list of Synthetic locations with Last Test Run on (each location) data The endpoint returns a list of Synthetic locations with Last Test Run on (each location) result data ### Mandatory Parameters **timeFrame** As in our UI you can specify the timeframe for metrics retrieval. ``` windowSize to (ms) (unix-timestamp) <----------------------| "timeFrame": { "windowSize": 60000, "to": {current timestamp} } ``` ### Optional Parameters **pagination** if you use pagination you should use the same timeFrame for all of the pages you want to query 1. *page* select the page number you want to retrieve 2. *pageSize* set the number of Synthetic locations you want to return with one query **order** You can order the returned items alphanumerically by label, either ascending or descending 1. *by* Use the metric name, e.g., "location_name", to order by its value 2. *direction* either ascending (ASC) or descending (DESC) The sorting can be done on the following metrics: location_name, location_label, status, type, total_tests, last_test_run, and namespace **tagFilters** It serves as a filter to narrow down return results. The name of a tagFilter is one of the following: synthetic.locationName, synthetic.locationLabel, and synthetic.locationId. It will be replaced by **tagFilterExpression**. ``` "tagFilters":[{ "stringValue":"hYziqsaXSJmQsehOWg1S", "name":"synthetic.locationId", "operator":"EQUALS" }] ``` **tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with logical operators AND or OR. ``` "tagFilterExpression": { "type":"EXPRESSION", "logicalOperator":"OR", "elements":[{ "name": "synthetic.locationId", "operator": "EQUALS", "stringValue":"WnjlKKbgzLDnyGra6PAs" }] } ``` A payload only needs either tagFilters or tagFilterExpression as a filter, not both. ### Sample payload to get a list of Synthetic locations with Last Test Run on (each location) data ``` { "order": { "by": "status", "direction": "Desc" }, "timeFrame": { "to": 0, "windowSize": 3600000 } } ``` ## Get Synthetic test playback result detail data ### Query Parameters **type** The type of the detailed data. Its value is one of these types: SUBTRANSACTIONS, LOGS, and HAR. **name** The name of the file to be retrieved, if more than one file available for the same type. Used when the type equals to LOGS or IMAGES ## Download a Synthetic test playback result detail data file ### Query Parameter **type** The type of a single compressed file. Its value is one of these types: SUBTRANSACTIONS, LOGS, IMAGES, VIDEOS, and HAR.
Documentation
Specifications
Other Resources
openapi: 3.0.1
info:
contact:
email: support@instana.com
name: © Instana
url: http://instana.com
termsOfService: https://www.instana.com/terms-of-use/
title: Instana REST API documentation Synthetic Test Playback Results API
version: 1.307.1417
x-ibm-ahub-try: true
x-logo:
altText: instana logo
backgroundColor: '#FAFBFC'
url: header-logo.svg
description: "Searching for answers and best pratices? Check our [IBM Instana Community](https://community.ibm.com/community/user/aiops/communities/community-home?CommunityKey=58f324a3-3104-41be-9510-5b7c413cc48f).\n\n<div style=\"background-color:#e6f0ff; padding: 12px; border-left: 6px solid #0052cc; font-size: 14px; display: flex; align-items: center;\">\n <img src=\"https://img.icons8.com/ios-filled/50/0052cc/info.png\" width=\"18\" height=\"18\" style=\"margin-right: 8px;\" alt=\"info icon\"/>\n <span>\n <b>Our API documentation is moving to</b> \n <a href=\"https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Introduction\" target=\"_blank\">API Hub</a>\n\t — please update your bookmarks now, as the current site will be deprecated after Release-306.\n </span>\n</div>\n\n## Overview\nThe Instana REST API provides programmatic access to the Instana platform. It can be used to retrieve data available through the Instana UI Dashboard -- metrics, events, traces, etc -- and also to automate configuration tasks such as user management.\n\n### Navigating the API documentation\nThe API endpoints are grouped by product area and functionality. This generally maps to how our UI Dashboard is organized, hopefully making it easier to locate which endpoints you'd use to fetch the data you see visualized in our UI. The [UI sections](https://www.ibm.com/docs/en/instana-observability/current?topic=working-user-interface#navigation-menu) include:\n- Websites & Mobile Apps\n- Applications\n- Infrastructure\n- Synthetic Monitoring\n- Events\n- Automation\n- Service Levels\n- Settings\n- etc\n\n### Rate Limiting\nA rate limit is applied to API usage. Up to 5,000 calls per hour can be made. How many remaining calls can be made and when this call limit resets, can inspected via three headers that are part of the responses of the API server.\n\n- **X-RateLimit-Limit:** Shows the maximum number of calls that may be executed per hour.\n- **X-RateLimit-Remaining:** How many calls may still be executed within the current hour.\n- **X-RateLimit-Reset:** Time when the remaining calls will be reset to the limit. For compatibility reasons with other rate limited APIs, this date is not the date in milliseconds, but instead in seconds since 1970-01-01T00:00:00+00:00.\n\n### Further Reading\nWe provide additional documentation for our REST API in our [product documentation](https://www.ibm.com/docs/en/instana-observability/current?topic=apis-web-rest-api). Here you'll also find some common queries for retrieving data and configuring Instana.\n\n## Getting Started with the REST API\n\n### API base URL\nThe base URL for an specific instance of Instana can be determined using the tenant and unit information.\n- `base`: This is the base URL of a tenant unit, e.g. `https://test-example.instana.io`. This is the same URL that is used to access the Instana user interface.\n- `apiToken`: Requests against the Instana API require valid API tokens. An initial API token can be generated via the Instana user interface. Any additional API tokens can be generated via the API itself.\n\n### Curl Example\nHere is an Example to use the REST API with Curl. First lets get all the available metrics with possible aggregations with a GET call.\n\n```bash\ncurl --request GET \\\n --url https://test-instana.instana.io/api/application-monitoring/catalog/metrics \\\n --header 'authorization: apiToken xxxxxxxxxxxxxxxx'\n```\n\nNext we can get every call grouped by the endpoint name that has an error count greater then zero. As a metric we could get the mean error rate for example.\n\n```bash\ncurl --request POST \\\n --url https://test-instana.instana.io/api/application-monitoring/analyze/call-groups \\\n --header 'authorization: apiToken xxxxxxxxxxxxxxxx' \\\n --header 'content-type: application/json' \\\n --data '{\n \"group\":{\n \"groupbyTag\":\"endpoint.name\"\n },\n \"tagFilters\":[\n \t{\n \t\t\"name\":\"call.error.count\",\n \t\t\"value\":\"0\",\n \t\t\"operator\":\"GREATER_THAN\"\n \t}\n ],\n \"metrics\":[\n \t{\n \t\t\"metric\":\"errors\",\n \t\t\"aggregation\":\"MEAN\"\n \t}\n ]\n }'\n```\n\n### Generating REST API clients\n\nThe API is specified using the [OpenAPI v3](https://github.com/OAI/OpenAPI-Specification) (previously known as Swagger) format.\nYou can download the current specification at our [GitHub API documentation](https://instana.github.io/openapi/openapi.yaml).\n\nOpenAPI tries to solve the issue of ever-evolving APIs and clients lagging behind. Please make sure that you always use the latest version of the generator, as a number of improvements are regularly made.\nTo generate a client library for your language, you can use the [OpenAPI client generators](https://github.com/OpenAPITools/openapi-generator).\n\n#### Go\nFor example, to generate a client library for Go to interact with our backend, you can use the following script; mind replacing the values of the `UNIT_NAME` and `TENANT_NAME` environment variables using those for your tenant unit:\n\n```bash\n#!/bin/bash\n\n### This script assumes you have the `java` and `wget` commands on the path\n\nexport UNIT_NAME='myunit' # for example: prod\nexport TENANT_NAME='mytenant' # for example: awesomecompany\n\n//Download the generator to your current working directory:\nwget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar -O openapi-generator-cli.jar --server-variables \"tenant=${TENANT_NAME},unit=${UNIT_NAME}\"\n\n//generate a client library that you can vendor into your repository\njava -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g go \\\n -o pkg/instana/openapi \\\n --skip-validate-spec\n\n//(optional) format the Go code according to the Go code standard\ngofmt -s -w pkg/instana/openapi\n```\n\nThe generated clients contain comprehensive READMEs, and you can start right away using the client from the example above:\n\n```go\nimport instana \"./pkg/instana/openapi\"\n\n// readTags will read all available application monitoring tags along with their type and category\nfunc readTags() {\n\tconfiguration := instana.NewConfiguration()\n\tconfiguration.Host = \"tenant-unit.instana.io\"\n\tconfiguration.BasePath = \"https://tenant-unit.instana.io\"\n\n\tclient := instana.NewAPIClient(configuration)\n\tauth := context.WithValue(context.Background(), instana.ContextAPIKey, instana.APIKey{\n\t\tKey: apiKey,\n\t\tPrefix: \"apiToken\",\n\t})\n\n\ttags, _, err := client.ApplicationCatalogApi.GetApplicationTagCatalog(auth)\n\tif err != nil {\n\t\tfmt.Fatalf(\"Error calling the API, aborting.\")\n\t}\n\n\tfor _, tag := range tags {\n\t\tfmt.Printf(\"%s (%s): %s\\n\", tag.Category, tag.Type, tag.Name)\n\t}\n}\n```\n\n#### Java\nFollow the instructions provided in the official documentation from [OpenAPI Tools](https://github.com/OpenAPITools) to download the [openapi-generator-cli.jar](https://github.com/OpenAPITools/openapi-generator?tab=readme-ov-file#13---download-jar).\n\nDepending on your environment, use one of the following java http client implementations which will create a valid client for our OpenAPI specification:\n```\n//Nativ Java HTTP Client\njava -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8 --library native\n\n//Spring WebClient\njava -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library webclient\n\n//Spring RestTemplate\njava -jar openapi-generator-cli.jar generate -i https://instana.github.io/openapi/openapi.yaml -g java -o pkg/instana/openapi --skip-validate-spec -p dateLibrary=java8,hideGenerationTimestamp=true --library resttemplate\n\n```\n"
servers:
- description: Instana Backend
url: https://{unit}-{tenant}.instana.io
variables:
tenant:
default: tenant
description: Customer tenant unit
unit:
default: unit
description: Customer tenant name
- description: Instana Self-Hosted Backend
url: https://{domain}
variables:
domain:
default: example.com
description: Customer Self-Hosted domain
tags:
- name: Synthetic Test Playback Results
description: "The endpoints of this group retrieve the results for defined Synthetic tests.\n\n**Note on names in TagFilter/TagFilterExpression**: From R243, the name used in a TagFilter or a TagFilterExpression has the format: synthetic.\\<name\\>.\nIt can be one of the following: synthetic.id (id is the test result id), synthetic.testId,\nsynthetic.testName, synthetic.locationId, synthetic.applicationId, synthetic.serviceId, synthetic.syntheticType,\nsynthetic.locationName, and synthetic.locationLabel. If it is a metric name, then the format is: synthetic.metrics\\<MetricName\\>.\nFor example, synthetic.metricsResponseTime, synthetic.metricsStatus.\n\nThe names used prior to R243 should be considered as deprecated. They will be accepted temporarily and will be removed in an upcoming release.\n\n## Get Synthetic test playback results \nThe endpoint returns the aggregated Synthetic test result data\n\n### Mandatory Parameters \n\n**testId** An array of the unique identifiers of Synthetic tests\n\n**metrics** A list of metric objects that define which metric should be returned, with the defined aggregation. Each metrics objects consists of minimum two items:\n1. *metric* select a particular metric. This is the list of available metrics for all types of Synthetic Tests: \n synthetic.metricsResponseTime (ms), synthetic.metricsResponseSize (bytes), synthetic.metricsStatusCode (an integer represents an HTTP response code, e.g., 200, 401, 500), synthetic.metricsRequestSize (bytes), \n synthetic.metricsUploadSpeed (bytes per second), synthetic.metricsDownloadSpeed (bytes per second), \n synthetic.metricsRedirectTime (ms), synthetic.metricsRedirectCount, synthetic.metricsConnectCount, synthetic.metricsStatus (an integer, 1-success or 0-failure), and synthetic.tags (list of custom properties and values). \n \n The following metrics are only available for the HTTPAction type Synthetic Tests: synthetic.metricsBlocking (bytes), synthetic.metricsDns (bytes), synthetic.metricsConnect (bytes), synthetic.metricsSsl (bytes), \n synthetic.metricsSending (bytes), synthetic.metricsWaiting (bytes), and synthetic.metricsReceiving (bytes).\n\n The metric synthetic.customMetrics (list of custom metrics and values) is only available for SSLCertificate and DNS tests. For SSLCertificate, the custom metrics are returned as metrics. For DNS, the custom metrics are returned in the *ismDetails* field.\n\n The metric synthetic.tags adds the latest list of custom properties to the response.\n\n2. *aggregation* Depending on the selected metric, different aggregations are available e.g., SUM, MEAN, P90 (90th percentile), DISTINCT_COUNT, and MAX. MAX is only allowed for synthetic.tags.\n\n**timeFrame** As in our UI you can specify the timeframe for metrics retrieval.\n```\n windowSize to\n (ms) (unix-timestamp)\n<----------------------|\n```\nThe timeFrame might be adjusted to fit the metric granularity so that there is no partial bucket. For example, if the query timeFrame is 08:02 - 09:02 and the metric granularity is 5 minutes, the timeFrame will be adjusted to 08:05 - 09:00. The adjusted timeFrame will be returned in the response payload. If the query does not have any metric with granularity, a default granularity will be used for adjustment.\n\n### Optional Parameters\n\n**metrics** By default you will get an aggregated metric for the selected timeframe\n\n* *granularity*\n * If it is not set you will get an aggregated value for the selected timeframe\n * If the granularity is set you will get data points with the specified granularity **in seconds**\n * The granularity should not be greater than the `windowSize` (important: `windowSize` is expressed in **milliseconds**)\n * The granularity should not be set too small relative to the `windowSize` to avoid creating an excessively large number of data points (max 600)\n * The granularity values are the same for all metrics\n\n**pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics\n1. *page* select the page number you want to retrieve\n2. *pageSize* set the number of Synthetic test results you want to return with one query\n\n**order** You can order the returned items alphanumerical by label, either ascending or descending\n1. *by* Use the metric name, e.g. \"synthetic.metricsResponseTime\", to order by its value\n2. *direction* either ascending (ASC) or descending (DESC)\n\n**tagFilters** It serves as a filter to narrow down return results.\nIt will be replaced by **tagFilterExpression**.\n\n**tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with\nlogical operators AND or OR.\n\nA payload only needs either tagFilters or tagFilterExpression as a filter, not both.\n\nEither tagFilters or tagFilterExpression can specify a custom property by its key and value.\n```\n\"tagFilters\":[{\n \"name\":\"synthetic.tags\",\n \"key\":\"location\",\n \"value\":\"Denver\",\n \"operator\":\"EQUALS\"\n}]\n```\n\nTo narrow down the result set you have two options to search for a test.\n\n**locationId | applicationId**\n\n* *synthetic.locationId:* filter by locationId\n\n* *synthetic.applicationId:* filter by applicationId\n\n### Defaults\n\n**metrics**\n* *granularity:* 0\n\n**timeFrame**\n```\n\"timeFrame\": {\n\t\"windowSize\": 60000,\n\t\"to\": {current timestamp}\n}\n```\n**locationId | applicationId**\n* no filters are applied in the default call\n\n### Sample payload to get a Synthetic test result\n```\n{\n \"testId\": [\"tUmWgvzdo1Q1vpVRpzR5\", \"Pg0Q1UqHRd7OMysohVLd\"],\n \"//comment1\": \"Get test results from last 30 minutes (windowSize), data are aggregated every 10 minutes (granularity)\",\n \"//comment2\": \"The granularity values for responseTime and responseSize must be the same\"\n \"metrics\": [\n {\n \"aggregation\": \"MEAN\",\n \"granularity\": 600, \n \"metric\": \"synthetic.metricsResponseTime\"\n },\n {\n \"aggregation\": \"MEAN\",\n \"granularity\": 600, \n \"metric\": \"synthetic.metricsResponseSize\"\n }],\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 1800000 \n }\n}\n```\n\n## Get a list of Synthetic test playback results (analytic function)\nThe endpoint returns the Synthetic test result data based upon the specified analytic function.\nThe *tagFilterExpression* is applied to the result data and is then grouped by the synthetic.testId before the analytic function is applied. \nOptionally, after the analytic function is applied to the result data, the *tagFilters* can further filter the result. \n\n### Mandatory Parameters\n**analyticFunction** It is a string. Valid values are *FIRST_VALUE* and *LAST_VALUE*.\n\n**syntheticMetrics** It is an array of metrics. The available metrics for all types of Synthetic Tests: synthetic.id (a string representing the test result ID),\nsynthetic.metricsResponseTime (ms), synthetic.metricsResponseSize (bytes), synthetic.metricsStatusCode (an integer represents an HTTP response code, e.g., 200, 401, 500), synthetic.metricsRequestSize (bytes),\nsynthetic.metricsUploadSpeed (bytes per second), synthetic.metricsDownloadSpeed (bytes per second),\nsynthetic.metricsRedirectTime (ms), synthetic.metricsRedirectCount, synthetic.metricsConnectCount, synthetic.metricsStatus (an integer, 1-success or 0-failure), and synthetic.tags (list of custom properties and values).\n\nThe following metrics are only available for the HTTPAction type Synthetic Tests: synthetic.metricsBlocking (bytes), synthetic.metricsDns (bytes), synthetic.metricsConnect (bytes), synthetic.metricsSsl (bytes),\nsynthetic.metricsSending (bytes), synthetic.metricsWaiting (bytes), and synthetic.metricsReceiving (bytes).\n\nThe metric synthetic.customMetrics (list of custom metrics and values) is only available for SSLCertificate and DNS tests. For SSLCertificate, the custom metrics are returned as metrics. For DNS, the custom metrics are returned in the *ismDetails* field.\n\nThe metric synthetic.tags adds the latest list of custom properties to the response.\n\n**timeFrame** As in our UI you can specify the timeframe for metrics retrieval.\n```\n windowSize to\n (ms) (unix-timestamp)\n<----------------------|\n```\n\n### Optional Parameters\n**includeLocationIdGrouping** A boolean. The default grouping for the API is synthetic.testId. \nSpecify *true* to change the grouping to synthetic.testId, synthetic.locationId. The default for \nthis parameter is *false*.\n\n**pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics\n1. *page* select the page number you want to retrieve\n2. *pageSize* set the number of Synthetic test results you want to return with one query\n\n**order** You can order the returned items alphanumerical by label, either ascending or descending\n1. *by* Use the metric name, e.g. \"synthetic.metricsResponseTime\" to order by that value\n2. *direction* either ascending (ASC) or descending (DESC)\n\n**tagFilterExpression** It serves as a filter to define the scope of relevant results that will \nbe grouped and then applied to the analytic function. Its type can be either EXPRESSION or \nTAG_FILTER with logical operators *AND* or *OR*.\n\n**tagFilters** The tagFilters are applied to the result set generated by the analytic function. \nAn example: if there are three tests and their last value status\nare 1, 0, 1 (indicating success, failure, success) and \n**tagFilters** is not specified, then the API with LAST_VALUE will\nreturn three tests with the stated statuses. If **tagFilters** is specified with\nsynthetic.metricsStatus equal to 0 (failed), then the final result set will be the tests that \nfailed the last time that they ran and in this example will be one record consisting\nof the test with status 0.\n\nEither tagFilters or tagFilterExpression can specify a custom property by its key and value.\n```\n\"tagFilters\":[{\n \"name\":\"synthetic.tags\",\n \"key\":\"location\",\n \"value\":\"Denver\",\n \"operator\":\"EQUALS\"\n}]\n```\n\n### Sample payload to retrieve the response_size and response_time from the last result of each test that ran within the last five minutes. Include both scheduled and on-demand tests.\n```json\n{\n \"syntheticMetrics\":[\"synthetic.metricsResponseSize\",\"synthetic.metricsResponseTime\"],\n \"analyticFunction\": \"LAST_VALUE\",\n \"order\":{\n \"by\":\"synthetic.startTime\",\n \"direction\":\"DESC\"\n },\n \"tagFilterExpression\": {\n \"type\":\"EXPRESSION\",\n \"logicalOperator\":\"AND\",\n \"elements\":[{\n \"stringValue\":\"All\",\n \"name\":\"synthetic.runType\",\n \"operator\":\"EQUALS\"\n }]\n },\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 300000\n }\n}\n```\n\n### Sample payload to retrieve the response_size and response_time from the last result of each test that ran within the last five minutes. Include both scheduled and on-demand tests. Only return results for tests that failed the last time that they ran. \n```json\n{\n \"syntheticMetrics\":[\"synthetic.metricsResponseSize\",\"synthetic.metricsResponseTime\"],\n \"analyticFunction\": \"LAST_VALUE\",\n \"order\":{\n \"by\":\"synthetic.startTime\",\n \"direction\":\"DESC\"\n },\n \"tagFilterExpression\": {\n \"type\":\"EXPRESSION\",\n \"logicalOperator\":\"AND\",\n \"elements\":[{\n \"stringValue\":\"All\",\n \"name\":\"synthetic.runType\",\n \"operator\":\"EQUALS\"\n }]\n },\n \"tagFilters\":[{\n \"numberValue\": 0,\n \"name\":\"synthetic.metricsStatus\",\n \"operator\":\"EQUALS\"\n }],\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 300000\n }\n}\n```\n\n## Get a list of Synthetic test playback results (no aggregation)\n### Mandatory Parameters\n**syntheticMetrics** It is an array of metrics. The available metrics for all types of Synthetic Tests: synthetic.id (a string representing the test result ID), \nsynthetic.metricsResponseTime (ms), synthetic.metricsResponseSize (bytes), synthetic.metricsStatusCode (an integer represents an HTTP response code, e.g., 200, 401, 500), synthetic.metricsRequestSize (bytes),\nsynthetic.metricsUploadSpeed (bytes per second), synthetic.metricsDownloadSpeed (bytes per second),\nsynthetic.metricsRedirectTime (ms), synthetic.metricsRedirectCount, synthetic.metricsConnectCount, synthetic.metricsStatus (an integer, 1-success or 0-failure), and synthetic.tags (list of custom properties and values).\n\nThe following metrics are only available for the HTTPAction type Synthetic Tests: synthetic.metricsBlocking (bytes), synthetic.metricsDns (bytes), synthetic.metricsConnect (bytes), synthetic.metricsSsl (bytes),\nsynthetic.metricsSending (bytes), synthetic.metricsWaiting (bytes), and synthetic.metricsReceiving (bytes).\n\nThe metric synthetic.customMetrics (list of custom metrics and values) is only available for SSLCertificate and DNS tests. For SSLCertificate, the custom metrics are returned as metrics. For DNS, the custom metrics are returned in the *ismDetails* field.\n\nThe metric synthetic.tags adds the latest list of custom properties to the response.\n\n**timeFrame** As in our UI you can specify the timeframe for metrics retrieval.\n```\n windowSize to\n (ms) (unix-timestamp)\n<----------------------|\n```\n\n### Optional Parameters\n**pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics\n1. *page* select the page number you want to retrieve\n2. *pageSize* set the number of Synthetic test results you want to return with one query\n\n**order** You can order the returned items alphanumerical by label, either ascending or descending\n1. *by* Use the metric name, e.g. \"synthetic.metricsResponseTime\" to order by that value\n2. *direction* either ascending (ASC) or descending (DESC)\n\n**tagFilters** It serves as a filter to narrow down return results. \nIt will be replaced by **tagFilterExpression**.\n\n**tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with \nlogical operators AND or OR.\n\nA payload only needs either tagFilters or tagFilterExpression as a filter, not both.\n\nEither tagFilters or tagFilterExpression can specify a custom property by its key and value.\n```\n\"tagFilters\":[{\n \"name\":\"synthetic.tags\",\n \"key\":\"location\",\n \"value\":\"Denver\",\n \"operator\":\"EQUALS\"\n}]\n```\n\n### Sample payload to get a list of Synthetic test results with tagFilters\n```json\n{\n \"syntheticMetrics\":[\"synthetic.metricsResponseTime\",\"synthetic.metricsResponseSize\"],\n \"order\":{\n \"by\":\"synthetic.metricsResponseTime\",\n \"direction\":\"DESC\"\n },\n \"tagFilters\":[{\n \"stringValue\":\"hYziqsaXSJmQsehOWg1S\",\n \"name\":\"synthetic.testId\",\n \"operator\":\"EQUALS\"\n }],\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 1800000\n }\n}\n```\n\n### Sample payload to get a list of Synthetic test results with tagFilterExpression\n```json\n{\n \"syntheticMetrics\":[\"synthetic.metricsResponseTime\",\"synthetic.metricsResponseSize\"],\n \"order\":{\n \"by\":\"synthetic.metricsResponseTime\",\n \"direction\":\"DESC\"\n },\n \"tagFilterExpression\": { \n \"type\":\"EXPRESSION\",\n \"logicalOperator\":\"AND\",\n \"elements\":[{\n \"stringValue\":\"hYziqsaXSJmQsehOWg1S\",\n \"name\":\"synthetic.testId\",\n \"operator\":\"EQUALS\"\n }, {\n \"name\": \"synthetic.locationId\", \n \"operator\": \"EQUALS\", \n \"stringValue\": \"abcdefgXSJmQsehOWg1S\"\n }]\n },\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 1800000\n }\n}\n```\n\n### Sample payload to get the custom metrics of a Synthetic SSLCertificate test\n```json\n{\n \"syntheticMetrics\":[\"synthetic.customMetrics\"],\n \"tagFilters\":[{\n \"stringValue\":\"dk6yzb9fxCDlB6axIhUu\",\n \"name\":\"synthetic.testId\",\n \"operator\":\"EQUALS\"\n }],\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 172800000\n }\n}\n```\n\n## Get a list of Synthetic tests with Success Rate and Average Response Time data\nThe endpoint returns a list of Synthetic tests with Success Rate and Average Response Time result data\n\n### Mandatory Parameters\n\n**metrics**\n1. *metric* select a particular metric. Right now, only synthetic.metricsResponseTime (ms) is supported.\n2. *aggregation* MEAN\n3. *granularity* 60\n\n**timeFrame** As in our UI you can specify the timeframe for metrics retrieval.\n```\n windowSize to\n (ms) (unix-timestamp)\n<----------------------|\n\n\"timeFrame\": {\n\t\"windowSize\": 60000,\n\t\"to\": {current timestamp}\n}\n```\n\n### Optional Parameters\n\n**pagination** if you use pagination you most probably want to fix the timeFrame for the retrieved metrics\n1. *page* select the page number you want to retrieve\n2. *pageSize* set the number of Synthetic test results you want to return with one query\n\n**order** You can order the returned items alphanumerical by label, either ascending or descending\n1. *by* Use the metric name, \"synthetic.metricsResponseTime\", to order by its value\n2. *direction* either ascending (ASC) or descending (DESC)\n\n**tagFilters** It serves as a filter to narrow down return results. The name of a tagFilter is one of the following: \nsynthetic.syntheticType, synthetic.locationId, and synthetic.applicationId.\nIt will be replaced by **tagFilterExpression**.\n```\n\"tagFilters\":[{\n \"stringValue\":\"hYziqsaXSJmQsehOWg1S\",\n \"name\":\"synthetic.applicationId\",\n \"operator\":\"EQUALS\"\n}]\n```\n\n**tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with\nlogical operators AND or OR.\n```\n\"tagFilterExpression\": { \n \"type\":\"EXPRESSION\",\n \"logicalOperator\":\"AND\",\n \"elements\":[{\n \"name\": \"synthetic.metricsStatus\", \n \"operator\": \"EQUALS\", \n \"numberValue\": 1\n }, {\n \"name\": \"synthetic.locationId\", \n \"operator\": \"EQUALS\", \n \"stringValue\":\"WnjlKKbgzLDnyGra6PAs\"\n }]\n}\n```\n\nA payload only needs either tagFilters or tagFilterExpression as a filter, not both.\n\nEither tagFilters or tagFilterExpression can specify a custom property by its key and value.\n```\n\"tagFilters\":[{\n \"name\":\"synthetic.tags\",\n \"key\":\"location\",\n \"value\":\"Denver\",\n \"operator\":\"EQUALS\"\n}]\n```\n\nTo narrow down the result set you have three options to search for a test.\n\n**syntheticType | locationId | applicationId**\n\n* *synthetic.syntheticType:* filter by syntheticType, either HTTPAction or HTTPScript\n\n* *synthetic.locationId:* filter by locationId\n\n* *synthetic.applicationId:* filter by applicationId\n\n\nTests can also be filtered by their active state (`true`/`false`) using the custom property label `synthetic.testActive`.\n```\n\"tagFilters\": [{ \n \"name\":\"synthetic.testActive\", \n \"operator\":\"EQUALS\",\n \"booleanValue\": false \n}]\n```\n\n### Defaults\n\n**syntheticType | locationId | applicationId**\n* no filters are applied in the default call\n\n### Sample payload to get a list of active Synthetic tests with SuccessRate and Average Response Time results\n```\n{\n \"metrics\": [\n {\n \"aggregation\": \"MEAN\",\n \"granularity\": 60, \n \"metric\": \"synthetic.metricsResponseTime\"\n }],\n \"tagFilterExpression\": { \n \"type\":\"EXPRESSION\",\n \"logicalOperator\":\"AND\",\n \"elements\":[{\n \"name\": \"synthetic.locationId\", \n \"operator\": \"EQUALS\", \n \"stringValue\": \"abcdefgXSJmQsehOWg1S\"\n }, {\n \"name\": \"synthetic.testActive\",\n \"operator\": \"EQUALS\",\n \"booleanValue\": true\n }]\n },\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 3600000 \n }\n}\n```\n\n## Get a list of Synthetic locations with Last Test Run on (each location) data\nThe endpoint returns a list of Synthetic locations with Last Test Run on (each location) result data\n\n### Mandatory Parameters\n\n**timeFrame** As in our UI you can specify the timeframe for metrics retrieval.\n```\n windowSize to\n (ms) (unix-timestamp)\n<----------------------|\n\n\"timeFrame\": {\n\t\"windowSize\": 60000,\n\t\"to\": {current timestamp}\n}\n```\n\n### Optional Parameters\n\n**pagination** if you use pagination you should use the same timeFrame for all of the pages you want to query\n1. *page* select the page number you want to retrieve\n2. *pageSize* set the number of Synthetic locations you want to return with one query\n\n**order** You can order the returned items alphanumerically by label, either ascending or descending\n1. *by* Use the metric name, e.g., \"location_name\", to order by its value\n2. *direction* either ascending (ASC) or descending (DESC)\n\n The sorting can be done on the following metrics: location_name, location_label, status, type, total_tests,\n last_test_run, and namespace\n\n**tagFilters** It serves as a filter to narrow down return results. The name of a tagFilter is one of the following: \nsynthetic.locationName, synthetic.locationLabel, and synthetic.locationId.\nIt will be replaced by **tagFilterExpression**.\n```\n\"tagFilters\":[{\n \"stringValue\":\"hYziqsaXSJmQsehOWg1S\",\n \"name\":\"synthetic.locationId\",\n \"operator\":\"EQUALS\"\n}]\n```\n\n**tagFilterExpression** It serves as a filter to narrow down return results. Its type can be either EXPRESSION or TAG_FILTER with\nlogical operators AND or OR.\n```\n\"tagFilterExpression\": { \n \"type\":\"EXPRESSION\",\n \"logicalOperator\":\"OR\",\n \"elements\":[{\n \"name\": \"synthetic.locationId\", \n \"operator\": \"EQUALS\", \n \"stringValue\":\"WnjlKKbgzLDnyGra6PAs\"\n }]\n}\n```\n\nA payload only needs either tagFilters or tagFilterExpression as a filter, not both.\n\n### Sample payload to get a list of Synthetic locations with Last Test Run on (each location) data\n```\n{\n \"order\": {\n \t\"by\": \"status\", \n \t\"direction\": \"Desc\"\n },\n \"timeFrame\": {\n \"to\": 0,\n \"windowSize\": 3600000 \n }\n}\n```\n\n## Get Synthetic test playback result detail data\n\n### Query Parameters\n**type** The type of the detailed data. Its value is one of these types: SUBTRANSACTIONS, LOGS, and HAR.\n\n**name** The name of the file to be retrieved, if more than one file available for the same type. Used when the type equals to LOGS or IMAGES\n\n## Download a Synthetic test playback result detail data file\n\n### Query Parameter\n**type** The type of a single compressed file. Its value is one of these types: SUBTRANSACTIONS, LOGS, IMAGES, VIDEOS, and HAR.\n"
paths:
/api/synthetics/results:
post:
description: 'Get a list of aggregated playback results metrics for Synthetic tests matching the specified parameters
For more information on Synthetic Test Playback Results please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Synthetic+Monitoring#synthetic-test-playback-results.'
operationId: getSyntheticResult
requestBody:
content:
application/json:
example:
pagination:
page: 1
pageSize: 3
metrics:
- metric: synthetic.metricsResponseTime
aggregation: SUM
order:
by: synthetic.startTime
direction: DESC
timeFrame:
to: 0
windowSize: 144000000
schema:
$ref: '#/components/schemas/GetTest
# --- truncated at 32 KB (78 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/instana/refs/heads/main/openapi/instana-synthetic-test-playback-results-api-openapi.yml