The API documentation states that a single license can be retrieved via:
This endpoint returns a 404:
{
"message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.",
"status": 404
}
The correct endpoint, as documented in the InvenioRDM Vocabularies REST API and confirmed by the links.self in list responses, is:
GET /api/vocabularies/licenses/:id
Steps to reproduce
GET /api/licenses/ → 200 OK
- Pick any license
id from the response, e.g. cc-by-4.0
- Note that
links.self points to https://zenodo.org/api/vocabularies/licenses/cc-by-4.0
GET /api/licenses/cc-by-4.0 → 404
GET /api/vocabularies/licenses/cc-by-4.0 → 200 OK
Response from working endpoint
GET /api/vocabularies/licenses/cc-by-4.0:
{
"id": "cc-by-4.0",
"created": "2023-10-12T17:24:17.213122+00:00",
"updated": "2023-10-12T17:24:17.250742+00:00",
"links": {
"self": "https://zenodo.org/api/vocabularies/licenses/cc-by-4.0"
},
"title": {
"en": "Creative Commons Attribution 4.0 International"
},
"type": "licenses"
}
Expected behavior
- Add a legacy redirect from
/api/licenses/:id → /api/vocabularies/licenses/:id
or
Thank you very much for your work on Zenodo!
The API documentation states that a single license can be retrieved via:
This endpoint returns a
404:{ "message": "The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.", "status": 404 }The correct endpoint, as documented in the InvenioRDM Vocabularies REST API and confirmed by the
links.selfin list responses, is:Steps to reproduce
GET /api/licenses/→ 200 OKidfrom the response, e.g.cc-by-4.0links.selfpoints tohttps://zenodo.org/api/vocabularies/licenses/cc-by-4.0GET /api/licenses/cc-by-4.0→ 404GET /api/vocabularies/licenses/cc-by-4.0→ 200 OKResponse from working endpoint
GET /api/vocabularies/licenses/cc-by-4.0:{ "id": "cc-by-4.0", "created": "2023-10-12T17:24:17.213122+00:00", "updated": "2023-10-12T17:24:17.250742+00:00", "links": { "self": "https://zenodo.org/api/vocabularies/licenses/cc-by-4.0" }, "title": { "en": "Creative Commons Attribution 4.0 International" }, "type": "licenses" }Expected behavior
/api/licenses/:id→/api/vocabularies/licenses/:idor
Thank you very much for your work on Zenodo!