Instana Synthetic Metrics API

The endpoints of this group retrieve metrics for Synthetic test results. ### Mandatory Parameters **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), synthetic.successRate, 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. Metric synthetic.successRate only accepts MEAN. **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. If **groups** includes a groupbyTag that is an array, such as synthetic.tags, the maximum windowSize is *3600000* (1 hour). ### 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, 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 **groups** You can group test results by one or more tags. 1. *groupbyTag* use the metric or tag name, e.g. "synthetic.applicationId", to group by its value 2. *groupbyTagSecondLevelTag* is optional. It is used to further qualify values when the *groupbyTag* is an array of key/value pairs, such as "synthetic.tags". 3. *groupbyTagEntity* is ignored and therefore does not need to be specified. If *groups* is not specified, the default grouping is *synthetic.testId*. An example of grouping by the custom property "region": ``` "groups": [ { "groupbyTag": "synthetic.tags", "groupbyTagSecondLevelTag": "region" } ] ``` **includeAggregatedTestIds** Optionally used when not grouping by testId. Specifying *true* will return a list of tests that were included in the aggregated result for each row returned. **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 tagFilterExpression can specify a custom property by its key and value. ``` "tagFilterExpression": { "type": "EXPRESSION", "logicalOperator": "AND", "elements": [ { "name": "synthetic.tags", "key": "region", "value": "Denver", "operator": "EQUALS" }, { "name": "synthetic.locationId", "operator": "EQUALS", "stringValue": "abcdefgXSJmQsehOWg1S" } ] } ``` ### Defaults **groups** ``` "groups": [ "groupbyTag": "synthetic.testId" ] ``` **includeAggregatedTestIds** * *includeAggregatedTestIds:* *true* when grouping by synthetic.testId, otherwise *false*. **metrics** * *granularity:* 0 **pagination** * If **pagination** is not specified, the entire result set is returned. **timeFrame** ``` "timeFrame": { "to": {current timestamp}, "windowSize": 60000 } ``` ### Sample payload to get the mean synthetic.metricsResponseTIme for each Synthetic test within the specified timeFrame ```json { "metrics": [ { "aggregation": "MEAN", "metric": "synthetic.metricsResponseTime" }], "timeFrame": { "to": 0, "windowSize": 1800000 } } ``` ### Sample payload to get the mean synthetic.metricsResponseTIme for each Synthetic test within the specified timeFrame grouped by applicationId ```json { "metrics": [ { "aggregation": "MEAN", "metric": "synthetic.metricsResponseTime" }], "timeFrame": { "to": 0, "windowSize": 1800000 }, "groups": [{ "groupbyTag": "synthetic.applicationId" }] } ``` ### Sample payload to get the synthetic.successRate for the Synthetic tests within the specified timeFrame grouped by the two custom properties region and cluster. ```json { "metrics": [ { "aggregation": "MEAN", "metric": "synthetic.successRate" }], "timeFrame": { "to": 0, "windowSize": 1800000 }, "groups": [ { "groupbyTag": "synthetic.tags", "groupbyTagSecondLevelKey": "region" }, { "groupbyTag": "synthetic.tags", "groupbyTagSecondLevelKey": "cluster" }] } ```

Business capability
Observability Management BC-4220.20

Operations 1

POST /api/synthetics/metrics Get Synthetic Metrics #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/instana-synthetic-metrics-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

instana-synthetic-metrics-api-openapi.yml Raw ↑
openapi: 3.2.0
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 Metrics 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?
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 Metrics
  description: The endpoints of this group retrieve metrics for Synthetic test results.
paths:
  /api/synthetics/metrics:
    post:
      description: 'API request to retrieve Synthetic Metrics.

        For more information on Synthetic Metrics please access the https://developer.ibm.com/apis/catalog/instana--instana-rest-api/Synthetic+Monitoring#synthetic-metrics.'
      operationId: getMetricsResult
      requestBody:
        content:
          application/json:
            example:
              pagination:
                page: 1
                pageSize: 3
              metrics:
              - metric: synthetic.metricsResponseTime
                aggregation: SUM
              timeFrame:
                to: 0
                windowSize: 3600000
              groups:
              - groupbyTag: synthetic.applicationId
              - groupbyTag: synthetic.tags
                groupbyTagSecondLevelTag: region
            schema:
              $ref: '#/components/schemas/GetMetricsResult'
      responses:
        '200':
          content:
            application/json:
              example:
                metricsResult:
                - tests:
                  - testId: 6GwdCuiMjGdMrtz8THjo
                    testName: rumattach-BasicNavTest
                    locationId:
                    - f7cEoG61DJfVyWcDnWsc
                    applicationId: application1
                    serviceId: serviceId1
                  metrics:
                  - synthetic.metricsResponseTime: 1276
                  customMetrics:
                  - region: region1
                - tests:
                  - testId: OCnmrLSlNgzntI68094j
                    testName: test-javascript-bundled
                    locationId:
                    - wHICfVoIpiHbwawo5xQ6
                    applicationId: application2
                    serviceId: serviceId2
                  metrics:
                  - synthetic.metricsResponseTime: 14
                  customMetrics:
                  - location: location1
                    region: region2
                - tests:
                  - testId: 9i6gpys6whaYtN5k9VeD
                    testName: My_Test_ReadFile
                    locationId:
                    - DemoPoP1_saas_instana_test
                    applicationId: application3
                    serviceId: serviceid3
                  metrics:
                  - synthetic.metricsResponseTime: 7
                  customMetrics:
                  - location: location3
                    region: region3
                page: 1
                pageSize: 3
                totalHits: 2212
              schema:
                $ref: '#/components/schemas/MetricsResult'
          description: OK
        '400':
          description: Bad request.
        '401':
          description: Unauthorized access - requires user authentication.
        '500':
          description: Internal server error.
      security:
      - ApiKeyAuth:
        - Default
      summary: Get Synthetic Metrics
      tags:
      - Synthetic Metrics
      x-ibm-ahub-byok: true
