You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-ref.md
+111Lines changed: 111 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4925,6 +4925,117 @@ Returns the new `UserItem` object.
4925
4925
4926
4926
```
4927
4927
4928
+
#### users.bulk_add
4929
+
4930
+
```py
4931
+
users.bulk_add(users)
4932
+
```
4933
+
4934
+
When adding users in bulk, the server creates an asynchronous job. This method returns the `JobItem` you can use to track progress.
4935
+
4936
+
REST API: [Import Users to Site from CSV ](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_users_and_groups.htm#import_users_to_site_from_csv)
4937
+
4938
+
**Version**
4939
+
4940
+
This endpoint is available with REST API version **3.27** and up.
|`users`| An iterable of `UserItem` objects to add to the site. Each `UserItem` must have `name` set. |
4947
+
4948
+
**UserItem field notes**
4949
+
4950
+
*`name`**required**. If using Active Directory and the username isn’t unique across domains, include the domain-qualified form (for example `example\\Adam` or `adam@example.com`).
4951
+
*`fullname` is used as the user’s display name (TSC reads the display name from `fullname`).
4952
+
*`email` optional, but if provided it must be a valid email address; it is included in the REST payload as `email`.
4953
+
*`auth_setting` optional. If not provided and `idp_configuration_id` is `None`, the default is `ServerDefault`. (REST supports `authSetting` and `idpConfigurationId` as user creation attributes.)
4954
+
*`site_role` optional. If not provided, defaults to `Unlicensed`.
4955
+
*`password` optional and only used when the server is using **local authentication**; do not provide a password for other auth types.
4956
+
* Admin level and publishing capability are inferred from `site_role`.
4957
+
* If the user belongs to a different IdP configuration, set `UserItem.idp_configuration_id` to that configuration’s ID. (REST supports `idpConfigurationId` when adding a user.)
# If needed (Active Directory / non-unique names across domains), set the domain info
4980
+
for user in users:
4981
+
user.domain_name ="example.com"
4982
+
4983
+
job = server.users.bulk_add(users)
4984
+
```
4985
+
4986
+
4987
+
4988
+
#### users.bulk_remove
4989
+
4990
+
```py
4991
+
users.bulk_remove(users)
4992
+
```
4993
+
4994
+
Remove multiple users from the current site in a single bulk operation. Users are identified by **domain** and **name** (not by user ID). This call is "fire-and-forget" in TSC: it does **not** return a `JobItem`, and it does not provide per-user results.
4995
+
4996
+
REST API: [Delete Users from Site with CSV](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_users_and_groups.htm#delete_users_from_site_with_csv)
4997
+
4998
+
**Version**
4999
+
5000
+
This endpoint is available with REST API version **3.27** and up.
0 commit comments