When the Morpheus API encounters an error, the response will have an HTTP status of 400 of greater, instead of 200 OK. The error response body contains JSON with information to help troubleshoot the error.
This error is returned if your request is invalid. Usually this is because a parameter is missing or the value is invalid. Try modifying your payload and retrying the request.
The unauthorized error will be encountered unless you pass the authorization header.
The 401 error code is returned if your access token is invalid or expired.
This error is seen if you try to access an endpoint without the required permissions.
For this error example, use the token of user that does not have any admin permissions.
This error indicates the specified endpoint path does not exist. Check the URL of your request and try again.
The 404 error code is returned if a resource could be not be found by the specified ID.
This error indicates something went wrong with the request and an unexpected error has occurred.
This example does not actually work and will return 404 instead. Hopefully you do not encounter a 500 error.
The Morpheus API uses the following error codes:
|Bad Request -- Your request failed. Check your request parameters and try again.
|Unauthorized -- Your API key is invalid. Check your Authorization header.
|Forbidden -- Your API key does not have the required role or permissions.
|Not Found -- The specified resource could not be found.
|Method Not Allowed -- You tried to access a resource with an invalid method.
|Not Acceptable -- You requested a format that isn't json.
|Gone -- The entity requested has been removed from our servers.
|I'm a teapot.
|Too Many Requests -- You're asking too much of the server. Slow down!
|Internal Server Error -- We had a problem with our server. Try again later.
|Service Unavailable -- We're temporarially offline for maintanance. Please try again later.
Updated over 1 year ago