Workflow timeseries data
GET {{baseUrl}}/insights/time-series/:project-slug/workflows?branch=consequat est&all-branches=true×eries-granularity=hourly&workflow-name=build-and-test&start-date=2020-08-21T13:26:29Z&end-date=2020-09-04T13:26:29Z
If no query parameters are supplied, will return timeseries data for all workflows that have ran on the default branch.
When granularity is `hourly`, up to 48 hours of timeseries data will be returned. When granularity is `daily`, up to 90 days of timeseries data will be returned.
Different combinations of branches and workflow-names can narrow the query further:
* All workflows, default branch (default, no query parameters)
* All workflows, all branches: `all-branches=true`
* All workflows on specific branch: `branch=feature-branch`
* A specified workflow, all branches: `workflow-name=build&all-branches=true`,
* A specified branch on a specified workflow: `workflow-name=build&branch=feature-branch`
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
branch | string | The name of a vcs branch. If not passed we will scope the API call to the default branch. | |
all-branches | boolean | Whether to retrieve data for all branches combined. Use either this parameter OR the branch name parameter. | |
timeseries-granularity | string | The granularity for which to query timeseries data. | |
workflow-name | string | The name of a workflow. If not passed we will scope the API call to the project. | |
start-date | string | Include only executions that started at or after this date. This must be specified if an end-date is provided. | |
end-date | string | Include only executions that started before this date. This date can be at most 90 days after the start-date. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"next_page_token":"culpa qui","items":[{"name":"build-and-test","min_started_at":"1961-11-01T14:08:09.227Z","max_ended_at":"1989-11-01T04:45:50.417Z","timestamp":"1998-09-18T08:01:14.684Z","metrics":{"total_runs":68362984,"failed_runs":99106126,"successful_runs":32273176,"throughput":69998914.10013959,"median_credits_used":34846718,"total_credits_used":12918424,"duration_metrics":{"min":57940865,"median":72506975,"max":88773594,"p95":5900279,"total":73736641}}},{"name":"build-and-test","min_started_at":"1950-08-17T14:37:45.689Z","max_ended_at":"1993-09-18T11:06:04.670Z","timestamp":"1961-10-23T04:35:17.739Z","metrics":{"total_runs":59381885,"failed_runs":40055675,"successful_runs":41853615,"throughput":17599558.91125773,"median_credits_used":67557797,"total_credits_used":48034679,"duration_metrics":{"min":49163836,"median":37005033,"max":22042583,"p95":56225417,"total":24629976}}}]}