divinorum-webb / tableau-api-lib

An API library that allows developers to call on the methods listed in Tableau's REST API documentation.
MIT License
96 stars 34 forks source link

create_group might create the wrong field in request #69

Closed harrismcgehee closed 2 years ago

harrismcgehee commented 2 years ago

conn.create_group(group_name = "test", minimum_site_role = "Explorer")

yields

Deserialization problem: Unrecognized field \"siteRole\" (class com.tableausoftware.api.rest.viewmodels.GroupType), not marked as ignorable (6 known properties: \"domain\", \"import\", \"id\", \"userCount\", \"name\", \"minimumSiteRole\"])\n at [Source: (StringReader); line: 1, column: 72] (through reference chain: com.tableausoftware.api.rest.viewmodels.TsRequest[\"group\"]->com.tableausoftware.api.rest.viewmodels.GroupType[\"siteRole\"]);

divinorum-webb commented 2 years ago

Thanks for calling this out, this is now fixed. I was able to reproduce the exact same error locally and the fix is now reflected in the published package.

Please run pip install -U tableau-api-lib to implement the fix.

The issue was that, when creating local groups, the site role should be specified as minimumSiteRole. This was being specified as siteRole. This has been fixed and I have personally verified that the create_group method in the way you described above successfully created a group on my Tableau Server and set the minimum site role to "Explorer".