data.gov
data.gov copied to clipboard
Harvest 2.0 Original Metadata API route
User Story
In order to have the originally harvested metadata, geospatial metadata users want an API that allows to get the original harvested metadata.
Acceptance Criteria
- [ ] GIVEN the harvester2.0 API is available and the route
/harvest_record/raw/{id}
is created
WHEN a legitimate ID is used to hit the API at/harvest_record/raw/{id}
THEN the original metadata is returned with correct formatting (ie xml, json, etc with correct content type)
Background
Related to https://github.com/GSA/data.gov/issues/4749, this ticket is required before #4749 can be taken on. Should consider updating the Flask Routes documentation
Security Considerations (required)
None
Sketch
Simply do the lookup in the DB for the information and return it. 404 if the resource is not in the DB. Make sure to setup the content type correctly for the different metadata standard, whether SML or JSON.