'includeRoles=true' query param in 'Find all users on workspace' API endpoint

Hello!

I’m trying to query the management structure of our organization from your API and I tried using the ‘includeRoles=true’ query param in ‘Find all users on workspace’ API endpoint without success.
Here’s the documentation I tried to follow.

I tried using different cases writing the param name - both “include-roles” and “includeRoles” - and different quotations for the value - true (no quotation), ‘true’, “true” – didn’t work.

  • Could you tell me if this part of the docs is up to date?
  • If this should be working, could you give me an example request in eg. curl that’s properly formatted?
  • Also, is there a maintained OpenAPI document available? It would make our work much easier then trying to rely only on the docs.

Thank you in advance!

Hello!

Please note that our API documentation is up to date and is regularly being updated. I’m not sure how the query looks on your end, but when you get the chance, could you please try this request in the URL?

https://api.clockify.me/api/v1/workspaces/{wsid}/users?includeRoles=true

If you’re still unable to get user roles, please reach out to us at support@clockify.me and provide us with a couple of screenshots of your request so we can look into this further.

Cheers!

Hi!

Thank you so much for your help - it worked!
Turns out it was an incredibly silly mistake on my end: I was trying to send it in the request body instead of sending it as a query parameter.
Also both “includeRoles” and “include-roles” work.

Thanks again, for confirming the reliability of the docs as well!

Cheers!

Thanks for the update. I’m glad to hear that the issue has been resolved!