components:
  schemas:
    MetricsTestResultItem:
      type: object
      description: A description of the Synthetic test associated with the result item.  This information will be included if the request was grouped by synthetic.testId or if includeAggregatedTestId was true on the request.
      properties:
        applicationId:
          type: string
          description: An identifier of an application associated with the Synthetic test.  This field is deprecated and will be replace by the applicationIds field.
        applicationIds:
          type: array
          description: A list of the applications associated with the Synthetic test.
          items:
            type: string
            description: A list of the applications associated with the Synthetic test.
        locationId:
          type: array
          description: A list of the locations associated with the Synthetic test.
          items:
            type: string
            description: A list of the locations associated with the Synthetic test.
        mobileApplicationIds:
          type: array
          description: A list of the mobile applications associated with the Synthetic test.
          items:
            type: string
            description: A list of the mobile applications associated with the Synthetic test.
        serviceId:
          type: string
          description: A service associated with the Synthetic test.
        testId:
          type: string
          description: The testId for the Synthetic test.
        testName:
          type: string
          description: The Synthetic test's name.
        websiteIds:
          type: array
          description: A list of the websites associated with the Synthetic test.
          items:
            type: string
            description: A list of the websites associated with the Synthetic test.
      required:
      - testId
    TagFilterExpressionElement:
      type: object
      description: Boolean expression of tag filters to define the scope of relevant calls.
      discriminator:
        mapping:
          EXPRESSION: '#/components/schemas/TagFilterExpression'
          TAG_FILTER: '#/components/schemas/TagFilter'
        propertyName: type
      properties:
        type:
          type: string
      required:
      - type
    TimeFrame:
      type: object
      description: Time range for which the data should be retrieved.
      properties:
        to:
          type: integer
          format: int64
          description: 'end of timeframe expressed as the Unix epoch time in milliseconds. Eg: `ISO 8601` standard time `2024-06-27T05:05:55.615Z` can be represented as `1719464755615` in Unix epoch time in milliseconds.'
        windowSize:
          type: integer
          format: int64
          description: windowSize in milliseconds
          maximum: 2678400000
          minimum: 0
    MetricsResultItem:
      type: object
      properties:
        customTags:
          type: object
          additionalProperties:
            type: string
            description: A map of custom properties composed of the custom property name and its value.  This information will be included if the custom properties were requested or if the query was grouped and the grouping included one or more custom properties.
          description: A map of custom properties composed of the custom property name and its value.  This information will be included if the custom properties were requested or if the query was grouped and the grouping included one or more custom properties.
        metrics:
          type: array
          description: A map of the requested metrics, composed of the metric name and its value.
          items:
            type: object
            additionalProperties:
              type: object
              description: A map of the requested metrics, composed of the metric name and its value.
            description: A map of the requested metrics, composed of the metric name and its value.
        runType:
          type: string
          description: Indicates whether the test was scheduled to run or run now
        tests:
          type: array
          description: A description of the Synthetic test associated with the result item.  This information will be included if the request was grouped by synthetic.testId or if includeAggregatedTestId was true on the request.
          items:
            $ref: '#/components/schemas/MetricsTestResultItem'
      required:
      - metrics
    SyntheticMetricConfiguration:
      type: object
      properties:
        aggregation:
          type: string
          description: 'Set aggregation that can be applied to a series of values. Eg: `MEAN`.'
          enum:
          - SUM
          - MEAN
          - MAX
          - MIN
          - P25
          - P50
          - P75
          - P90
          - P95
          - P98
          - P99
          - P99_9
          - P99_99
          - DISTINCT_COUNT
          - SUM_POSITIVE
          - PER_SECOND
          - INCREASE
        granularity:
          type: integer
          format: int32
          description: 'If the granularity is set you will get data points with the specified granularity in seconds. Default: `1000` milliseconds'
        metric:
          type: string
          description: 'Set a particular metric, eg: `latency`.'
      required:
      - aggregation
      - metric
    SyntheticMetricTagGroup:
      type: object
      description: ' Grouping of data under `groupbyTag`, where `groupbyTagEntity` and `groupbyTagSecondLevelKey` are aspects of `groupbyTag`.'
      properties:
        groupbyTag:
          type: string
          description: The name of the group tag (e.g. `agent.tag` or `docker.label`).
          maxLength: 256
          minLength: 0
        groupbyTagEntity:
          type: string
          description: 'The entity by which the data should be grouped.

            This field supports three possible values: `NOT_APPLICABLE`, `DESTINATION`, and `SOURCE`.

            `SOURCE`: the tag filter should apply to the source entity.

            `DESTINATION`: the tag filter should apply to the destination entity.

            `NOT_APPLICABLE`: some tags are independent of source or destination, such as tags on the call itself, log tags or trace tags (only destination makes sense because the source is unknown for the root call).

            '
          enum:
          - NOT_APPLICABLE
          - DESTINATION
          - SOURCE
        groupbyTagSecondLevelKey:
          type: string
          description: If present, it's the 2nd level key part (e.g. `customKey` on `docker.label.customKey`)
          maxLength: 256
          minLength: 0
      required:
      - groupbyTag
      - groupbyTagEntity
    Pagination:
      type: object
      properties:
        page:
          type: integer
          format: int32
          description: Page number for a specific page in the results. For example, if you'd like to retrieve the 5th page out of 10 pages, the value would be 5.
          minimum: 1
        pageSize:
          type: integer
          format: int32
          description: 'Set the number of items you want to return with one query. Eg: if you want to retrieve 10 items, the value would be 10.'
          maximum: 200
          minimum: 1
    MetricsResult:
      type: object
      properties:
        metricsResult:
          type: array
          items:
            $ref: '#/components/schemas/MetricsResultItem'
      required:
      - metricsResult
    GetMetricsResult:
      type: object
      properties:
        disableDefaultGroups:
          type: boolean
          writeOnly: true
        groups:
          type: array
          description: ' Grouping of data under `groupbyTag`, where `groupbyTagEntity` and `groupbyTagSecondLevelKey` are aspects of `groupbyTag`.'
          items:
            $ref: '#/components/schemas/SyntheticMetricTagGroup'
        includeAggregatedTestIds:
          type: boolean
          writeOnly: true
        metrics:
          type: array
          description: 'A list of objects each of which defines a metric and the (statistical) aggregation -- MEAN, SUM, MAX, etc -- that should be used to summarize it for the defined time frame. Eg: `[{ ''metric'': ''latency'', ''aggregation'': ''MEAN''}]`. To know more about supported metrics and its aggregation, See `Get Metric catalog`.'
          items:
            $ref: '#/components/schemas/SyntheticMetricConfiguration'
        pagination:
          $ref: '#/components/schemas/Pagination'
        tagFilterExpression:
          $ref: '#/components/schemas/TagFilterExpressionElement'
        timeFrame:
          $ref: '#/components/schemas/TimeFrame'
      required:
      - metrics
  securitySchemes:
    ApiKeyAuth:
      in: header
      name: authorization
      type: apiKey
      description: "## Example\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"
