You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
gainsley
added
the
enhancement
Suggesting ideas for new API features or questions on directions for API evolution
label
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
The text was updated successfully, but these errors were encountered: