-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Description
Description
Several Engine API endpoints accept truncated IDs (e.g. container ID, image digest) which the engine resolves to the full ID if the prefix is unique, or it responds HTTP 404 Not Found with an "ambiguous prefix" error message in the body. Advanced "user-agent" clients (i.e. with a human in the loop) would be able to ask the user to disambiguate, if only they knew which choices to present to the user. We could help those clients out by enumerating the choices in the response.
There's even an HTTP status code which semantically fits if you squint a bit: 300 Multiple Choices. Switching status codes would have to be API version-gated so as not to break existing clients, and the semantics are a debatable fit, so sticking with 404 and merely augmenting the response body may be the more pragmatic option.