Skip to content

GET /api/licenses/:id returns 404 — correct path is /api/vocabularies/licenses/:id #71

Description

@alxis0

The API documentation states that a single license can be retrieved via:

GET /api/licenses/:id

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

  1. GET /api/licenses/200 OK
  2. Pick any license id from the response, e.g. cc-by-4.0
  3. Note that links.self points to https://zenodo.org/api/vocabularies/licenses/cc-by-4.0
  4. GET /api/licenses/cc-by-4.0404
  5. GET /api/vocabularies/licenses/cc-by-4.0200 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions