# Bitrise API Questions

**URL:** <https://discuss.bitrise.io/t/bitrise-api-questions/9645>\
**Category:** Question & Answer\
**Created:** [July 17, 2019, 9:01am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645 "2019-07-17T09:01:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgursch](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mgursch](https://discuss.bitrise.io/u/mgursch)\
**Post date:** [July 17, 2019, 9:01am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/1 "2019-07-17T09:01:12Z")

</div>

Hey, thanks for providing an API to interact with our bitrise builds. We want to create bitrise apps with a default configuration with that API, but we are running into some issues. Hope you can help us:

1. we call /apps/register to register a new app -\> seems working - response is status “ok” with a slug
2. we call /register-ssh-key -\> 504 without additional description
3. we call /bitrise.yml -\> response “format\_version: 1.0.0”
4. we call finish -\> 504 without addition description

additional information about the requests

ad 2) i add text of private and public key to request. is\_register\_key\_into\_provider\_service is set to false

ad 3) i add content of our default bitrise.yml to app\_config\_datastore\_yaml parameter

ad 4) i dont know exactly what values i should set for stack\_id and config parameter

Is there any additional documentation how to setup android and ios apps via bitrise API?

Thanks a lot for your time

---

<div class="post-metadata">

**Author:** ![mgursch](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mgursch](https://discuss.bitrise.io/u/mgursch)\
**Post date:** [July 22, 2019, 10:36am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/2 "2019-07-22T10:36:13Z")

</div>

is there any chance to get some help on this topics?

Thanks a lot

---

<div class="post-metadata">

**Author:** ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)\
**Post date:** [July 22, 2019, 10:40am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/3 "2019-07-22T10:40:48Z")

</div>

Hi @mgursch!

Sorry about the delay Can you post here an example of the call you’re making?

---

<div class="post-metadata">

**Author:** ![mgursch](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mgursch](https://discuss.bitrise.io/u/mgursch)\
**Post date:** [July 22, 2019, 10:45am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/4 "2019-07-22T10:45:10Z")

</div>

@bitce  
here some examples i tried

1. [https://api.bitrise.io/v0.1/apps/register](https://api.bitrise.io/v0.1/apps/register)  
{  
“is\_public”: false,  
“type”: “git”,  
“provider”: “github”,  
“repo\_url”: "git@github.com:allaboutapps/android-hiring.git",  
“git\_repo\_slug”: “app-br-android-demo”,  
“git\_owner”: “mgursch”  
}

2. [https://api.bitrise.io/v0.1/apps/SLUG/register-ssh-key](https://api.bitrise.io/v0.1/apps/SLUG/register-ssh-key)  
{  
“auth\_ssh\_private\_key”: “SOME PRIVATE KEY”,  
“auth\_ssh\_public\_key”: “SOME PUBLIC KEY”,  
“is\_register\_key\_into\_provider\_service”: false  
}

3. [https://api.bitrise.io/v0.1/apps/SLUG/bitrise.yml](https://api.bitrise.io/v0.1/apps/SLUG/bitrise.yml)  
{  
“app\_config\_datastore\_yaml”: "—  
format\_version: ‘8’  
default\_step\_lib\_source: [https://github.com/bitrise-io/bitrise-steplib.git](https://github.com/bitrise-io/bitrise-steplib.git)  
project\_type: android  
trigger\_map:  
… SOME BITRISE.YML TEXT  
"  
}

4. [https://api.bitrise.io/v0.1/apps/SLUG/finish](https://api.bitrise.io/v0.1/apps/SLUG/finish)  
{  
“project\_type”: “android”,  
“stack\_id”: “android”, //DONT KNOW WHAT STACK ID I SHOULD USE  
“config”: “default-android-config”,  
“mode”: “manual”,  
“envs”: {

---

<div class="post-metadata">

**Author:** ![bitce](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/bitce/32/1639_2.png) [@bitce](https://discuss.bitrise.io/u/bitce)\
**Post date:** [July 25, 2019, 11:19am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/5 "2019-07-25T11:19:09Z")

</div>

Hi @mgursch!

Sorry about the delay. So all in all we’d suggest trying again because we aren’t seeing any problems here (you can find out about stack IDs here: [https://github.com/bitrise-io/bitrise.io/tree/master/system\_reports](https://github.com/bitrise-io/bitrise.io/tree/master/system_reports)) and 5xx errors might imply something unrelated to us or a momentarily problem.

---

<div class="post-metadata">

**Author:** ![mgursch](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mgursch](https://discuss.bitrise.io/u/mgursch)\
**Post date:** [August 5, 2019, 8:24am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/6 "2019-08-05T08:24:40Z")

</div>

hey @bitce , thanks for your response - i found some issues and im now able to create a new project.

there is another question:  
The created project is always connected to my account (mgursch), but i want to create the project for my organisation.  
So I call POST slug/finish with the correct organisation\_slug but its not changing the owner of the newly created project.

Is there something im missing about this?

---

<div class="post-metadata">

**Author:** ![Roland-Bak](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/roland-bak/32/3480_2.png) [@Roland-Bak](https://discuss.bitrise.io/u/Roland-Bak)\
**Post date:** [August 8, 2019, 12:37pm UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/7 "2019-08-08T12:37:45Z")

</div>

Hi there @mgursch!

If you would like to transfer your project to an organisation, it should look something like this:

> curl -X POST -H ‘Authorization: ACCESS-TOKEN’ ‘[https://api.bitrise.io/v0.1/apps/register](https://api.bitrise.io/v0.1/apps/register)’ -d  
> ‘{  
> “provider”:“github”,  
> “is\_public”:false,  
> “[repo\_url":"git@github.com](mailto:repo_url%22:%22git@github.com):allaboutapps/android-hiring.git”,  
> “type”:“git”,  
> “git\_repo\_slug”:“app-br-android-demo”,  
> “git\_owner”:“mgursch”,  
> “organization\_slug”:“`INSERT_ORG_SLUG HERE`”}’

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![mgursch](https://avatars.discourse-cdn.com/v4/letter/m/e56c9b/32.png) [@mgursch](https://discuss.bitrise.io/u/mgursch)\
**Post date:** [August 9, 2019, 7:12am UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/8 "2019-08-09T07:12:28Z")

</div>

Thanks that works.

unfortunatelly the swagger doc is not up2date. there is no “organization\_slug”.  
would be nice to fix it

thanks

---

<div class="post-metadata">

**Author:** ![Roland-Bak](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/roland-bak/32/3480_2.png) [@Roland-Bak](https://discuss.bitrise.io/u/Roland-Bak)\
**Post date:** [August 13, 2019, 1:13pm UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/9 "2019-08-13T13:13:07Z")

</div>

Hey @mgursch!

You’re right, the doc needed a fix, so we updated it in order to reflect the current workflow: [https://mpxzvqn7ysfysw.preview.forestry.io/api/adding-and-managing-apps/#adding-a-new-app](https://mpxzvqn7ysfysw.preview.forestry.io/api/adding-and-managing-apps/#adding-a-new-app)

Next time you check it out, it should be up-to-date 😉

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex016/uploads/bitrise/original/2X/d/d901cf2aad020f2dd11918afc89ec2089bb87b35.png) [@system](https://discuss.bitrise.io/u/system)\
**Post date:** [September 12, 2019, 1:13pm UTC](https://discuss.bitrise.io/t/bitrise-api-questions/9645/10 "2019-09-12T13:13:08Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
