API response when user doesn't have read permissions?


#1

I’m trying to figure out how to differentiate two different reasons why an api search may return 0 results:

  1. The user doing the search does not have read permissions on the field being searched.
  2. The user has read permissions but no results were found.

The following curl command returns the same headers and data regardless of the reason why the search returned zero results.

curl --request POST \
  --url https://help.reed.edu/REST/2.0/assets \
  --header 'authorization: Basic authtokengoeshere' \
  --cookie backend=sonoftrogdor \
  --data '[{ "field": "Description", "operator": "LIKE", "value": "QP0293P7DAS" }]'

Is there any way to get a “permission denied” or other response when the user does not have read permissions on the field being searched?

Thank you!