entities/users odd behaviour Hi, I’m trying to ru...
# gooddata-cloud
r
entities/users odd behaviour Hi, I’m trying to run these 2 calls:
curl -H "Authorization: Bearer $PROD_GOODDATA_API_TOKEN" -X GET $PROD_GOODDATA_HOST_URL/api/v1/entities/users?include=userGroups
zsh: no matches found: https://xxxxxx.cloud.gooddata.com/api/v1/entities/users?include=userGroups
curl -H "Authorization: Bearer $PROD_GOODDATA_API_TOKEN" -X GET $PROD_GOODDATA_HOST_URL/api/v1/entities/users
{“data”[{“id”“06f5df86-7070-4aa4-ba71-70e9d3011524”,“type”“user”,“attributes”{“authenticationId”“auth0|663c95ac4b54d4701f20c96c”,“firstname”“”..... Why would the
?include=…
not work?
m
Hello Romain, I just tested the endpoint and it works for me. May I know how you are making the call? Are you getting the same result in the browser?
r
I’m doing that exact call with curl, from the shell, on my account which has Auth0 as its id provider
j
Hi Romain, May I ask you to reproduce this again and send us a traceID so we can trace your request in our logs? Also, as my colleague asked, does this work for you correctly while accessing the API endpoint from browser?
r
I found the pb. PBCAK 🙇‍♂️ In the browser, this works:
Copy code
<https://fitcollective.cloud.gooddata.com/api/v1/entities/users?include=userGroups>
in shell/curl, this failed.
Copy code
curl -H "Authorization: Bearer $PROD_GOODDATA_API_TOKEN" -X GET $PROD_GOODDATA_HOST_URL/api/v1/entities/users?include=userGroups
zsh: no matches found: <https://fitcollective.cloud.gooddata.com/api/v1/entities/users?include=userGroups>
and it’s because of the
?
… you need to put the whole url between
"
. This (obviously) works:
Copy code
curl -H "Authorization: Bearer $PROD_GOODDATA_API_TOKEN" -X GET "$PROD_GOODDATA_HOST_URL/api/v1/entities/users?include=userGroups"
🙌🏼 1