mario
March 21, 2019, 9:35am
1
Hi,
We have disabled rolling releases on one app using 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:
$ 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?
Hi,
Could you first try doing
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
curl 'https://api.balena-cloud.com/v5/release?$select=id,commit&$filter=belongs_to__application%20eq%20<APP_ID>' -H 'Authorization: Bearer <AUTH_TOKEN>'
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:
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'
mario
March 21, 2019, 10:39am
5
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.