I'm failing to understand the relationship between the API endpoints

I’ve got a big conceptual gap in my understanding of the API.

I’ve written code to interrogate the API from the “top down.” So having authenticated, I can:

  • See a list of repos, from, which I can
  • See a list of builds for my chosen repo, from which I can
  • See the pipelines for my chosen build, from which I can
  • See a list of steps for my chosen pipeline, from which I …

… really struggle to work out how to map the numbers in that pipeline step onto the parameters I need to call:


So, I have two things…

… firstly, a need for help on my immediate problem.
… secondly, a general bemusement about where to get documentation on how the API items relate to each other.

It’s possible, of course, that there is good documentation for the second, which would give me the answer I needed to the first… and I’m just being dumb. If this is the case, please could someone point a URI and be gentle on me for not finding it :slight_smile:

Answering my own (specific) question.

I seems that there is a mistake on the docs page at Build Logs API endpoint

The documentation says:

GET /api/repos/{owner}/{repo}/logs/{log}/{pid}

The endpoint (having looked at what some of the source code to the JS reference code is doing is)

GET /api/repos/{owner}/{repo}/builds/{build}/logs/{pipeline}/{step}

… where pipeline is a (1-based) count of the pipeline number, corresponding to the {stages.[stage].number} reference in the builds/{build} API return
… {step} is a (1-based) count of the step within the pipeline, corresponding to the {stages.steps.[step].number}