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
Query the existing approles in the backend using the API: /auth/approle/role?list=true
Observed Result:
404 Not Found (WebException) is observed.
Expected Result:
would it be better if the API returned a 200 OK with zero results?
404 would make sense for a single REST resource. when you are looking for it with an id.
In case of a collection of resources, an empty list of roles sounds more useful for the callers. (and probably aligns to how REST Apis work)
Otherwise the callers now need to catch 404 exceptions.. and expose out an empty list.
p.s. i verified it for the AppRoles api, but this may be applicable to other List APIs as well.
The text was updated successfully, but these errors were encountered:
Vault Version: 0.6.1
Sample API: /auth/approle/role?list=true
Steps:
Observed Result:
404 Not Found (WebException) is observed.
Expected Result:
would it be better if the API returned a 200 OK with zero results?
404 would make sense for a single REST resource. when you are looking for it with an id.
In case of a collection of resources, an empty list of roles sounds more useful for the callers. (and probably aligns to how REST Apis work)
Otherwise the callers now need to catch 404 exceptions.. and expose out an empty list.
p.s. i verified it for the AppRoles api, but this may be applicable to other List APIs as well.
The text was updated successfully, but these errors were encountered: