Question about the 'Parameters Combinations' practice tool

I came across this practice tool: Swagger UI and am using it to try out different queries (I don’t feel very confident with creating queries myself yet). One query I’d like to try is to pull /works with the following parameters:
rows=100
query.affiliation=standards (I enter this in the query box)
type:journal-article,from-pub-date:2021-02-01 (entered in Filter box)

When I enter these into the appropriate boxes, the RequestURL looks like this:
https://0-api-crossref-org.library.alliant.edu/works?rows=100&query=query.affiliation%3Dstandards&filter=type%3Ajournal-article%2Cfrom-pub-date%3A2021-02-01

and I get a total of 3972 results. Why does the RequestURL have the “query=” immediately before query.affiliation? When I remove this and run without the “query=” I get fewer total results that seem more in line with what I’d expect.

My colleague says the URL with “query=” in it is searching “standards” on the whole record, but I specifically entered query.affiliation=standards in the query field. Why is the tool inserting “query=” before query.affiliation? Thanks in advance to anyone that can explain the behavior.

Hello @kna10,

Thanks for the message.

So the query box in the swagger practice tool is only for the query= parameter and so that is why the query.affiliation is added after that string. But it does seem like we need more options on that tool to allow for the field queries and other things that might want to be included in the request URL.

I have logged a ticket for these improvements with the developers and so they will look to make those additions when possible.

For now you might need to remove the query= section manually to get the results more appropriate for your queries I am afraid.

Thanks,
Paul

1 Like

Thank you Paul! Nice to get that clarification.

1 Like