Version Not Supported
The endpoint does not support the requested version
Summary
A valid API version has been requested, however, the endpoint that was requested does not support the API version.
curl -i -H "x-api-version:2.0" -H "Authorization: ApiKey {ApiKey}" https://api.youmanage.co.uk/Companies
HTTP/1.1 400 Bad Request
api-supported-versions: 0.1
Date: Fri, 30 Aug 2019 14:18:50 GMT
{
"error": {
"code": "YM0072",
"reference": "https://developer.youmanage.co.uk/api/errors/ym0072",
"target": "Version",
"message": "An unsupported version was requested",
"details": null
}
}
Solution
This error can happen if an endpoint being accessed was added in a later version of the API than the one being requested. Therefore a different version of the API should be requested or if you are requesting an API version that does not exist, send a valid and supported API version instead.
curl -H "x-api-version:0.1" -H "Authorization: ApiKey {ApiKey}" https://api.youmanage.co.uk/Companies
[
{
"id": 2,
"name": "Fictional Data Limited",
"enabled": true
}
]
To find out what versions of the API are supported for that endpoint, check the 'api-supported-versions' header, an example of which can be seen in the summary section above.