We unified the date formats in the response of the build endpoints. So now the triggered_at field doesn’t have the nanoseconds anymore. Thanks for the notice.
Hi, currently progress percentage it is not possible directly from the API, you can only do it by using the same “math” as we do on our website: take the most recent successful build which triggered the same workflow as the current one does - its duration, the difference between its finished_at and environment_prepare_finished_at is the 100%.
Please include the whole API call in it, e.g. the curl call you tried; every parameter except the Auth info / access token, so that we can help as fast as possible
Of course if you have any questions just let us know!
@viktorbenei,
I was use the “postman” for request this endpoints, and because of some thing that i forgot this don’t worked on the third. Now i used the curl as recommended on doc and work perfectly. I imported this command for Postman and this worked also.
In my next post about issues, i will post on correct place, sorry.
Hello @viktorbenei - I started investigating the API for use in a internal tool to help my QA team find and install builds from different environments. I found that the API, as it stands today, has almost everything I would need to craft such a tool except one thing. For iOS builds when I pull a adhoc build then grab the ipa artifact I see the download URL. It appears I can’t just open that download URL in safari to have the IPA install. I know if I were to open the build on bitrise.io from the phone I can hit a download button and it installs the app. Is there a way to do something like this using the API that I might be missing?
Ideally I want to build out a small mobile application for internal use only that pulls builds and lets my internal users install them directly with little hassle.
This may be a stupid question, but I was wondering if it’s possible to get project’s “building” status at top level (without looking at the builds)
I’m currently building a mobile client for iOS, inspired by the BItrise Unofficial for Android. The main page shows a list of projects for a user, and I’d like to show whether the last build on a given project has failed or succeeded without looking through the build list (as that would mean making another API call and slowing things down)
I can see that the JSON object for an app has a field called “status”, but for my projects it seems to always have the value of “1”, so I’m guessing it represents something else.
What would be the recommended approach with the current API?
@Alexei query the builds of the project with limit=1 to get only the latest one if you need that information, right now there’s no way to get it directly on project level. The bitrise.io dashboard does the same:
first it requests the projects / project list
then once the list is loaded it queries the status of the projects
You can use other query params as well if you’d want to get the last non PR build for example, or if you want to query a specific branch’s status (latest build on the branch).
@viktorbenei I’m trying to set up a pipeline that will upload a new version of our bitrise.yml file but the way the API is currently set up is extremely cumbersome.
The curl statement at the moment expects a json object with a single key “app_config_datastore_yaml” and the entire bitrise.yml contents as value. This curl request looks like this:
The problem with this approach is that if you have a very extensive build process, this one liner becomes very hard to generate (think escaping characters within script steps)
I would propose to simplify this and allow the API users to just call the API as follows:
curl -X POST
-H 'Authorization: token THE-ACCESS-TOKEN'
https://api.bitrise.io/v0.1/apps/APP-SLUG/bitrise.yml
--data-binary @bitrise.yml
This way the users can just upload the yaml file exactly as it is expected, and there is no need to manipulate the contents of the file to fit into a curl statement.