History API

The History API allows you to fetch historical data aggregated on a day/week/month basis from Tideways.

Fetching History Basics

Requirements: You need an API access token with the metrics scope for this endpoint.

You can access historical data for your project through the URL scheme

https://app.tideways.io/apps/api/{organization}/{app}/history/{date}

Example:

curl -H 'Authorization: Bearer <token>' \
     -X GET \
     https://app.tideways.io/apps/api/foo/bar/history/2016-12-06

Response:

{
  "_links": {
    "chart": [
      {
        "href": "/images/history/2016-12-06/day/1/graph.svg?hash=2d108c475d7473b5728931f6b3bf138866c9544a29242a338db5ee29d0e77a0a",
        "type": "image/svg+xml"
      },
      {
        "href": "/images/history/2016-12-06/day/1/graph.png?hash=2d108c475d7473b5728931f6b3bf138866c9544a29242a338db5ee29d0e77a0a",
        "type": "image/png"
      }
    ],
    "next": {
      "href": "/apps/api/foo/bar/history/2016-12-07"
    },
    "previous": {
      "href": "/apps/api/foo/bar/history/2016-12-05"
    },
    "self": {
      "href": "/apps/api/foo/bar/history/2016-12-06"
    }
  },
  "date_range": {
    "end": "2016-12-06 23:59:59",
    "granularity": "day",
    "start": "2016-12-06 00:00:00"
  },
  "report": {
    "error_rate_percent": 0.16,
    "response_time_p95": 603,
    "total_requests": 4145
  },
  "transaction_report": [
    {
      "impact_percent": 36.363503873032,
      "memory_max": 14585,
      "name": "Checkout: View basket",
      "response_time_p95": 240.16105769231,
      "total_requests": 415
    },
    {
      "impact_percent": 26.425880449753,
      "memory_max": 8869,
      "name": "BarApplicationBundle.listOrderHistory",
      "response_time_p95": 286.17857142857,
      "total_requests": 498
    },
    ...
  ]
}

In following, the multiple parts of this response will be explained.

Date Range

The response contains the exact date range that is covered in the historical data.

"date_range": {
    "end": "2016-12-06 23:59:59",
    "granularity": "day",
    "start": "2016-12-06 00:00:00"
},

In addition to start and end is granularity, which is used for aggregation. You can change the granularity by appending it to the URL: https://app.tidesways.io/apps/api/{organization}/{application}/history/{date}/{granularity}.

For example

curl -H 'Authorization: Bearer <token>' \
     -X GET \
     https://app.tideways.io/apps/api/foo/bar/history/2016-12-05/week

This will return a report from the week starting at 2016-12-05. Alternatively, you could run the following example, which will give you a report for the month December in 2016.

curl -H 'Authorization: Bearer <token>' \
     -X GET \
     https://app.tideways.io/apps/api/foo/bar/history/2016-12-01/month
The granularity day can also be specified, but this is the default if you leave out the granularity.

Report

The report contains the aggregated statistics for your project for the selected date range:

"report": {
    "error_rate_percent": 0.16,
    "response_time_p95": 603,
    "total_requests": 4145
},

Collected metrics are:

  • The failure rate in percent of requests

  • The 95% percentile response tile over all requests

  • The total number of requests occurred

Transaction Report

The transaction_report field contains reporting information about important transactions in your project.

The number of transactions monitored might by limited by your plan.
"transaction_report": [
    {
        "impact_percent": 36.363503873032,
        "memory_max": 14585,
        "name": "Checkout: View basket",
        "response_time_p95": 240.16105769231,
        "total_requests": 415
    },
    {
        "impact_percent": 26.425880449753,
        "memory_max": 8869,
        "name": "BarApplicationBundle.listOrderHistory",
        "response_time_p95": 286.17857142857,
        "total_requests": 498
    },
    ...
]

For each transaction the following values are reported:

  • The impact of this transaction compared to other transactions (in percent)

  • The maximum memory used by this transaction

  • The name of the transaction (human readable version, if configured)

  • The 95% percentile response time

  • The total number of requests to this transaction in the given range

Your API client can facilitate the _links section of the response to auto-discover additional resources from the history API.

"_links": {
    "chart": [
        {
            "href": "/images/history/2016-12-06/day/1/graph.svg?hash=2d108c475d7473b5728931f6b3bf138866c9544a29242a338db5ee29d0e77a0a",
            "type": "image/svg+xml"
        },
        {
            "href": "/images/history/2016-12-06/day/1/graph.png?hash=2d108c475d7473b5728931f6b3bf138866c9544a29242a338db5ee29d0e77a0a",
            "type": "image/png"
        }
    ],
    "next": {
        "href": "/apps/api/foo/bar/history/2016-12-07"
    },
    "previous": {
        "href": "/apps/api/foo/bar/history/2016-12-05"
    },
    "self": {
        "href": "/apps/api/foo/bar/history/2016-12-06"
    }
},

Each link consists of at least the href giving you an accessible link to navigate further. Optionally, a MIME type is included if it differs from the currently viewed resource. Beside self and potential previous and next relations, there are 2 chart link which you can use to embed a chart on wall time distribution throughout the selected time portion. The chart is available in SVG and PNG format.

Still need help? Email [email protected]