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
+235Lines changed: 235 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3158,6 +3158,241 @@ for flow in matching_flows:
3158
3158
3159
3159
---
3160
3160
3161
+
## Flow Runs
3162
+
3163
+
Using the TSC library, you can query flow runs on a site, get details about a specific flow run, cancel a running flow, or wait for a flow run to complete. Flow runs are created when a flow is triggered to run, either manually or on a schedule.
3164
+
3165
+
The flow run resources for Tableau Server are defined in the `FlowRunItem` class. The class corresponds to the flow run resources you can access using the Tableau Server REST API.
3166
+
3167
+
<br>
3168
+
3169
+
### FlowRunItem class
3170
+
3171
+
The `FlowRunItem` represents the result of a flow run on Tableau Server. Instances of this class are returned by the flow run methods; you do not create them directly.
3172
+
3173
+
**Attributes**
3174
+
3175
+
Name | Description
3176
+
:--- | :---
3177
+
`id` | The identifier for the flow run.
3178
+
`flow_id` | The identifier of the flow that was run.
3179
+
`status` | The current status of the flow run. Possible values include `Success`, `Failed`, and `Cancelled`.
3180
+
`started_at` | The date and time when the flow run started.
3181
+
`completed_at` | The date and time when the flow run completed. Is `None` if the run is still in progress.
3182
+
`progress` | The progress percentage of the flow run.
3183
+
`background_job_id` | The identifier of the background job associated with the flow run.
3184
+
3185
+
Source file: models/flow_run_item.py
3186
+
3187
+
<br>
3188
+
<br>
3189
+
3190
+
### Flow Runs methods
3191
+
3192
+
The Tableau Server Client provides several methods for interacting with flow run resources. These methods correspond to endpoints in the Tableau Server REST API.
Waits for the specified flow run to complete and returns the finished `FlowRunItem`. This method polls the server repeatedly using exponential backoff until the run completes, then raises an exception if it failed or was cancelled.
3323
+
3324
+
**Parameters**
3325
+
3326
+
Name | Description
3327
+
:--- | :---
3328
+
`flow_run_id` | The identifier (`id`) for the flow run to wait for. Can be the id string or a `FlowRunItem` object.
3329
+
`timeout` | (Optional) The maximum number of seconds to wait before raising a timeout error. If not specified, waits indefinitely.
3330
+
3331
+
**Exceptions**
3332
+
3333
+
Error | Description
3334
+
:--- | :---
3335
+
`FlowRunFailedException` | Raised if the flow run completes with a `Failed` status.
3336
+
`FlowRunCancelledException` | Raised if the flow run completes with a `Cancelled` status.
3337
+
3338
+
**Returns**
3339
+
3340
+
Returns the completed `FlowRunItem` if the run succeeded.
3341
+
3342
+
**Version**
3343
+
3344
+
Version 3.10 and later. See [REST API versions](https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_concepts_versions.htm).
print("Flow run completed with status: {}".format(flow_run.status))
3356
+
```
3357
+
3358
+
<br>
3359
+
<br>
3360
+
3361
+
#### flow_runs.filter
3362
+
3363
+
```py
3364
+
flow_runs.filter(**kwargs)
3365
+
```
3366
+
3367
+
Returns a list of flow runs that match the specified filters. Fields and operators are passed as keyword arguments in the form `field_name=value` or `field_name__operator=value`.
0 commit comments