Skip to content

Queries returning full PDS4 metadata do not return requested fields #730

@jchristian-wustl

Description

@jchristian-wustl

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

When performing a search query to list all products in a collection that includes the "fields" query parameter to request specific fields:

  • If requesting application/json or application/xml: data for those fields are returned
  • If requesting application/vnd.nasa.pds.pds4+json or application/vnd.nasa.pds.pds4+xml: data for those fields are not returned

This is most relevant when requesting "ops:Harvest_Info.ops:harvest_date_time", which the documentation recommends using for sorting and pagination. Since the harvest time is not included in the query response, it is impossible to send another request for the next page.

This also means that it is impossible to request the full PDS4 labels and additional data not included in the label (e.g. ops:Data_File_Info.ops:file_ref, ops:Label_File_Info.ops:file_ref) in a single query; multiple repeat calls to the same endpoint would be required.

🕵️ Expected behavior

I expected the query response XML or JSON to include data for the requested fields.

📜 To Reproduce

Here is a sample curl command:

curl --location --get 'https://pds.nasa.gov/api/search/1/products/urn:nasa:pds:mars2020_hazcam_ops_calibrated:data/members' --header 'Accept: application/json' --data-urlencode 'sort=ops:Harvest_Info.ops:harvest_date_time' --data-urlencode 'limit=1' --data-urlencode 'fields=ops:Harvest_Info.ops:harvest_date_time'

As-is, this command requests application/json and includes the harvest time in the response. Changing the header to application/vnd.nasa.pds.pds4+json or application/vnd.nasa.pds.pds4+xml causes the response to no longer contain the harvest time.

🖥 Environment Info

Tested via HTTP GET requests against https://pds.nasa.gov/api/search/1/

📚 Version of Software Used

No response

🩺 Test Data / Additional context

No response

🦄 Related requirements

No response

⚙️ Engineering Details

No response

🎉 Integration & Test

No response

Metadata

Metadata

Assignees

Labels

B17B18bugSomething isn't workings.mediumMedium level severitysprint-backlogtask-spillovertask from previous build increment have spilled over into current planning increment.

Type

Projects

Status

ToDo

Status

Blocked

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions