opencitations / api-coci

REST API specification for COCI
1 stars 0 forks source link

query parameters ignored? #2

Closed sckott closed 5 years ago

sckott commented 5 years ago

The query parameters for this API described at http://opencitations.net/index/coci/api/v1#parameters seem to not have any effect on the query. e.g.,

curl 'http://opencitations.net/index/coci/api/v1/citations/10.1108/jd-12-2013-0166?exclude=oci' | jq '.[0]'
{
  "cited": "10.1108/jd-12-2013-0166",
  "oci": "020010107073600090601000000060105060106040500-0200101000836191363010263020001036300010606",
  "author_sc": "no",
  "journal_sc": "no",
  "timespan": "P1Y4M1D",
  "creation": "2016-07-10",
  "citing": "10.1177/0961000615616450"
}

Am I doing something wrong? Or might the query parameters not be used server side?

essepuntato commented 5 years ago

Hi @sckott

The "exclude" filter remove from the result set all the rows that have an empty value in the specified. Thus, it does not return a result set without that specific field – which is the thing you have tried to do, I suppose. In particular, the 'oci' field is always filled up by the API.

sckott commented 5 years ago

Ah, okay, I must have skipped by the word empty accidentally. Thanks for the clarification