NASA-PDS / registry-api

Web API service for the PDS Registry, providing the implementation of the PDS Search API (https://github.com/nasa-pds/pds-api) for the PDS Registry.
https://nasa-pds.github.io/pds-api
Apache License 2.0
2 stars 5 forks source link

As a user, I want to receive a JSON response that contains the PDS4 label metadata in JSON format (application/vnd.nasa.pds.pds4+json) #450

Open jordanpadams opened 3 years ago

jordanpadams commented 3 years ago

πŸ’ͺ Motivation

...so that I can search for and parse the metadata for a particular product in a JSON-structured form. This will keep the nesting that comes with XML, enabling robust client applications to use that metadata.

πŸ“– Additional Details

βš–οΈ Acceptance Criteria

Given an ingested PDS4 product When I perform an API query for that product using the endnpoint /products/{lidvid} Then I expect the response to look something like this:

  {
    "id": "urn:nasa:pds:insight_cameras::7.0",
    "meta": {
      "file_size": 34534,
      "checksum": "fhfghx1224f"
    },
    "additional_meta": {
      "opus:": { ... }
      "analyst_notebook" : { ... }
      "dataCite" : { ... }
    },
    "pds4": {
       "Product_Bundle": {
          "Identification_Area": {
             "logical_identifier": "urn:nasa:pds:insight_cameras",
             "version_id": "7.0",
             "title": "InSight Cameras Bundle",
             "information_model_version": "1.11.1.0",
             "product_class": "Product_Bundle",
             "Citation_Information": {
                "author_list": "R. Deen, H. Abarca, P. Zamani, J.Maki",
                "publication_year": "2019",
                "description": "InSight Cameras Experiment Data Record (EDR) and Reduced Data Record (RDR) Data Products"
             }
          },
          "Context_Area": {
             "comment": "Observational Intent",
             "Time_Coordinates": {
                "start_date_time": "2020-07-05T14:15:07.441Z",
                "stop_date_time": "2020-10-05T02:02:53.219Z"
             },
             "Primary_Result_Summary": {
                "purpose": "Science",
                "processing_level": "Raw",
                "Science_Facets": {
                   "wavelength_range": "Visible",
                   "domain": "Surface",
                   "discipline_name": "Imaging"
                }
             },
             "Investigation_Area": {
                "name": "Insight",
                "type": "Mission",
                "Internal_Reference": {
                   "lid_reference": "urn:nasa:pds:context:investigation:mission.insight",
                   "reference_type": "bundle_to_investigation"
                }
             },
             "Observing_System": {
                "Observing_System_Component": [
                   {
                      "name": "Insight Lander",
                      "type": "Spacecraft",
                      "Internal_Reference": {
                         "lid_reference": "urn:nasa:pds:context:instrument_host:spacecraft.insight",
                         "reference_type": "is_instrument_host",
                         "comment": "Reference to the Insight spacecraft."
                      }
                   },
                   {
                      "name": "Insight Context Camera",
                      "type": "Instrument",
                      "Internal_Reference": {
                         "lid_reference": "urn:nasa:pds:context:instrument:icc.insight",
                         "reference_type": "is_instrument",
                         "comment": "Reference to the InSight Context Camera instrument onboard the InSight spacecraft."
                      }
                   },
                   {
                      "name": "Insight Deployment Camera",
                      "type": "Instrument",
                      "Internal_Reference": {
                         "lid_reference": "urn:nasa:pds:context:instrument:idc.insight",
                         "reference_type": "is_instrument",
                         "comment": "Reference to the InSight Deployment Camera instrument onboard the InsSight spacecraft."
                      }
                   }
                ]
             },
             "Target_Identification": {
                "name": "Mars",
                "type": "Planet",
                "Internal_Reference": {
                   "lid_reference": "urn:nasa:pds:context:target:planet.mars",
                   "reference_type": "document_to_target",
                   "comment": "Reference to the Planet - Mars target"
                }
             }
          },
          "Bundle": {
             "bundle_type": "Archive",
             "description": "This Bundle contains InSight camera data."
          },
          "Bundle_Member_Entry": [
             {
                "lid_reference": "urn:nasa:pds:insight_cameras:browse",
                "member_status": "Primary",
                "reference_type": "bundle_has_browse_collection"
             },
             {
                "lid_reference": "urn:nasa:pds:insight_cameras:calibration",
                "member_status": "Primary",
                "reference_type": "bundle_has_calibration_collection"
             },
             {
                "lid_reference": "urn:nasa:pds:insight_cameras:data",
                "member_status": "Primary",
                "reference_type": "bundle_has_data_collection"
             },
             {
                "lid_reference": "urn:nasa:pds:insight_cameras:document",
                "member_status": "Primary",
                "reference_type": "bundle_has_document_collection"
             },
             {
                "lid_reference": "urn:nasa:pds:insight_cameras:miscellaneous",
                "member_status": "Primary",
                "reference_type": "bundle_has_document_collection"
             },
             {
                "lid_reference": "urn:nasa:pds:insight_cameras:xml_schema",
                "member_status": "Primary",
                "reference_type": "bundle_has_schema_collection"
             }
          ],
          "_xmlns": "http://pds.nasa.gov/pds4/pds/v1",
          "_xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
          "_xsi:schemaLocation": "http://pds.nasa.gov/pds4/pds/v1 https://pds.nasa.gov/pds4/pds/v1/PDS4_PDS_1B10.xsd"
       }
    }
  }
]
}

βš™οΈ Engineering Details

tloubrieu-jpl commented 3 years ago

We will rename the MVC marshaller for application/json from Pds4JsonProductSerializer to JsonProductSerializer.

@eugene will create a new MVC marshaller Pds4JsonProductSerializer

jimmie commented 3 years ago

@jordanpadams - can you confirm we want this behavior extended to the list of products endpoint as well?