Skip to content

Reduce API cost when building pipeline dashboards

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Currently, when wanting to build pipeline dashboards, one needs to do 2 - 3 API calls.

The first one, is to get project data, such as the name and URL of the pipeline repository for example.

Then, we have to get the list of pipelines, with potentially a filter to restrict the list. The only reason this call is needed, is to obtain the pipeline ID so we can do the third API call with the pipeline ID.

Having to get project data + pipeline data as two separate calls, in terms of data separation. But having the get the pipeline data twice, is only to get extra data such as: coverage, duration and created_at + started_at to derivce queue time, pipeline URL and status.

It feels like there is some duplication/overlap between the two pipeline calls.

Offering a single 'dashboard' endpoint or, moving/copying some of the additionally needed data, could reduce API usage by 33 - 66%, which might be a considerable amount of data and calls, if users/dashboards are polling this data at a high interval rate.

Edited by 🤖 GitLab Bot 🤖