Skip to content

Commit 3730f7c

Browse files
authored
[docs] Updates to API reference content (#1188)
* Multiple updates
1 parent 94e2b0c commit 3730f7c

1 file changed

Lines changed: 43 additions & 3 deletions

File tree

docs/api-ref.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1416,6 +1416,45 @@ Returns the `JobItem` requested.
14161416
<br>
14171417
<br>
14181418

1419+
#### jobs.cancel
1420+
1421+
```py
1422+
jobs.cancel(job_id)
1423+
```
1424+
1425+
Cancels the currently running job. Can be used to cancel currently running jobs like extract refreshes.
1426+
1427+
**Parameters**
1428+
1429+
Name | Description
1430+
:----|:----
1431+
`job_id` | The `job_id` specifies the id of the job that we want to cancel. It is the id of the job that is retunred from an asynchronous taks, such as extract refresh, run a flow, or import or update to groups using Active Directory.
1432+
1433+
**Exceptions**
1434+
1435+
Error | Description
1436+
:----|:----
1437+
404 Resource Not Found | Raises an error if the `job_id` is not found.
1438+
1439+
**Returns** Returns the details of the canceled job including the URL of the site where the job was created.
1440+
1441+
**Example**
1442+
```py
1443+
# Query a Job
1444+
1445+
# import tableauserverclient as TSC
1446+
# tableau_auth = TSC.TableauAuth('USERNAME', 'PASSWORD')
1447+
# server = TSC.Server('https://SERVERURL')
1448+
1449+
with server.auth.sign_in(tableau_auth):
1450+
1451+
# get the id of the job from response from the query job method.
1452+
# in this example, "576b781d-331c-4539-b61d-1ed0eb9db548"
1453+
cancelJobId = '576b781d-331c-4539-b61d-1ed0eb9db548'
1454+
jobs.cancel (cancelJobId)
1455+
1456+
```
1457+
14191458
#### jobs.wait_for_job
14201459

14211460

@@ -3189,7 +3228,8 @@ Attribute | Description
31893228
`name` | The name of the site. The name of the default site is "".
31903229
`content_url` | The path to the site.
31913230
`admin_mode` | (Optional) For Tableau Server only. Specify `ContentAndUsers` to allow site administrators to use the server interface and **tabcmd** commands to add and remove users. (Specifying this option does not give site administrators permissions to manage users using the REST API.) Specify `ContentOnly` to prevent site administrators from adding or removing users. (Server administrators can always add or remove users.)
3192-
`user_quota`| (Optional) Specifies the maximum number of users for the site. If you do not specify this value, the limit depends on the type of licensing configured for the server. For user-based license, the maximum number of users is set by the license. For core-based licensing, there is no limit to the number of users. If you specify a maximum value, only licensed users are counted and server administrators are excluded. Mutually exclusive with tiered license level settings.
3231+
`user_quota`| (Optional) Specifies the total number of users for the site. The number can't exceed the number of licenses activated for the site; and if tiered capacity attributes are set, then `user_quota` will equal the sum of the tiered capacity values, and attempting to set `user_quota` will cause an error.
3232+
Tiered capacity attributes: `tier_explorer_capacity` `tier_creator_capacity` `tier_viewer_capacity`| (Optional) The maximum number of licenses for users with the Creator, Explorer, or Viewer role, respectively, allowed on a site.
31933233
`storage_quota` | (Optional) Specifies the maximum amount of space for the new site, in megabytes. If you set a quota and the site exceeds it, publishers will be prevented from uploading new content until the site is under the limit again.
31943234
`disable_subscriptions` | (Optional) Specify `true` to prevent users from being able to subscribe to workbooks on the specified site. The default is `false`.
31953235
`subscribe_others_enabled` | (Optional) Specify `false` to prevent server administrators, site administrators, and project or content owners from being able to subscribe other users to workbooks on the specified site. The default is `true`.
@@ -4242,7 +4282,6 @@ The `UserItem`. See [UserItem class](#useritem-class)
42424282
```
42434283

42444284
<br>
4245-
<br>
42464285

42474286

42484287
#### users.populate_favorites
@@ -5069,6 +5108,7 @@ Name | Description
50695108
`project_name` | The name of the project.
50705109
`size` | The size of the workbook (in megabytes).
50715110
`show_tabs` | (Boolean) Determines whether the workbook shows tabs for the view.
5111+
`hidden_views` | (Optional) List of string names of views that need to be hidden when the workbook is published.
50725112
`tags` | The tags that have been added to the workbook.
50735113
`updated_at` | The date and time when the workbook was last updated.
50745114
`views` | The list of views (`ViewItem`) for the workbook. You must first call the [workbooks.populate_views](#workbooks.populate_views) method to access this data. See the [ViewItem class](#viewitem-class).
@@ -5226,7 +5266,7 @@ REST API: [Publish Workbook](https://help.tableau.com/current/api/rest_api/en-us
52265266
Name | Description
52275267
:--- | :---
52285268
`workbook_item` | The `workbook_item` specifies the workbook you are publishing. When you are adding a workbook, you need to first create a new instance of a `workbook_item` that includes a `project_id` of an existing project. The name of the workbook will be the name of the file, unless you also specify a name for the new workbook when you create the instance. See [WorkbookItem](#workbookitem-class).
5229-
`file_path` | The path and name of the workbook to publish.
5269+
`file` | The file path or file object of the workbook to publish. When providing a file object, you must also specifiy the name of the workbook in your instance of the `workbook_item``workbook_item` , as the name cannot be derived from the file name.
52305270
`mode` | Specifies whether you are publishing a new workbook (`CreateNew`) or overwriting an existing workbook (`Overwrite`). You cannot appending workbooks. You can also use the publish mode attributes, for example: `TSC.Server.PublishMode.Overwrite`.
52315271
`connections` | List of `ConnectionItems` objects for the connections created within the workbook.
52325272
`connection_credentials` | (Optional) The credentials (if required) to connect to the workbook's data source. The `ConnectionCredentials` object contains the authentication information for the data source (user name and password, and whether the credentials are embedded or OAuth is used). **Deprecated since API server version 2.3.**

0 commit comments

Comments
 (0)