These questions refer to the invocation count maintained for the GetMetrics API.
If an authenticated high tier API like GetAccounts responds with 404 Not Found or with 405 Method Not Allowed, are these requests counted as valid invocations?
If yes, then where is the count captured, in the authenticated section or in the unattended section?
GET /banking/account -> 404 response (resources not found due to missing information in the URL)
DELETE /banking/accounts -> 405 response
Do the above need to be counted in GetMetrics?
Both examples describe an invalid resource request.
- A 405 error implies an invalid method is attempted against a resource. Because the combination of method and resource do not exist, there is no invocation from the CDS perspective.
- A 404 error, resulting from an invalid (permanently unavailable or unknown) resource, is not an invocation. Because the resource does not exist, there is no invocation from the CDS perspective.
- A 404 error, due to a temporarily unavailable account, is considered an invocation.
If the error is related to a known resource and an error (such as 400) is raised, this is considered an invocation of the API.