How to obtain review app name through platform api

269 Views Asked by At

I have a github action that deploys a review app using the platform api, which then returns the review app id: https://devcenter.heroku.com/articles/platform-api-reference#review-app-create

Now I need to obtain the review app name (or url) from the id and I'm not seeing how that can be done through the Platform API. The name does get assigned to a config var in the review app (HEROKU_APP_NAME) but I'm also unable to see how to access config vars using the review app id (I know they can be accessed with heroku config:get -a [review app name] - gotta love those catch 22s ).

1

There are 1 best solutions below

0
On

It's not intuitive, but the app attribute on the review app resource contains an ID, and so the review apps reference an associated "app" resource. Sending the app ID to the /app endpoint will return web_url as one of its attributes.

https://devcenter.heroku.com/articles/platform-api-reference#app