Get list of all buildkite environment variables

I want to collect all the environment variables from a particular build. How is this possible using -

  1. Buildkite API
  2. From inside the agent when the build is running


Like it was discussed in your support email, you can check the API Jobs API | Buildkite Documentation, or with GraphQL you can query by job and have something like:

query {
agent(slug:"{org}/{agent-uuid}") {
  jobs (first:50) {
    edges {
      node {
        ... on JobTypeCommand {


1 Like

Hey Rishabh!

We have a secret URL that can help with this. If you append /variables to the build URL, you get a fairly comprehensive breakdown. For example:

Hope that helps!

1 Like

Thanks folks! That helped.