The Insights API endpoints allow you to pull information about workflows and jobs, there are several endpoints outlined here:
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
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.
However, a new parameter was introduced
all-brancheswhich is a boolean parameter. If you set it to
true you will get information back on all branches.
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.
You can add a vote to the request to implement that here: