Inject Custom Time Series Data

API Explorer: /data/timeseries

Restriction: A sequence of two POST requests with the same ts value within the id_ will append the KPIs of the second POST request to the KPI values written by the previous POST request. This also applies to consecutive posts, where this timestamp value is rounded down to the same value, within secondsPerLabelsDoc.

You can inject your own time-series data into the test results in real time or after the test. Once injected, the data will appear in the Timeline Report in the BlazeMeter UI and be available for retrieval via the API just like any other time-series data in the test results.

The example provided adds new KPIs Lion King|Simba, Lion King|Mufasa, The Little Mermaid|Ariel, and The Little Mermaid|Ursula to the masterId of 12345678 under the profileName of Movies.

The | character in the metricPath attribute will create the cascade of sections in the KPI listing in the Timeline Report. For example, Lion King|Simba will show up as Lion King -> Simba in the listing under the profileName of Movies, with the Simba value being the checkbox selector to load the added time series data (as shown in the following image).

The kpis array only contains a single data point for each KPI above, but you can add as many of these as necessary to add that data to your Timeline Report (up to 1 second intervals). The same is true for the meterPath values (as it is in the intervals array), as you can add as many of these as you need. When using this API, replace the masterId of 12345678 with your id, the metricPath values with the ones that describe the KPI data you are passing, and the profileName of Movies to your preferred name.

Currently, this API only supports one profileName per master (or test report), so if you want to add data from several different places (i.e. 2 different services data), use the | delimiter between the service name and the attribute.
The custom data will appear at the bottom of the Timeline Report in BlazeMeter.

Inject Custom Time Series Attributes

Attributes

  • intervalsarray

    List of interval metric and KPI details to be loaded to the timeline report

Inject Custom Time Series Data

curl 'https://a.blazemeter.com/api/v4/data/timeseries' \
    -X POST \
    -H 'Content-Type: application/json' \
    --user 'api_key_id:api_key_secret' \
    -d '{"intervals": [{"_id": {"masterId": 12345678,"metricPath": "Lion King|Simba","ts": 1518429953},"kpis": [{"value": 300,"ts": 1518429953}],"profileName": "Movies"},{"_id": {"masterId": 12345678,"metricPath": "Lion King|Mufasa","ts": 1518429953},"kpis": [{"value": 200,"ts": 1518429953}],"profileName": "Movies"},{"_id": {"masterId": 12345678,"metricPath": "The Little Mermaid|Ariel","ts": 1518429953},"kpis": [{"value": 743,"ts": 1518429953}],"profileName": "Movies"},{"_id": {"masterId": 12345678,"metricPath": "The Little Mermaid|Ursula","ts": 1518429953},"kpis": [{"value": 40,"ts": 1518429953}],"profileName": "Movies"}]}'

Inject Custom Time Series DataInject Custom Time Series Data POST (JSON)

{
  "intervals": [
    {
      "_id": {
        "masterId": 12345678,
        "metricPath": "Lion King|Simba",
        "ts": 1518429953
      },
      "kpis": [
        {
          "value": 300,
          "ts": 1518429953
        }
      ],
      "profileName": "Movies"
    },
    {
      "_id": {
        "masterId": 12345678,
        "metricPath": "Lion King|Mufasa",
        "ts": 1518429953
      },
      "kpis": [
        {
          "value": 200,
          "ts": 1518429953
        }
      ],
      "profileName": "Movies"
    },
    {
      "_id": {
        "masterId": 12345678,
        "metricPath": "The Little Mermaid|Ariel",
        "ts": 1518429953
      },
      "kpis": [
        {
          "value": 743,
          "ts": 1518429953
        }
      ],
      "profileName": "Movies"
    },
    {
      "_id": {
        "masterId": 12345678,
        "metricPath": "The Little Mermaid|Ursula",
        "ts": 1518429953
      },
      "kpis": [
        {
          "value": 40,
          "ts": 1518429953
        }
      ],
      "profileName": "Movies"
    }
  ]
}

Response200 OK

{
    "api_version": 4,
    "error": null,
    "result": [
        [
            {
                "_id": {
                    "masterId": 12345678,
                    "metricPath": "Lion King|Simba",
                    "ts": 1518429953
                },
                "kpis": [
                    {
                        "value": 300,
                        "ts": 1518429953
                    }
                ],
                "profileName": "Movies"
            },
            {
                "_id": {
                    "masterId": 12345678,
                    "metricPath": "Lion King|Mufasa",
                    "ts": 1518429953
                },
                "kpis": [
                    {
                        "value": 200,
                        "ts": 1518429953
                    }
                ],
                "profileName": "Movies"
            },
            {
                "_id": {
                    "masterId": 12345678,
                    "metricPath": "The Little Mermaid|Ariel",
                    "ts": 1518429953
                },
                "kpis": [
                    {
                        "value": 743,
                        "ts": 1518429953
                    }
                ],
                "profileName": "Movies"
            },
            {
                "_id": {
                    "masterId": 12345678,
                    "metricPath": "The Little Mermaid|Ursula",
                    "ts": 1518429953
                },
                "kpis": [
                    {
                        "value": 40,
                        "ts": 1518429953
                    }
                ],
                "profileName": "Movies"
            }
        ]
    ]
}