forked from DMPRoadmap/roadmap
-
Notifications
You must be signed in to change notification settings - Fork 13
API Errors
Brian Riley edited this page Jul 22, 2021
·
1 revision
If the access token used to make the request is no longer valid an HTTP 401 Unauthorized
message will be returned along with the following JSON response:
{
"application": "dmptool-dev",
"api_version": 2,
"source": "GET /api/v2/plans/123",
"time": "2020-02-07T14:04:01-07:00",
"caller": "your_email OR your_application_name",
"code": 401,
"message": "Unauthorized",
"total_items": 0,
"items": [],
"errors": [
"token is invalid, expired or has been revoked"
]
}
In situations where the requested item does not exist or the access token does not have permission to access the item(s), an HTTP 404 Not Found
is returned along with the following JSON:
{
"application": "dmptool-dev",
"api_version": 2,
"source": "GET /api/v2/plans/123",
"time": "2020-02-07T14:04:01-07:00",
"caller": "your_email OR your_application_name",
"code": 404,
"message": "NOT FOUND",
"total_items": 0,
"items": [],
"errors": ["plan could not be found"],
}
In the event that a fatal error is thrown from any of the API endpoints an HTTP 500 Internal Server Error
will be returned along with the following JSON body:
{
"application": "dmptool-dev",
"api_version": 2,
"source": "GET /api/v2/plans/123",
"time": "2020-02-07T14:04:01-07:00",
"caller": "your_email OR your_application_name",
"code": 500,
"message": "INTERNAL SERVER ERROR",
"total_items": 0,
"items": [],
"errors": [],
}
Please contact us if you encounter a 500 level error.