Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement FAIRiCat for API discovery #2906

Open
slint opened this issue Nov 11, 2024 · 0 comments
Open

Implement FAIRiCat for API discovery #2906

slint opened this issue Nov 11, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@slint
Copy link
Member

slint commented Nov 11, 2024

FAIRiCat, is a simple specification that allows web services to declare what commonly known APIs they support (e.g. OAI-PMH, FAIR Signposting, IIIF, etc.) using a JSON file exposed under /.well-known/api-catalog.

For InvenioRDM, to describe the following services/APIs:

  • OAI-PMH
  • IIIF
  • Sitemaps
  • Robots.tx

we would serve the following file:

{
  "linkset": [
    {
      "anchor": "https://inveniordm.web.cern.ch/oai2d",
      "service-doc": [
        {
          "href": "https://www.openarchives.org/OAI/openarchivesprotocol.html",
          "type": "text/html",
          "title": "Open Archives Initiative - Protocol for Metadata Harvesting - v.2.0"
        }
      ],
      "service-meta": [
        {
          "href": "https://inveniordm.web.cern.ch/oai2d?verb=Identify",
          "type": "application/xml"
        }
      ]
    },
    {
      "anchor": "https://inveniordm.web.cern.ch/api/iiif",
      "service-doc": [
        {
          "href": "https://iiif.io/api/presentation/3.0/",
          "type": "text/html",
          "title": "Presentation API 3.0 —  IIIF | International Image Interoperability Framework"
        }
      ]
    },
    {
      "anchor": "https://inveniordm.web.cern.ch/sitemap.xml",
      "service-doc": [
        {
          "href": "https://www.sitemaps.org/protocol.html",
          "type": "text/html",
          "title": "sitemaps.org - Protocol"
        }
      ]
    },
    {
      "anchor": "https://inveniordm.web.cern.ch/robots.txt",
      "service-doc": [
        {
          "href": "https://datatracker.ietf.org/doc/rfc9309/",
          "type": "text/html",
          "title": "RFC 9309 - Robots Exclusion Protocol"
        }
      ]
    }
  ]
}

The file should be generated and served dynamically, since if e.g. IIIF or any of the features/APIs are disabled, they shouldn't be included in the output JSON.

@slint slint added enhancement New feature or request good first issue Good for newcomers labels Nov 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant