NatLibFi / Finto-suggestions

Finto-suggestions
7 stars 1 forks source link

Uudelleenrefaktoroidaan haku #300

Closed kouralex closed 4 years ago

kouralex commented 4 years ago

Päädyttiin siihen, että suggestion/open/skos-endpointia pitää muuttaa seuraavasti:

in suggestions.py:

Alustava aikatauluarvio on 2-3 päivää

Originally posted by @miguelahonen in https://github.com/NatLibFi/Finto-suggestions/pull/274#issuecomment-588121955

miguelvaara commented 4 years ago

curl -X GET --header 'Accept: text/turtle' --header 'Authorization: Bearer ..YourSHAorSomethingForAuthorization.. ' 'http://localhost:8080/api/suggestions/skosfilter?filters=status:received.read.accepted.rejected.retained.archived|exclude:true/false|type:new/modify/both|yse:true/false/both|model:skos/dc/foaf|format:turtle/jsonld/xml/n3/ntriples|suggestion_id:0/suggestion_id:nnnn'

1) At least one status flag should be used
2) Status flags must be delimited by a dot (.)
3) The 'pipe' is used as delimiter for query parameters 
4) suggestion_id:0 returns all the filtered suggestions
5) suggestion_id:nnnn retruns only one suggestion by suggestion id
6) All the parameters must be defined in the query

Example:

curl -X GET --header 'Accept: text/turtle' --header 'Authorization: Bearer ABC123ABC123' 'http://localhost:8080/api/suggestions/skosfilter?filters=status:received.read.accepted.rejected.retained.archived|exclude:false|type:both|yse:both|model:skos|format:turtle|suggestion_id:0'

fixes #300