Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

HTTP Documentation of groups.create doesn't reflect the required "members" attribute #18

Open
skamensky opened this issue Jul 23, 2019 · 0 comments

Comments

@skamensky
Copy link

Running
group = client.groups.create('groupname')
raises an error. After debugging, the content of the request is:

'{"formErrors":[],"inputErrors":{"members":[{"code":"MEMBERS_FIELD_IS_REQUIRED","msg":"Members field is required."}]}}'

Even though the HTTP documentation shows that members is optional.
This makes using the groups.create impossible without modifying the source code.

The code below is a workaround.

client._session.post(
    '{prfx}pubapi/v2/groups'.format(prfx=client._url_prefix),
    json = {'displayName' : 'test3','members' : [{"value": 1}]}
    )
@skamensky skamensky changed the title HTTP Documentation of groups.create doesn't reflect HTTP Documentation of groups.create doesn't reflect the required "members" attribute Jul 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant