Skip to content

Using start query parameter returns a 400 error #746

@anilnatha

Description

@anilnatha

Checked for duplicates

Yes - I've already checked

🐛 Describe the bug

When I added the start parameter to my API request, the server responded with a 400 error:

400 BAD_REQUEST Request uri=/api/search/1/products failed with message: Query parameter not enumerated in SecurityValidationFilter.ALLOWED_QUERY_PARAMETERS: start(ref:f1028153-d70e-4e2b-b484-f6ac77ea6eeb) For assistance, forward this error message to pds-operator@jpl.nasa.gov

🕵️ Expected behavior

I expected the server to offset the results returned by the value of the start parameter. The PDS API documentation contains information about the start parameter, so I assumed it was available.

Reference: https://nasa-pds.github.io/pds-api/general-conventions.html#pagination-sort

Also, on that page,

  1. We link to the moesif site for documentation about pagination and sorting. Perhaps we can instead demonstrate the usage of the start and limit parameters in an example query and remove this link.

  2. There are no sorting options, so I would remove the term "sort" from the documentation as it is misleading

📜 To Reproduce

  1. Execute the following query:

Against pds.mcp.nasa.gov:

https://pds.mcp.nasa.gov/api/search/1/products?q=(lid LIKE "urn:nasa:pds:context:instrument:*" OR lid LIKE "urn:esa:psa:context:instrument:*" OR lid LIKE "urn:jaxa:darts:context:instrument:*" OR lid LIKE "urn:isro:isda:context:instrument:*" OR lid LIKE "urn:kari:kpds:context:instrument:*")&start=1&limit=100

Against pds.nasa.gov:

https://pds.nasa.gov/api/search/1/products?q=(lid LIKE "urn:nasa:pds:context:instrument:*" OR lid LIKE "urn:esa:psa:context:instrument:*" OR lid LIKE "urn:jaxa:darts:context:instrument:*" OR lid LIKE "urn:isro:isda:context:instrument:*" OR lid LIKE "urn:kari:kpds:context:instrument:*")&start=1&limit=100

Using a browser:

Image

Using Postman:

Image

🖥 Environment Info

  • Version of this software [e.g. vX.Y.Z]
  • Operating System: [e.g. MacOSX with Docker Desktop vX.Y]
    ...

📚 Version of Software Used

No response

🩺 Test Data / Additional context

If the related requirement (#415) isn't implemented, perhaps the start parameter documentation should be removed until it is.

🦄 Related requirements

🦄 #415

⚙️ Engineering Details

No response

🎉 Integration & Test

No response

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

🏁 Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions