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

Implements the OAI-PMH protocol at the '/oai' endpoint. #53

Merged
merged 1 commit into from
Dec 9, 2022

Conversation

bmquinn
Copy link
Contributor

@bmquinn bmquinn commented Dec 6, 2022

Description

Implements the OAI-PMH protocol at the '/oai' endpoint. The endpoint supports both 'GET' and 'POST' requests according to the specification. All responses should return XML documents that validate against the OAI_PMH schema

Supports the following verbs:

Tests:
100% test coverage, check out test/integration/oai.test.js to see all the error case handling required by the OAI-PMH specification

Steps to test

For "list requests" (e.g. ListRecords):

  • Make a request using the verb and metadataPrefix parameters: http://localhost:3000/oai?verb=ListRecords&metadataPrefix=oai_dc
  • Make subsequent requests including the resumptionToken returned in the previous request: http://localhost:3000/oai?verb=ListRecords&metadataPrefix=oai_dc&resumptionToken=FGluY2x1ZGVfY29udGV4dF91dWlkDXF1ZXJ5QW5kRmV0Y2gBFm1jN3ZCajdnUURpbUhad1hIYnNsQmcAAAAAAAB2DhZXbmtMZVF5Q1JsMi1ScGRsYUlHLUtB
  • Repeat the previous step until the list is complete. You'll know it is complete when you get an XML response with an empty resumptionToken element
  • If you continue to make requests using that same resumptionToken you should get an error response with badResumptionToken

For all other verbs, pass in the verb and any required parameters using either POST or GET requests:

  • curl http://localhost:3000/oai?verb=GetRecord&identifier=c02c149f-1df1-4252-ae93-79031c676e71&metadataPrefix=oai_dc
  • curl -X POST 'http://localhost:3000/oai' --data 'verb=Identify'

@bmquinn bmquinn requested review from mbklein and kdid December 6, 2022 17:51
The endpoint supports both 'GET' and 'POST' requests according to the specification.
@bmquinn bmquinn temporarily deployed to test December 7, 2022 00:13 — with GitHub Actions Inactive
Copy link
Contributor

@kdid kdid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks 👍

@kdid kdid merged commit a81b1a8 into deploy/staging Dec 9, 2022
@kdid kdid deleted the 2392-oai-pmh branch December 9, 2022 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants