# Balena \`release\` API call fails with Internal Server Error

**URL:** <https://forums.balena.io/t/balena-release-api-call-fails-with-internal-server-error/5689>\
**Category:** Product support\
**Created:** [March 21, 2019, 9:35am UTC](https://forums.balena.io/t/balena-release-api-call-fails-with-internal-server-error/5689 "2019-03-21T09:35:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mario](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mario](https://forums.balena.io/u/mario)\
**Post date:** [March 21, 2019, 9:35am UTC](https://forums.balena.io/t/balena-release-api-call-fails-with-internal-server-error/5689/1 "2019-03-21T09:35:17Z")

</div>

Hi,

We have disabled rolling releases on one app using [https://github.com/balena-io-projects/staged-releases](https://github.com/balena-io-projects/staged-releases). Now, trying to update a machine to a new release, we get an error. I have traced it down to:

```auto
$ curl 'https://api.balena-cloud.com/v5/release?$select=id,commit&$filter=belongs_to__application%20eq%20<APP_ID>%20and%20commit%20eq%20'\''<RELEASE_ID>'\''%20and%20status%20eq%20'\''success'\''' -H 'Authorization: Bearer <AUTH_TOKEN>'

Internal Server Error

```

I have verified that \<APP\_ID\>, \<RELEASE\_ID\> and \<AUTH\_TOKEN\> are correct.

Any ideas?

---

<div class="post-metadata">

**Author:** ![thgreasi](https://sea2.discourse-cdn.com/balena/user_avatar/forums.balena.io/thgreasi/32/454_2.png) [@thgreasi](https://forums.balena.io/u/thgreasi)\
**Post date:** [March 21, 2019, 10:30am UTC](https://forums.balena.io/t/balena-release-api-call-fails-with-internal-server-error/5689/4 "2019-03-21T10:30:18Z")

</div>

Hi,  
Could you first try doing

```auto
curl 'https://api.balena-cloud.com/user/v1/whoami' -H 'Authorization: Bearer <AUTH_TOKEN>'

```

to confirm that the token is correct and then try the following two, to make sure that the rest IDs are also correct

```auto
curl 'https://api.balena-cloud.com/v5/release?$select=id,commit&$filter=belongs_to__application%20eq%20<APP_ID>' -H 'Authorization: Bearer <AUTH_TOKEN>'

```

```auto
curl 'https://api.balena-cloud.com/v5/release?$select=id,commit&$filter=belongs_to__application%20eq%20397336%20and%20commit%20eq%20'\''<RELEASE_ID>'\''' -H 'Authorization: Bearer <AUTH_TOKEN>'

```

Also, just to clarify that `<>` will not be part of the final curl. Your curl should look something like:

```auto
curl 'https://api.balena-cloud.com/v5/release?$select=id,commit&$filter=belongs_to__application%20eq%20123456%20and%20commit%20eq%20'\''f000000000000000000000000000000f'\''%20and%20status%20eq%20'\''success'\''' -H 'Authorization: Bearer tokenpart.tokenpart.tokenpart'

```

---

<div class="post-metadata">

**Author:** ![mario](https://avatars.discourse-cdn.com/v4/letter/m/8e7dd6/32.png) [@mario](https://forums.balena.io/u/mario)\
**Post date:** [March 21, 2019, 10:39am UTC](https://forums.balena.io/t/balena-release-api-call-fails-with-internal-server-error/5689/5 "2019-03-21T10:39:28Z")

</div>

Thanks @thgreasi. I found the problem, the application ID is supposed to be the internal application ID, not the name. (And yes, the \< and \> were not included in the `curl` command.
