API access for public builds?

Is there a way to retrieve information about public builds via the API? For example, the builds at agent-hooks-example #40 are retrievable in my browser, but if I do e.g.

curl https://api.buildkite.com/v2/organizations/buildkite/pipelines/agent-hooks-example/builds?branch=main&per_page=3

I either get ‘you must provide your API token’ or ‘404 organization not found’ (I’m not a member of the Buildkite organization).

Hi @kevinburke ,

To request build information via the API, you need a valid API Token. However, you would have to be a member of the organisation to generate an API Token that can read build information.

Cheers!

Right - given that I can retrieve the information about a public build via the browser, it would be nice to be able to retrieve that same info via the API.

Hi @kevinburke ,

Yeah, I get what you mean. Unfortunately, we have to limit API access to organisation members only for security purposes and resource protection.