# Bitrise.io API v0.1 (Work In Progress)

**URL:** <https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554>\
**Category:** Beta Testing\
**Tags:** api\
**Created:** [April 25, 2017, 10:51am UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554 "2017-04-25T10:51:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 25, 2017, 10:51am UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/1 "2017-04-25T10:51:01Z")

</div>

**The API is work-in-progress. Follow this topic to get notified about new endpoints, and changes (if it would be required - we try not to change existing endpoints if we don’t have to).**

The API docs started to get quite extensive, so we moved it to [http://devcenter.bitrise.io/api/v0.1/](http://devcenter.bitrise.io/api/v0.1/) for easier digest and for better Table of Content and link-to-section support.

## WIP / working on it

- Download build log
- Get build artifacts + download URLs (`/download` endpoint?)
- Abort a build endpoint (with reason + status param); should be possible to abort a build with success status
- Manage (upload & download) files located under “Code Signing & Files” on [bitrise.io](http://bitrise.io)
- Docs: `limit` query param & errors
- `/builds` list - filter: `branch` - together with `limit=1` this can be used for quickly checking the status of the latest build & the latest on a specified branch
- Enforce HTTPS for the API - redirect from http to https
- Build Trigger endpoint
- Download/upload/edit the `bitrise.yml` of a project
- Watch / Unwatch an app (notifications)

## Feature / endpoint requests

If you want to request a new API feature / endpoint, please do it here:

> [@Bitrise Public API](http://discuss.bitrise.io/t/bitrise-public-api/37):
>
> I’d very much like an API for bitrise. For configuring applications etc. For example, upload/read workflow, update/read stack, read build list, etc. I guess there isnt something like this, because I havent found it. Is something like this planned? Regards, David UPDATE: We’re closing this thread as most of the requested API endpoints are available now, and it’s really hard to track which ones are still missing and what the priority of those should be. If you have any API endpoint/feature r…

---

<div class="post-metadata">

**Author:** ![bootstraponline](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@bootstraponline](https://discuss.bitrise.io/u/bootstraponline)\
**Post date:** [April 25, 2017, 3:34pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/3 "2017-04-25T15:34:14Z")

</div>

Have you thought about publishing a swagger description of the API so that it’s easy to generate SDKs?

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [April 25, 2017, 3:36pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/4 "2017-04-25T15:36:19Z")

</div>

At one point we definitely will, but no ETA for that yet.

---

<div class="post-metadata">

**Author:** ![bootstraponline](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@bootstraponline](https://discuss.bitrise.io/u/bootstraponline)\
**Post date:** [May 7, 2017, 6:07pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/5 "2017-05-07T18:07:18Z")

</div>

FYI there is some inconsistency with the error handling.

> [https://api.bitrise.io/v0.1/me/](https://api.bitrise.io/v0.1/me/)  
> {  
> “message”: “Not Found”  
> }

vs

> /apps/123/builds  
> {  
> “error\_message”: “Not Found”  
> }

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 7, 2017, 6:08pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/6 "2017-05-07T18:08:08Z")

</div>

Good catch, thanks for reporting! 😉

_(I’ll let you know here when it’s fixed)_

---

<div class="post-metadata">

**Author:** ![bootstraponline](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@bootstraponline](https://discuss.bitrise.io/u/bootstraponline)\
**Post date:** [May 7, 2017, 8:28pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/7 "2017-05-07T20:28:54Z")

</div>

Is is possible to make [https://api.bitrise.io/v0.1](https://api.bitrise.io/v0.1) respond the same as [https://api.bitrise.io/v0.1/](https://api.bitrise.io/v0.1/)? The API modeling software I’m using appends a trailing slash which results in `Not Found`.

Ideas for improving the returned data:

- Identify cancelled builds (requires having an end point to cancel builds)
- Text status of the build result (failed, succeeded, cancelled, etc.)
- Build times

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 8, 2017, 10:17am UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/8 "2017-05-08T10:17:28Z")

</div>

Trailing slash: fix scheduled 😉

Endpoint improvements: exactly what I had on my list, so it shouldn’t take too long 🙂

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 10, 2017, 9:56am UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/9 "2017-05-10T09:56:32Z")

</div>

**DONE** : Pagination docs section added

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 10, 2017, 12:03pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/10 "2017-05-10T12:03:16Z")

</div>

**DONE** : Include this discuss URL in the “link to docs” message in the root response of [http://api.bitrise.io/](http://api.bitrise.io/)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 10, 2017, 12:58pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/11 "2017-05-10T12:58:50Z")

</div>

**DONE** : FIX: “Content-Type” instead of “Content Type” (missing -)

Content-Type is now set to `application/json; charset=utf-8` for every endpoint.

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 10, 2017, 6:33pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/12 "2017-05-10T18:33:55Z")

</div>

**DONE** : Handle /x and /x/ the same way (trailing /) - [Bitrise.io API v0.1 (Work In Progress)](http://discuss.bitrise.io/t/bitrise-api-v0-1-work-in-progress/1554/7)

Tech Note: `/x/` **redirects** to `/x`; e.g. `/v0.1/` is a redirect to `/v0.1`

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 16, 2017, 5:48pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/13 "2017-05-16T17:48:03Z")

</div>

**DONE** : FIX: error message response format inconsistency - [Bitrise.io API v0.1 (Work In Progress) - #5 by bootstraponline](http://discuss.bitrise.io/t/bitrise-api-v0-1-work-in-progress/1554/5)

> [@bootstraponline](#):
>
> FYI there is some inconsistency with the error handling.

Fixed, every endpoint should now return with `message` in case of error (and a proper HTTP code, of course), instead of with `error_message`.

Thanks for reporting @bootstraponline! 😉

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 16, 2017, 6:52pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/14 "2017-05-16T18:52:23Z")

</div>

**DONE** : Build: status: return a `status_text` too, not just the code, as well as `is_on_hold`

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 16, 2017, 8:03pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/15 "2017-05-16T20:03:42Z")

</div>

**DONE** : Include commit hash & message in build data

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 22, 2017, 10:16am UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/16 "2017-05-22T10:16:09Z")

</div>

A post was merged into an existing topic: [Bitrise Public API](https://discuss.bitrise.io/t/bitrise-public-api/37)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 23, 2017, 7:07pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/17 "2017-05-23T19:07:13Z")

</div>

**DONE:**

- Include tag in build data (`tag`)
- Include workflow id in build data (`triggered_workflow`)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 30, 2017, 2:09pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/18 "2017-05-30T14:09:06Z")

</div>

**DONE** : Include build time, and build start & finish times in the build data.

Included times in the response:

- `triggered_at`
- `started_on_worker_at`
- `environment_prepare_finished_at`
- `finished_at`

---

<div class="post-metadata">

**Author:** ![bootstraponline](https://avatars.discourse-cdn.com/v4/letter/b/c68b51/32.png) [@bootstraponline](https://discuss.bitrise.io/u/bootstraponline)\
**Post date:** [May 30, 2017, 5:19pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/19 "2017-05-30T17:19:19Z")

</div>

Thank you for adding the build time info. That’s super helpful for measuring build health. 🙂

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 30, 2017, 5:22pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/20 "2017-05-30T17:22:56Z")

</div>

Indeed, we have quite a few use cases for these data as well 😉

Will push another update shortly, with “abort reason” included if the build was aborted, as well as normalizing empty infos to be `null` instead of empty strings (e.g. if a `tag` is not defined it’ll be `"tag":null` instead of `"tag":""`)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [May 30, 2017, 6:13pm UTC](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554/21 "2017-05-30T18:13:29Z")

</div>

**DONE** : Build: Abort reason (if any)

**CHANGE** : undefined parameters are now returned as `null`, instead of a default value (e.g. an empty string). Change example: previous **`"tag":""`** is now **`"tag":null`** when `tag` was not specified for the build.

[Next page](https://discuss.bitrise.io/t/bitrise-io-api-v0-1-work-in-progress/1554.md?page=2)