x-tagGroups:
- name: Websites & Mobile Apps
  tags:
  - Website Metrics
  - Website Catalog
  - Website Analyze
  - Website Configuration
  - Mobile App Metrics
  - Mobile App Catalog
  - Mobile App Analyze
  - Mobile App Configuration
  - End User Monitoring
- name: Applications
  tags:
  - Application Metrics
  - Application Resources
  - Application Catalog
  - Application Analyze
  - Application Settings
  - Application Topology
  - Application Alert Configuration
  - Global Application Alert Configuration
- name: Infrastructure
  tags:
  - Infrastructure Analyze
  - Infrastructure Metrics
  - Infrastructure Resources
  - Infrastructure Catalog
  - Infrastructure Topology
- name: Logging
  tags:
  - Logging Analyze
- name: Synthetic Monitoring
  tags:
  - Synthetic Catalog
  - Synthetic Metrics
  - Synthetic Settings
  - Synthetic Test Playback Results
  - Synthetic Alert Configuration
- name: Logs
  tags:
  - Log Alert Configuration
- name: Events
  tags:
  - Events
  - Event Settings
- name: Automation
  tags:
  - Action Catalog
  - Action History
  - Policies
- name: Service Levels
  tags:
  - SLI Settings
  - SLI Report
  - Apdex Settings
  - Apdex Report
  - Service Levels Objective(SLO) Configurations
  - Service Levels Objective(SLO) Report
  - Service Levels Alert Configuration
  - SLO Correction Configurations
  - SLO Correction Windows
- name: AI Management
  tags:
  - AI Management
- name: Settings
  tags:
  - Custom Dashboards
  - User
  - Groups
  - Teams
  - Roles
  - Audit Log
  - API Token
  - Maintenance Configuration
  - Synthetic Calls
  - Session Settings
  - Automation Settings
  - Authentication
- name: Open Beta Features
  tags:
  - Infrastructure Analyze
- name: Closed Beta Features
  tags:
  - Infrastructure Alert Configuration
- name: Instana
  tags:
  - Releases
  - Host Agent
  - Health
  - Usage