tableauserverclient 0.33__py3-none-any.whl → 0.35__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- tableauserverclient/__init__.py +33 -23
- tableauserverclient/{_version.py → bin/_version.py} +3 -3
- tableauserverclient/config.py +5 -3
- tableauserverclient/models/column_item.py +1 -1
- tableauserverclient/models/connection_credentials.py +18 -2
- tableauserverclient/models/connection_item.py +44 -6
- tableauserverclient/models/custom_view_item.py +78 -11
- tableauserverclient/models/data_acceleration_report_item.py +2 -2
- tableauserverclient/models/data_alert_item.py +5 -5
- tableauserverclient/models/data_freshness_policy_item.py +6 -6
- tableauserverclient/models/database_item.py +3 -3
- tableauserverclient/models/datasource_item.py +10 -10
- tableauserverclient/models/dqw_item.py +1 -1
- tableauserverclient/models/favorites_item.py +5 -6
- tableauserverclient/models/fileupload_item.py +1 -1
- tableauserverclient/models/flow_item.py +54 -9
- tableauserverclient/models/flow_run_item.py +3 -3
- tableauserverclient/models/group_item.py +44 -4
- tableauserverclient/models/groupset_item.py +4 -4
- tableauserverclient/models/interval_item.py +9 -9
- tableauserverclient/models/job_item.py +73 -8
- tableauserverclient/models/linked_tasks_item.py +5 -5
- tableauserverclient/models/metric_item.py +5 -5
- tableauserverclient/models/pagination_item.py +1 -1
- tableauserverclient/models/permissions_item.py +12 -10
- tableauserverclient/models/project_item.py +73 -19
- tableauserverclient/models/property_decorators.py +12 -11
- tableauserverclient/models/reference_item.py +2 -2
- tableauserverclient/models/revision_item.py +3 -3
- tableauserverclient/models/schedule_item.py +2 -2
- tableauserverclient/models/server_info_item.py +26 -6
- tableauserverclient/models/site_item.py +69 -3
- tableauserverclient/models/subscription_item.py +3 -3
- tableauserverclient/models/table_item.py +1 -1
- tableauserverclient/models/tableau_auth.py +115 -5
- tableauserverclient/models/tableau_types.py +2 -2
- tableauserverclient/models/tag_item.py +3 -4
- tableauserverclient/models/task_item.py +34 -4
- tableauserverclient/models/user_item.py +47 -17
- tableauserverclient/models/view_item.py +66 -13
- tableauserverclient/models/virtual_connection_item.py +6 -5
- tableauserverclient/models/webhook_item.py +39 -6
- tableauserverclient/models/workbook_item.py +116 -13
- tableauserverclient/namespace.py +1 -1
- tableauserverclient/server/__init__.py +2 -1
- tableauserverclient/server/endpoint/auth_endpoint.py +69 -10
- tableauserverclient/server/endpoint/custom_views_endpoint.py +258 -29
- tableauserverclient/server/endpoint/data_acceleration_report_endpoint.py +2 -2
- tableauserverclient/server/endpoint/data_alert_endpoint.py +14 -14
- tableauserverclient/server/endpoint/databases_endpoint.py +13 -12
- tableauserverclient/server/endpoint/datasources_endpoint.py +61 -62
- tableauserverclient/server/endpoint/default_permissions_endpoint.py +19 -18
- tableauserverclient/server/endpoint/dqw_endpoint.py +9 -9
- tableauserverclient/server/endpoint/endpoint.py +19 -21
- tableauserverclient/server/endpoint/exceptions.py +23 -7
- tableauserverclient/server/endpoint/favorites_endpoint.py +31 -31
- tableauserverclient/server/endpoint/fileuploads_endpoint.py +9 -11
- tableauserverclient/server/endpoint/flow_runs_endpoint.py +15 -13
- tableauserverclient/server/endpoint/flow_task_endpoint.py +2 -2
- tableauserverclient/server/endpoint/flows_endpoint.py +344 -29
- tableauserverclient/server/endpoint/groups_endpoint.py +342 -27
- tableauserverclient/server/endpoint/groupsets_endpoint.py +2 -2
- tableauserverclient/server/endpoint/jobs_endpoint.py +116 -7
- tableauserverclient/server/endpoint/linked_tasks_endpoint.py +2 -2
- tableauserverclient/server/endpoint/metadata_endpoint.py +2 -2
- tableauserverclient/server/endpoint/metrics_endpoint.py +10 -10
- tableauserverclient/server/endpoint/permissions_endpoint.py +13 -15
- tableauserverclient/server/endpoint/projects_endpoint.py +681 -30
- tableauserverclient/server/endpoint/resource_tagger.py +14 -13
- tableauserverclient/server/endpoint/schedules_endpoint.py +17 -18
- tableauserverclient/server/endpoint/server_info_endpoint.py +40 -5
- tableauserverclient/server/endpoint/sites_endpoint.py +282 -17
- tableauserverclient/server/endpoint/subscriptions_endpoint.py +10 -10
- tableauserverclient/server/endpoint/tables_endpoint.py +15 -14
- tableauserverclient/server/endpoint/tasks_endpoint.py +86 -8
- tableauserverclient/server/endpoint/users_endpoint.py +366 -19
- tableauserverclient/server/endpoint/views_endpoint.py +262 -20
- tableauserverclient/server/endpoint/virtual_connections_endpoint.py +6 -5
- tableauserverclient/server/endpoint/webhooks_endpoint.py +88 -11
- tableauserverclient/server/endpoint/workbooks_endpoint.py +653 -65
- tableauserverclient/server/filter.py +2 -2
- tableauserverclient/server/pager.py +29 -6
- tableauserverclient/server/query.py +68 -19
- tableauserverclient/server/request_factory.py +57 -37
- tableauserverclient/server/request_options.py +243 -141
- tableauserverclient/server/server.py +76 -10
- tableauserverclient/server/sort.py +16 -2
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.35.dist-info}/METADATA +7 -7
- tableauserverclient-0.35.dist-info/RECORD +106 -0
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.35.dist-info}/WHEEL +1 -1
- tableauserverclient-0.33.dist-info/RECORD +0 -106
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.35.dist-info}/LICENSE +0 -0
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.35.dist-info}/LICENSE.versioneer +0 -0
- {tableauserverclient-0.33.dist-info → tableauserverclient-0.35.dist-info}/top_level.txt +0 -0
|
@@ -7,7 +7,7 @@ from tableauserverclient.models import SubscriptionItem, PaginationItem
|
|
|
7
7
|
|
|
8
8
|
from tableauserverclient.helpers.logging import logger
|
|
9
9
|
|
|
10
|
-
from typing import
|
|
10
|
+
from typing import Optional, TYPE_CHECKING
|
|
11
11
|
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from ..request_options import RequestOptions
|
|
@@ -16,10 +16,10 @@ if TYPE_CHECKING:
|
|
|
16
16
|
class Subscriptions(Endpoint):
|
|
17
17
|
@property
|
|
18
18
|
def baseurl(self) -> str:
|
|
19
|
-
return "{
|
|
19
|
+
return f"{self.parent_srv.baseurl}/sites/{self.parent_srv.site_id}/subscriptions"
|
|
20
20
|
|
|
21
21
|
@api(version="2.3")
|
|
22
|
-
def get(self, req_options: Optional["RequestOptions"] = None) ->
|
|
22
|
+
def get(self, req_options: Optional["RequestOptions"] = None) -> tuple[list[SubscriptionItem], PaginationItem]:
|
|
23
23
|
logger.info("Querying all subscriptions for the site")
|
|
24
24
|
url = self.baseurl
|
|
25
25
|
server_response = self.get_request(url, req_options)
|
|
@@ -33,8 +33,8 @@ class Subscriptions(Endpoint):
|
|
|
33
33
|
if not subscription_id:
|
|
34
34
|
error = "No Subscription ID provided"
|
|
35
35
|
raise ValueError(error)
|
|
36
|
-
logger.info("Querying a single subscription by id ({})"
|
|
37
|
-
url = "{}/{}"
|
|
36
|
+
logger.info(f"Querying a single subscription by id ({subscription_id})")
|
|
37
|
+
url = f"{self.baseurl}/{subscription_id}"
|
|
38
38
|
server_response = self.get_request(url)
|
|
39
39
|
return SubscriptionItem.from_response(server_response.content, self.parent_srv.namespace)[0]
|
|
40
40
|
|
|
@@ -43,7 +43,7 @@ class Subscriptions(Endpoint):
|
|
|
43
43
|
if not subscription_item:
|
|
44
44
|
error = "No Susbcription provided"
|
|
45
45
|
raise ValueError(error)
|
|
46
|
-
logger.info("Creating a subscription ({})"
|
|
46
|
+
logger.info(f"Creating a subscription ({subscription_item})")
|
|
47
47
|
url = self.baseurl
|
|
48
48
|
create_req = RequestFactory.Subscription.create_req(subscription_item)
|
|
49
49
|
server_response = self.post_request(url, create_req)
|
|
@@ -54,17 +54,17 @@ class Subscriptions(Endpoint):
|
|
|
54
54
|
if not subscription_id:
|
|
55
55
|
error = "Subscription ID undefined."
|
|
56
56
|
raise ValueError(error)
|
|
57
|
-
url = "{
|
|
57
|
+
url = f"{self.baseurl}/{subscription_id}"
|
|
58
58
|
self.delete_request(url)
|
|
59
|
-
logger.info("Deleted subscription (ID: {
|
|
59
|
+
logger.info(f"Deleted subscription (ID: {subscription_id})")
|
|
60
60
|
|
|
61
61
|
@api(version="2.3")
|
|
62
62
|
def update(self, subscription_item: SubscriptionItem) -> SubscriptionItem:
|
|
63
63
|
if not subscription_item.id:
|
|
64
64
|
error = "Subscription item missing ID. Subscription must be retrieved from server first."
|
|
65
65
|
raise MissingRequiredFieldError(error)
|
|
66
|
-
url = "{
|
|
66
|
+
url = f"{self.baseurl}/{subscription_item.id}"
|
|
67
67
|
update_req = RequestFactory.Subscription.update_req(subscription_item)
|
|
68
68
|
server_response = self.put_request(url, update_req)
|
|
69
|
-
logger.info("Updated subscription item (ID: {
|
|
69
|
+
logger.info(f"Updated subscription item (ID: {subscription_item.id})")
|
|
70
70
|
return SubscriptionItem.from_response(server_response.content, self.parent_srv.namespace)[0]
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Union
|
|
3
|
+
from collections.abc import Iterable
|
|
3
4
|
|
|
4
5
|
from tableauserverclient.server.endpoint.dqw_endpoint import _DataQualityWarningEndpoint
|
|
5
6
|
from tableauserverclient.server.endpoint.endpoint import api, Endpoint
|
|
@@ -15,14 +16,14 @@ from tableauserverclient.helpers.logging import logger
|
|
|
15
16
|
|
|
16
17
|
class Tables(Endpoint, TaggingMixin[TableItem]):
|
|
17
18
|
def __init__(self, parent_srv):
|
|
18
|
-
super(
|
|
19
|
+
super().__init__(parent_srv)
|
|
19
20
|
|
|
20
21
|
self._permissions = _PermissionsEndpoint(parent_srv, lambda: self.baseurl)
|
|
21
22
|
self._data_quality_warnings = _DataQualityWarningEndpoint(self.parent_srv, "table")
|
|
22
23
|
|
|
23
24
|
@property
|
|
24
25
|
def baseurl(self):
|
|
25
|
-
return "{
|
|
26
|
+
return f"{self.parent_srv.baseurl}/sites/{self.parent_srv.site_id}/tables"
|
|
26
27
|
|
|
27
28
|
@api(version="3.5")
|
|
28
29
|
def get(self, req_options=None):
|
|
@@ -39,8 +40,8 @@ class Tables(Endpoint, TaggingMixin[TableItem]):
|
|
|
39
40
|
if not table_id:
|
|
40
41
|
error = "table ID undefined."
|
|
41
42
|
raise ValueError(error)
|
|
42
|
-
logger.info("Querying single table (ID: {
|
|
43
|
-
url = "{
|
|
43
|
+
logger.info(f"Querying single table (ID: {table_id})")
|
|
44
|
+
url = f"{self.baseurl}/{table_id}"
|
|
44
45
|
server_response = self.get_request(url)
|
|
45
46
|
return TableItem.from_response(server_response.content, self.parent_srv.namespace)[0]
|
|
46
47
|
|
|
@@ -49,9 +50,9 @@ class Tables(Endpoint, TaggingMixin[TableItem]):
|
|
|
49
50
|
if not table_id:
|
|
50
51
|
error = "Database ID undefined."
|
|
51
52
|
raise ValueError(error)
|
|
52
|
-
url = "{
|
|
53
|
+
url = f"{self.baseurl}/{table_id}"
|
|
53
54
|
self.delete_request(url)
|
|
54
|
-
logger.info("Deleted single table (ID: {
|
|
55
|
+
logger.info(f"Deleted single table (ID: {table_id})")
|
|
55
56
|
|
|
56
57
|
@api(version="3.5")
|
|
57
58
|
def update(self, table_item):
|
|
@@ -59,10 +60,10 @@ class Tables(Endpoint, TaggingMixin[TableItem]):
|
|
|
59
60
|
error = "table item missing ID."
|
|
60
61
|
raise MissingRequiredFieldError(error)
|
|
61
62
|
|
|
62
|
-
url = "{
|
|
63
|
+
url = f"{self.baseurl}/{table_item.id}"
|
|
63
64
|
update_req = RequestFactory.Table.update_req(table_item)
|
|
64
65
|
server_response = self.put_request(url, update_req)
|
|
65
|
-
logger.info("Updated table item (ID: {
|
|
66
|
+
logger.info(f"Updated table item (ID: {table_item.id})")
|
|
66
67
|
updated_table = TableItem.from_response(server_response.content, self.parent_srv.namespace)[0]
|
|
67
68
|
return updated_table
|
|
68
69
|
|
|
@@ -80,10 +81,10 @@ class Tables(Endpoint, TaggingMixin[TableItem]):
|
|
|
80
81
|
)
|
|
81
82
|
|
|
82
83
|
table_item._set_columns(column_fetcher)
|
|
83
|
-
logger.info("Populated columns for table (ID: {
|
|
84
|
+
logger.info(f"Populated columns for table (ID: {table_item.id}")
|
|
84
85
|
|
|
85
86
|
def _get_columns_for_table(self, table_item, req_options=None):
|
|
86
|
-
url = "{
|
|
87
|
+
url = f"{self.baseurl}/{table_item.id}/columns"
|
|
87
88
|
server_response = self.get_request(url, req_options)
|
|
88
89
|
columns = ColumnItem.from_response(server_response.content, self.parent_srv.namespace)
|
|
89
90
|
pagination_item = PaginationItem.from_response(server_response.content, self.parent_srv.namespace)
|
|
@@ -91,12 +92,12 @@ class Tables(Endpoint, TaggingMixin[TableItem]):
|
|
|
91
92
|
|
|
92
93
|
@api(version="3.5")
|
|
93
94
|
def update_column(self, table_item, column_item):
|
|
94
|
-
url = "{
|
|
95
|
+
url = f"{self.baseurl}/{table_item.id}/columns/{column_item.id}"
|
|
95
96
|
update_req = RequestFactory.Column.update_req(column_item)
|
|
96
97
|
server_response = self.put_request(url, update_req)
|
|
97
98
|
column = ColumnItem.from_response(server_response.content, self.parent_srv.namespace)[0]
|
|
98
99
|
|
|
99
|
-
logger.info("Updated table item (ID: {
|
|
100
|
+
logger.info(f"Updated table item (ID: {table_item.id} & column item {column_item.id}")
|
|
100
101
|
return column
|
|
101
102
|
|
|
102
103
|
@api(version="3.5")
|
|
@@ -128,7 +129,7 @@ class Tables(Endpoint, TaggingMixin[TableItem]):
|
|
|
128
129
|
self._data_quality_warnings.clear(item)
|
|
129
130
|
|
|
130
131
|
@api(version="3.9")
|
|
131
|
-
def add_tags(self, item: Union[TableItem, str], tags: Union[Iterable[str], str]) ->
|
|
132
|
+
def add_tags(self, item: Union[TableItem, str], tags: Union[Iterable[str], str]) -> set[str]:
|
|
132
133
|
return super().add_tags(item, tags)
|
|
133
134
|
|
|
134
135
|
@api(version="3.9")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import logging
|
|
2
|
-
from typing import
|
|
2
|
+
from typing import Optional, TYPE_CHECKING
|
|
3
3
|
|
|
4
4
|
from tableauserverclient.server.endpoint.endpoint import Endpoint, api
|
|
5
5
|
from tableauserverclient.server.endpoint.exceptions import MissingRequiredFieldError
|
|
@@ -15,7 +15,7 @@ if TYPE_CHECKING:
|
|
|
15
15
|
class Tasks(Endpoint):
|
|
16
16
|
@property
|
|
17
17
|
def baseurl(self) -> str:
|
|
18
|
-
return "{
|
|
18
|
+
return f"{self.parent_srv.baseurl}/sites/{self.parent_srv.site_id}/tasks"
|
|
19
19
|
|
|
20
20
|
def __normalize_task_type(self, task_type: str) -> str:
|
|
21
21
|
"""
|
|
@@ -23,20 +23,38 @@ class Tasks(Endpoint):
|
|
|
23
23
|
It is different than the tag "extractRefresh" used in the request body.
|
|
24
24
|
"""
|
|
25
25
|
if task_type == TaskItem.Type.ExtractRefresh:
|
|
26
|
-
return "{}es"
|
|
26
|
+
return f"{task_type}es"
|
|
27
27
|
else:
|
|
28
28
|
return task_type
|
|
29
29
|
|
|
30
30
|
@api(version="2.6")
|
|
31
31
|
def get(
|
|
32
32
|
self, req_options: Optional["RequestOptions"] = None, task_type: str = TaskItem.Type.ExtractRefresh
|
|
33
|
-
) ->
|
|
33
|
+
) -> tuple[list[TaskItem], PaginationItem]:
|
|
34
|
+
"""
|
|
35
|
+
Returns information about tasks on the specified site.
|
|
36
|
+
|
|
37
|
+
REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_jobs_tasks_and_schedules.htm#list_extract_refresh_tasks
|
|
38
|
+
|
|
39
|
+
Parameters
|
|
40
|
+
----------
|
|
41
|
+
req_options : RequestOptions, optional
|
|
42
|
+
Options for the request, such as filtering, sorting, and pagination.
|
|
43
|
+
|
|
44
|
+
task_type : str, optional
|
|
45
|
+
The type of task to query. See TaskItem.Type for possible values.
|
|
46
|
+
|
|
47
|
+
Returns
|
|
48
|
+
-------
|
|
49
|
+
tuple[list[TaskItem], PaginationItem]
|
|
50
|
+
|
|
51
|
+
"""
|
|
34
52
|
if task_type == TaskItem.Type.DataAcceleration:
|
|
35
53
|
self.parent_srv.assert_at_least_version("3.8", "Data Acceleration Tasks")
|
|
36
54
|
|
|
37
55
|
logger.info("Querying all %s tasks for the site", task_type)
|
|
38
56
|
|
|
39
|
-
url = "{
|
|
57
|
+
url = f"{self.baseurl}/{self.__normalize_task_type(task_type)}"
|
|
40
58
|
server_response = self.get_request(url, req_options)
|
|
41
59
|
|
|
42
60
|
pagination_item = PaginationItem.from_response(server_response.content, self.parent_srv.namespace)
|
|
@@ -45,6 +63,20 @@ class Tasks(Endpoint):
|
|
|
45
63
|
|
|
46
64
|
@api(version="2.6")
|
|
47
65
|
def get_by_id(self, task_id: str) -> TaskItem:
|
|
66
|
+
"""
|
|
67
|
+
Returns information about the specified task.
|
|
68
|
+
|
|
69
|
+
REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_jobs_tasks_and_schedules.htm#get_extract_refresh_task
|
|
70
|
+
|
|
71
|
+
Parameters
|
|
72
|
+
----------
|
|
73
|
+
task_id : str
|
|
74
|
+
The ID of the task to query.
|
|
75
|
+
|
|
76
|
+
Returns
|
|
77
|
+
-------
|
|
78
|
+
TaskItem
|
|
79
|
+
"""
|
|
48
80
|
if not task_id:
|
|
49
81
|
error = "No Task ID provided"
|
|
50
82
|
raise ValueError(error)
|
|
@@ -59,22 +91,51 @@ class Tasks(Endpoint):
|
|
|
59
91
|
|
|
60
92
|
@api(version="3.19")
|
|
61
93
|
def create(self, extract_item: TaskItem) -> TaskItem:
|
|
94
|
+
"""
|
|
95
|
+
Creates a custom schedule for an extract refresh on Tableau Cloud. For
|
|
96
|
+
Tableau Server, use the Schedules endpoint to create a schedule.
|
|
97
|
+
|
|
98
|
+
REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#create_cloud_extract_refresh_task
|
|
99
|
+
|
|
100
|
+
Parameters
|
|
101
|
+
----------
|
|
102
|
+
extract_item : TaskItem
|
|
103
|
+
The extract refresh task to create.
|
|
104
|
+
|
|
105
|
+
Returns
|
|
106
|
+
-------
|
|
107
|
+
TaskItem
|
|
108
|
+
"""
|
|
62
109
|
if not extract_item:
|
|
63
110
|
error = "No extract refresh provided"
|
|
64
111
|
raise ValueError(error)
|
|
65
112
|
logger.info("Creating an extract refresh %s", extract_item)
|
|
66
|
-
url = "{
|
|
113
|
+
url = f"{self.baseurl}/{self.__normalize_task_type(TaskItem.Type.ExtractRefresh)}"
|
|
67
114
|
create_req = RequestFactory.Task.create_extract_req(extract_item)
|
|
68
115
|
server_response = self.post_request(url, create_req)
|
|
69
116
|
return server_response.content
|
|
70
117
|
|
|
71
118
|
@api(version="2.6")
|
|
72
119
|
def run(self, task_item: TaskItem) -> bytes:
|
|
120
|
+
"""
|
|
121
|
+
Runs the specified extract refresh task.
|
|
122
|
+
|
|
123
|
+
REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref_jobs_tasks_and_schedules.htm#run_extract_refresh_task
|
|
124
|
+
|
|
125
|
+
Parameters
|
|
126
|
+
----------
|
|
127
|
+
task_item : TaskItem
|
|
128
|
+
The task to run.
|
|
129
|
+
|
|
130
|
+
Returns
|
|
131
|
+
-------
|
|
132
|
+
bytes
|
|
133
|
+
"""
|
|
73
134
|
if not task_item.id:
|
|
74
135
|
error = "Task item missing ID."
|
|
75
136
|
raise MissingRequiredFieldError(error)
|
|
76
137
|
|
|
77
|
-
url = "{
|
|
138
|
+
url = "{}/{}/{}/runNow".format(
|
|
78
139
|
self.baseurl,
|
|
79
140
|
self.__normalize_task_type(TaskItem.Type.ExtractRefresh),
|
|
80
141
|
task_item.id,
|
|
@@ -86,12 +147,29 @@ class Tasks(Endpoint):
|
|
|
86
147
|
# Delete 1 task by id
|
|
87
148
|
@api(version="3.6")
|
|
88
149
|
def delete(self, task_id: str, task_type: str = TaskItem.Type.ExtractRefresh) -> None:
|
|
150
|
+
"""
|
|
151
|
+
Deletes the specified extract refresh task on Tableau Server or Tableau Cloud.
|
|
152
|
+
|
|
153
|
+
REST API: https://help.tableau.com/current/api/rest_api/en-us/REST/rest_api_ref.htm#delete_extract_refresh_task
|
|
154
|
+
|
|
155
|
+
Parameters
|
|
156
|
+
----------
|
|
157
|
+
task_id : str
|
|
158
|
+
The ID of the task to delete.
|
|
159
|
+
|
|
160
|
+
task_type : str, default TaskItem.Type.ExtractRefresh
|
|
161
|
+
The type of task to query. See TaskItem.Type for possible values.
|
|
162
|
+
|
|
163
|
+
Returns
|
|
164
|
+
-------
|
|
165
|
+
None
|
|
166
|
+
"""
|
|
89
167
|
if task_type == TaskItem.Type.DataAcceleration:
|
|
90
168
|
self.parent_srv.assert_at_least_version("3.8", "Data Acceleration Tasks")
|
|
91
169
|
|
|
92
170
|
if not task_id:
|
|
93
171
|
error = "No Task ID provided"
|
|
94
172
|
raise ValueError(error)
|
|
95
|
-
url = "{
|
|
173
|
+
url = f"{self.baseurl}/{self.__normalize_task_type(task_type)}/{task_id}"
|
|
96
174
|
self.delete_request(url)
|
|
97
175
|
logger.info("Deleted single task (ID: %s)", task_id)
|