@@ -43,6 +43,35 @@ def get(self, req_options: Optional[RequestOptions] = None) -> tuple[list[UserIt
4343 tuple[list[UserItem], PaginationItem]
4444 Returns a tuple with a list of UserItem objects and a PaginationItem object.
4545
46+ Raises
47+ ------
48+ ServerResponseError
49+ code: 400006
50+ summary: Invalid page number
51+ detail: The page number is not an integer, is less than one, or is
52+ greater than the final page number for users at the requested
53+ page size.
54+
55+ ServerResponseError
56+ code: 400007
57+ summary: Invalid page size
58+ detail: The page size parameter is not an integer, is less than one.
59+
60+ ServerResponseError
61+ code: 403014
62+ summary: Page size limit exceeded
63+ detail: The specified page size is larger than the maximum page size
64+
65+ ServerResponseError
66+ code: 404000
67+ summary: Site not found
68+ detail: The site ID in the URI doesn't correspond to an existing site.
69+
70+ ServerResponseError
71+ code: 405000
72+ summary: Invalid request method
73+ detail: Request type was not GET.
74+
4675 Examples
4776 --------
4877 >>> import tableauserverclient as TSC
@@ -82,6 +111,32 @@ def get_by_id(self, user_id: str) -> UserItem:
82111 UserItem
83112 The user item that was queried.
84113
114+ Raises
115+ ------
116+ ValueError
117+ If the user ID is not specified.
118+
119+ ServerResponseError
120+ code: 404000
121+ summary: Site not found
122+ detail: The site ID in the URI doesn't correspond to an existing site.
123+
124+ ServerResponseError
125+ code: 403133
126+ summary: Query user permissions forbidden
127+ detail: The user does not have permissions to query user information
128+ for other users
129+
130+ ServerResponseError
131+ code: 404002
132+ summary: User not found
133+ detail: The user ID in the URI doesn't correspond to an existing user.
134+
135+ ServerResponseError
136+ code: 405000
137+ summary: Invalid request method
138+ detail: Request type was not GET.
139+
85140 Examples
86141 --------
87142 >>> user1 = server.users.get_by_id('9f9e9d9c-8b8a-8f8e-7d7c-7b7a6f6d6e6d')
@@ -212,6 +267,62 @@ def add(self, user_item: UserItem) -> UserItem:
212267 The user item that was added to the site with attributes from the
213268 site populated.
214269
270+ Raises
271+ ------
272+ ValueError
273+ If the user item is missing a name
274+
275+ ValueError
276+ If the user item is missing a site role
277+
278+ ServerResponseError
279+ code: 400000
280+ summary: Bad Request
281+ detail: The content of the request body is missing or incomplete, or
282+ contains malformed XML.
283+
284+ ServerResponseError
285+ code: 400003
286+ summary: Bad Request
287+ detail: The user authentication setting ServerDefault is not
288+ supported for you site. Try again using TableauIDWithMFA instead.
289+
290+ ServerResponseError
291+ code: 400013
292+ summary: Invalid site role
293+ detail: The value of the siteRole attribute must be Explorer,
294+ ExplorerCanPublish, SiteAdministratorCreator,
295+ SiteAdministratorExplorer, Unlicensed, or Viewer.
296+
297+ ServerResponseError
298+ code: 404000
299+ summary: Site not found
300+ detail: The site ID in the URI doesn't correspond to an existing site.
301+
302+ ServerResponseError
303+ code: 404002
304+ summary: User not found
305+ detail: The server is configured to use Active Directory for
306+ authentication, and the username specified in the request body
307+ doesn't match an existing user in Active Directory.
308+
309+ ServerResponseError
310+ code: 405000
311+ summary: Invalid request method
312+ detail: Request type was not POST.
313+
314+ ServerResponseError
315+ code: 409000
316+ summary: User conflict
317+ detail: The specified user already exists on the site.
318+
319+ ServerResponseError
320+ code: 409005
321+ summary: Guest user conflict
322+ detail: The Tableau Server API doesn't allow adding a user with the
323+ guest role to a site.
324+
325+
215326 Examples
216327 --------
217328 >>> import tableauserverclient as TSC
0 commit comments