TheJumpCloud / jcapi-python

21 stars 20 forks source link

groups_user_list not returning fields specified in API documentation #53

Open pfdan opened 1 year ago

pfdan commented 1 year ago

When running

api_response = apiv2_instance.groups_user_list( content_type, accept)
print(api_response)

each group object is returned as in the link: https://github.com/TheJumpCloud/jcapi-python/blob/master/jcapiv2/docs/UserGroup.md

{'attributes': None,
 'id': 'redacted',
 'name': 'redacted',
 'type': 'user_group'}

However, in https://docs.jumpcloud.com/api/2.0/index.html#tag/User-Groups/operation/groups_user_list

I can see that the format should contain an "email" field amongst other things.

I have tried using api_response = apiv2_instance.groups_user_list( content_type, accept, fields=["email", "id", "name"]) to no avail.

Am I doing something wrong, or is there an issue here? Running the snippet from the API docs in Python returns all fields as expected.