@@ -32,6 +32,124 @@ def __init__(self, api_client=None):
32
32
api_client = ApiClient ()
33
33
self .api_client = api_client
34
34
35
+ def delete_post (self , delete_predicate_request , ** kwargs ): # noqa: E501
36
+ """delete Time series data from InfluxDB # noqa: E501
37
+
38
+ This method makes a synchronous HTTP request by default. To make an
39
+ asynchronous HTTP request, please pass async_req=True
40
+ >>> thread = api.delete_post(delete_predicate_request, async_req=True)
41
+ >>> result = thread.get()
42
+
43
+ :param async_req bool
44
+ :param DeletePredicateRequest delete_predicate_request: predicate delete request (required)
45
+ :param str zap_trace_span: OpenTracing span context
46
+ :param str org: specifies the destination organization for writes
47
+ :param str bucket: specifies the destination bucket for writes
48
+ :param str org_id: specifies the organization ID of the resource
49
+ :param str bucket_id: specifies the destination bucket ID for writes
50
+ :return: None
51
+ If the method is called asynchronously,
52
+ returns the request thread.
53
+ """
54
+ kwargs ['_return_http_data_only' ] = True
55
+ if kwargs .get ('async_req' ):
56
+ return self .delete_post_with_http_info (delete_predicate_request , ** kwargs ) # noqa: E501
57
+ else :
58
+ (data ) = self .delete_post_with_http_info (delete_predicate_request , ** kwargs ) # noqa: E501
59
+ return data
60
+
61
+ def delete_post_with_http_info (self , delete_predicate_request , ** kwargs ): # noqa: E501
62
+ """delete Time series data from InfluxDB # noqa: E501
63
+
64
+ This method makes a synchronous HTTP request by default. To make an
65
+ asynchronous HTTP request, please pass async_req=True
66
+ >>> thread = api.delete_post_with_http_info(delete_predicate_request, async_req=True)
67
+ >>> result = thread.get()
68
+
69
+ :param async_req bool
70
+ :param DeletePredicateRequest delete_predicate_request: predicate delete request (required)
71
+ :param str zap_trace_span: OpenTracing span context
72
+ :param str org: specifies the destination organization for writes
73
+ :param str bucket: specifies the destination bucket for writes
74
+ :param str org_id: specifies the organization ID of the resource
75
+ :param str bucket_id: specifies the destination bucket ID for writes
76
+ :return: None
77
+ If the method is called asynchronously,
78
+ returns the request thread.
79
+ """
80
+
81
+ local_var_params = locals ()
82
+
83
+ all_params = ['delete_predicate_request' , 'zap_trace_span' , 'org' , 'bucket' , 'org_id' , 'bucket_id' ] # noqa: E501
84
+ all_params .append ('async_req' )
85
+ all_params .append ('_return_http_data_only' )
86
+ all_params .append ('_preload_content' )
87
+ all_params .append ('_request_timeout' )
88
+
89
+ for key , val in six .iteritems (local_var_params ['kwargs' ]):
90
+ if key not in all_params :
91
+ raise TypeError (
92
+ "Got an unexpected keyword argument '%s'"
93
+ " to method delete_post" % key
94
+ )
95
+ local_var_params [key ] = val
96
+ del local_var_params ['kwargs' ]
97
+ # verify the required parameter 'delete_predicate_request' is set
98
+ if ('delete_predicate_request' not in local_var_params or
99
+ local_var_params ['delete_predicate_request' ] is None ):
100
+ raise ValueError ("Missing the required parameter `delete_predicate_request` when calling `delete_post`" ) # noqa: E501
101
+
102
+ collection_formats = {}
103
+
104
+ path_params = {}
105
+
106
+ query_params = []
107
+ if 'org' in local_var_params :
108
+ query_params .append (('org' , local_var_params ['org' ])) # noqa: E501
109
+ if 'bucket' in local_var_params :
110
+ query_params .append (('bucket' , local_var_params ['bucket' ])) # noqa: E501
111
+ if 'org_id' in local_var_params :
112
+ query_params .append (('orgID' , local_var_params ['org_id' ])) # noqa: E501
113
+ if 'bucket_id' in local_var_params :
114
+ query_params .append (('bucketID' , local_var_params ['bucket_id' ])) # noqa: E501
115
+
116
+ header_params = {}
117
+ if 'zap_trace_span' in local_var_params :
118
+ header_params ['Zap-Trace-Span' ] = local_var_params ['zap_trace_span' ] # noqa: E501
119
+
120
+ form_params = []
121
+ local_var_files = {}
122
+
123
+ body_params = None
124
+ if 'delete_predicate_request' in local_var_params :
125
+ body_params = local_var_params ['delete_predicate_request' ]
126
+ # HTTP header `Accept`
127
+ header_params ['Accept' ] = self .api_client .select_header_accept (
128
+ ['application/json' ]) # noqa: E501
129
+
130
+ # HTTP header `Content-Type`
131
+ header_params ['Content-Type' ] = self .api_client .select_header_content_type ( # noqa: E501
132
+ ['application/json' ]) # noqa: E501
133
+
134
+ # Authentication setting
135
+ auth_settings = [] # noqa: E501
136
+
137
+ return self .api_client .call_api (
138
+ '/api/v2/delete' , 'POST' ,
139
+ path_params ,
140
+ query_params ,
141
+ header_params ,
142
+ body = body_params ,
143
+ post_params = form_params ,
144
+ files = local_var_files ,
145
+ response_type = None , # noqa: E501
146
+ auth_settings = auth_settings ,
147
+ async_req = local_var_params .get ('async_req' ),
148
+ _return_http_data_only = local_var_params .get ('_return_http_data_only' ), # noqa: E501
149
+ _preload_content = local_var_params .get ('_preload_content' , True ),
150
+ _request_timeout = local_var_params .get ('_request_timeout' ),
151
+ collection_formats = collection_formats )
152
+
35
153
def get_routes (self , ** kwargs ): # noqa: E501
36
154
"""Map of all top level routes available # noqa: E501
37
155
0 commit comments