Insights API endpoints not returning data

The Insights API endpoints allow you to pull information about workflows and jobs, there are several endpoints outlined here:

https://circleci.com/docs/api/v2/#tag/Insights

There are a few caveats when utilizing these endpoints where you may find the response you receive back isn't what you are expecting.

Not specifying a branch parameter

The Insights endpoints are scoped to branches, and if you don't pass a branch parameter we will pull the data for the default branch of your project.

The workflow is currently "On-Hold"

We will only return data for workflows that have moved to an "end" state -- i.e. "Success", "Failed", "Cancelled".

Since an "On-Hold" workflow is technically still running, the workflow and job data associated with it will not be returned.

The workflow was started by a tag

At the moment we will only return data from the Insights endpoints if the workflow was started from a branch. Any workflow that was started by a tag will not be returned in the API responses.

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.