# Open Api Schema / Graphql

**URL:** <https://forum.buildkite.community/t/open-api-schema-graphql/1845>\
**Category:** General\
**Created:** [December 30, 2021, 11:39am UTC](https://forum.buildkite.community/t/open-api-schema-graphql/1845 "2021-12-30T11:39:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rantofie](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rantofie](https://forum.buildkite.community/u/rantofie)\
**Post date:** [December 30, 2021, 11:39am UTC](https://forum.buildkite.community/t/open-api-schema-graphql/1845/1 "2021-12-30T11:39:45Z")

</div>

Hello everyone,

I was wondering if there is a public open api schema for the REST endpoints or a grahpql.schema file for the graphql endpoints? We want to integrate with buildkite and it would save some time if we would be able to generate the objects based on an official schema.

If there is one, can you please point the location of it?

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [December 30, 2021, 3:37pm UTC](https://forum.buildkite.community/t/open-api-schema-graphql/1845/2 "2021-12-30T15:37:28Z")

</div>

Hi @rantofie!

Welcome to the community! 🙂

All API access is over HTTPS, and accessed from the [api.buildkite.com](http://api.buildkite.com) domain. All data is sent as JSON.

```auto
curl https://api.buildkite.com

```

```auto
{
  "response": "Hello World"
}

```

The GraphQL API endpoint is `https://graphql.buildkite.com/v1` . All requests must be HTTP `POST` requests with `application/json` encoded bodies.  
With the [GraphQL console](https://buildkite.com/user/graphql/console) you can browse the schema and get an understanding of the endpoints.

You can find more information here [REST API Overview | Buildkite Documentation](https://buildkite.com/docs/apis/rest-api#schema) and also here [GraphQL API Overview | Buildkite Documentation](https://buildkite.com/docs/apis/graphql-api)

Cheers!

---

<div class="post-metadata">

**Author:** ![rantofie](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rantofie](https://forum.buildkite.community/u/rantofie)\
**Post date:** [December 31, 2021, 6:40am UTC](https://forum.buildkite.community/t/open-api-schema-graphql/1845/3 "2021-12-31T06:40:38Z")

</div>

Hey @paula , thanks for the response, I was hoping that there’s a publicly available open api schema for JSON or for graphql so we can generate the model / clients based on it. Is there no such thing ?

---

<div class="post-metadata">

**Author:** ![anon4496704](https://avatars.discourse-cdn.com/v4/letter/a/ac8455/32.png) [@anon4496704](https://forum.buildkite.community/u/anon4496704)\
**Post date:** [December 31, 2021, 7:32am UTC](https://forum.buildkite.community/t/open-api-schema-graphql/1845/4 "2021-12-31T07:32:58Z")

</div>

Hi @rantofie, There is no Open API Schema. We have them maintained by hand here: [REST API Overview | Buildkite Documentation](https://buildkite.com/docs/apis/rest-api). In this page, In the left sidebar → under the "Buildkite Rest API” section, you can browse through the sections and see the list of available rest APIs and their definitions.

For GraphQL, Documentation is [available here](https://buildkite.com/user/graphql/documentation). It has a full list of fields where we can see the schema of each query and mutation by clicking through each field.

Hope this helps!

---

<div class="post-metadata">

**Author:** ![rantofie](https://avatars.discourse-cdn.com/v4/letter/r/d2c977/32.png) [@rantofie](https://forum.buildkite.community/u/rantofie)\
**Post date:** [January 6, 2022, 2:29pm UTC](https://forum.buildkite.community/t/open-api-schema-graphql/1845/5 "2022-01-06T14:29:44Z")

</div>

Thank you for the documentation. I’ve went through it and it seems to me that the GraphQL API is a bit behind compared to the REST API on some scenarios - hopefully I’m wrong and maybe you can help me.  
We are trying to extract the pipeline configuration for a given slug.

REST :

```auto
[
  {
    "id": "849411f9-9e6d-4739-a0d8-e247088e9b52",
    "graphql_id": "UGlwZWxpbmUtLS1lOTM4ZGQxYy03MDgwLTQ4ZmQtOGQyMC0yNmQ4M2E0ZjNkNDg=",
    "url": "https://api.buildkite.com/v2/organizations/acme-inc/pipelines/my-pipeline",
    "web_url": "https://buildkite.com/acme-inc/my-pipeline",
    "name": "My Pipeline",
    "slug": "my-pipeline",
    "repository": "git@github.com:acme-inc/my-pipeline.git",
    "branch_configuration": null,
    "default_branch": "master",
    "provider": {
      "id": "github",
      "webhook_url": "https://webhook.buildkite.com/deliver/xxx",
      "settings": {
        "publish_commit_status": true,
        "build_pull_requests": true,
        "build_pull_request_forks": false,
        "build_tags": false,
        "publish_commit_status_per_step": false,
        "repository": "acme-inc/my-pipeline",
        "trigger_mode": "code"
      }
    },
    "skip_queued_branch_builds": false,

```

GraphQL :  
[https://buildkite.com/user/graphql/documentation/type/RepositoryProvider](https://buildkite.com/user/graphql/documentation/type/RepositoryProvider)

As you can see in the RepositoryProvider we are missing build\_pull\_requests / forks / tags and so on.  
So, is there a way to extract this information through GraphQL ?

---

<div class="post-metadata">

**Author:** ![paula](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/paula/32/954_2.png) [@paula](https://forum.buildkite.community/u/paula)\
**Post date:** [January 6, 2022, 6:29pm UTC](https://forum.buildkite.community/t/open-api-schema-graphql/1845/6 "2022-01-06T18:29:16Z")

</div>

Hey @rantofie!

Yup, you are correct. We are having a bit of API parity issue at the moment, but we are working on it. I’ll share this with our product team so we can work on those fields for GraphQL.

Thanks!
