Clarify behavior of `approved=false` flag
According to the OpenAPI doc, GET /api/:category
and GET /api/:category/:pid
take an approved
flag which defaults to true
.
Could you clarify the behavior of ?approved=false
for authenticated and non-authenticated users?
Here's what i did:
- getAll, not authenticated => approved flag is ignored(?)
curl "https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at/api/datasets?approved=false" | jq '.datasets[].status'
"approved"
"approved"
- getAll, authenticated => approved flag is still ignored(?)
curl -H "Authorization: Bearer ..." "https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at/api/datasets?approved=false" | jq '.datasets[].status'
"approved"
"approved"
- getById, not authenticated => seems to required authentication
curl "https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at/api/datasets/U2efzw?approved=false"
403 ERROR
- getById, authenticated => returns an item, but it has status approved
curl -H "Authorization: Bearer ..." "https://sshoc-marketplace-api.acdh-dev.oeaw.ac.at/api/datasets/0H0PCB?approved=false" | jq '.status'
"approved"