Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EAM: Add GET /apps/{appId}/instances/{appInstanceId} API #257

Open
gainsley opened this issue Jun 7, 2024 · 0 comments
Open

EAM: Add GET /apps/{appId}/instances/{appInstanceId} API #257

gainsley opened this issue Jun 7, 2024 · 0 comments
Labels
enhancement Suggesting ideas for new API features or questions on directions for API evolution

Comments

@gainsley
Copy link
Collaborator

gainsley commented Jun 7, 2024

Problem description
No way to poll the status of a single app instance. The only way to get the status of an app instance is to get all app instances.

I believe the general flow is to call POST /apps/{appId}/instances to deploy an instance. This will return 202 and then take some time to actually deploy the instance. The only way for the caller to know if the deployment was successful is to poll GET to watch the status until it changes to Failed or Ready. Having to poll all instances instead of the single one is inefficient and requires more logic on the client side.

Possible evolution
Add GET /apps/{appId}/instances/{appInstanceId} API to retrieve info for a single app instance.

Alternative solution
Callbacks can be used to notify the client when the operation is complete. Unfortunately callbacks do not work well for clients who are humans and on browsers behind NATs.
Alternatively a separate blocking API can be provided that returns only when the operation is complete. For example GET /apps/{appId}/instances/{appInstanceId}/waitdone will block until the status is either Failed/Ready, and then return the full app instance info. This may be useful in addition to the GET of a single instance which has its own advantages and drawbacks.

Additional context

@gainsley gainsley added the enhancement Suggesting ideas for new API features or questions on directions for API evolution label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Suggesting ideas for new API features or questions on directions for API evolution
Projects
None yet
Development

No branches or pull requests

1 participant