xautomata-hive 3.0.3__py3-none-any.whl → 3.2.0__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.
- hive/api.py +124 -43
- hive/cookbook/acl_docs.py +1 -1
- hive/cookbook/acl_overrides.py +22 -1
- hive/cookbook/analytics.py +11 -1
- hive/cookbook/anomalies.py +30 -1
- hive/cookbook/calendars.py +95 -1
- hive/cookbook/contacts.py +114 -1
- hive/cookbook/customers.py +293 -7
- hive/cookbook/dashboards.py +82 -1
- hive/cookbook/dispatchers.py +117 -1
- hive/cookbook/downtimes.py +100 -1
- hive/cookbook/external_tickets.py +117 -1
- hive/cookbook/firmware_updates.py +20 -1
- hive/cookbook/groups.py +88 -1
- hive/cookbook/last_status.py +48 -2
- hive/cookbook/login.py +163 -1
- hive/cookbook/messages.py +35 -1
- hive/cookbook/metric_ingest.py +1 -1
- hive/cookbook/metric_types.py +71 -1
- hive/cookbook/metrics.py +77 -1
- hive/cookbook/notification_provider_types.py +32 -1
- hive/cookbook/notification_providers.py +28 -1
- hive/cookbook/objects.py +95 -1
- hive/cookbook/opening_reasons.py +33 -1
- hive/cookbook/probe_types.py +31 -1
- hive/cookbook/probes.py +70 -1
- hive/cookbook/probes_log_ingest.py +5 -1
- hive/cookbook/profile_topics.py +24 -1
- hive/cookbook/reason_for_closure.py +36 -6
- hive/cookbook/retention_rules.py +30 -1
- hive/cookbook/schedules.py +20 -1
- hive/cookbook/services.py +114 -2
- hive/cookbook/sites.py +93 -1
- hive/cookbook/tree_hierarchy.py +89 -1
- hive/cookbook/ts_cost_azure_raw.py +154 -1
- hive/cookbook/ts_cost_management.py +136 -114
- hive/cookbook/ts_metric_status.py +20 -1
- hive/cookbook/ts_metric_value.py +19 -1
- hive/cookbook/ts_ntop_flows.py +25 -1
- hive/cookbook/ts_service_status.py +48 -2
- hive/cookbook/ts_service_value.py +43 -1
- hive/cookbook/users.py +174 -3
- hive/cookbook/users_notifications.py +109 -0
- hive/cookbook/virtual_domains.py +47 -1
- hive/cookbook/webhooks.py +21 -1
- hive/cookbook/widget_groups.py +39 -1
- hive/cookbook/widgets.py +60 -1
- hive/version.py +1 -1
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/METADATA +1 -1
- xautomata_hive-3.2.0.dist-info/RECORD +58 -0
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/WHEEL +1 -1
- xautomata_hive-3.0.3.dist-info/RECORD +0 -57
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/LICENSE +0 -0
- {xautomata_hive-3.0.3.dist-info → xautomata_hive-3.2.0.dist-info}/top_level.txt +0 -0
hive/cookbook/groups.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Groups(ApiManager):
|
@@ -32,6 +32,18 @@ class Groups(ApiManager):
|
|
32
32
|
Returns: list"""
|
33
33
|
if kwargs is None:
|
34
34
|
kwargs = dict()
|
35
|
+
official_params_list = ['sort_by', 'null_fields', 'uuid_parent',
|
36
|
+
'uuid_site', 'uuid_virtual_domain', 'type', 'name',
|
37
|
+
'description', 'status', 'extract_severity', 'skip', 'limit',
|
38
|
+
'like', 'join', 'count']
|
39
|
+
params.get('sort_by'), params.get('null_fields'), params.get(
|
40
|
+
'uuid_parent'), params.get('uuid_site'), params.get(
|
41
|
+
'uuid_virtual_domain'), params.get('type'), params.get('name'
|
42
|
+
), params.get('description'), params.get('status'), params.get(
|
43
|
+
'extract_severity'), params.get('skip'), params.get('limit'
|
44
|
+
), params.get('like'), params.get('join'), params.get('count')
|
45
|
+
warning_wrong_parameters(self.groups.__name__, params,
|
46
|
+
official_params_list)
|
35
47
|
response = self.execute('GET', path=f'/groups/', single_page=
|
36
48
|
single_page, page_size=page_size, warm_start=warm_start, params
|
37
49
|
=params, **kwargs)
|
@@ -54,6 +66,15 @@ class Groups(ApiManager):
|
|
54
66
|
Returns: list"""
|
55
67
|
if kwargs is None:
|
56
68
|
kwargs = dict()
|
69
|
+
official_payload_list = ['uuid_parent', 'uuid_site',
|
70
|
+
'uuid_virtual_domain', 'type', 'name', 'description',
|
71
|
+
'automata_domain', 'status']
|
72
|
+
payload.get('uuid_parent'), payload.get('uuid_site'), payload.get(
|
73
|
+
'uuid_virtual_domain'), payload.get('type'), payload.get('name'
|
74
|
+
), payload.get('description'), payload.get('automata_domain'
|
75
|
+
), payload.get('status')
|
76
|
+
warning_wrong_parameters(self.groups_create.__name__, payload,
|
77
|
+
official_payload_list)
|
57
78
|
response = self.execute('POST', path=f'/groups/', payload=payload,
|
58
79
|
**kwargs)
|
59
80
|
return response
|
@@ -73,6 +94,10 @@ class Groups(ApiManager):
|
|
73
94
|
kwargs = dict()
|
74
95
|
kwargs, params = handling_single_page_methods(kwargs=kwargs, params
|
75
96
|
=params)
|
97
|
+
official_params_list = ['join']
|
98
|
+
params.get('join')
|
99
|
+
warning_wrong_parameters(self.group.__name__, params,
|
100
|
+
official_params_list)
|
76
101
|
response = self.execute('GET', path=f'/groups/{uuid}', warm_start=
|
77
102
|
warm_start, params=params, **kwargs)
|
78
103
|
return response
|
@@ -95,6 +120,15 @@ class Groups(ApiManager):
|
|
95
120
|
Returns: list"""
|
96
121
|
if kwargs is None:
|
97
122
|
kwargs = dict()
|
123
|
+
official_payload_list = ['uuid_parent', 'uuid_site',
|
124
|
+
'uuid_virtual_domain', 'type', 'name', 'description',
|
125
|
+
'automata_domain', 'status']
|
126
|
+
payload.get('uuid_parent'), payload.get('uuid_site'), payload.get(
|
127
|
+
'uuid_virtual_domain'), payload.get('type'), payload.get('name'
|
128
|
+
), payload.get('description'), payload.get('automata_domain'
|
129
|
+
), payload.get('status')
|
130
|
+
warning_wrong_parameters(self.groups_put.__name__, payload,
|
131
|
+
official_payload_list)
|
98
132
|
response = self.execute('PUT', path=f'/groups/{uuid}', payload=
|
99
133
|
payload, **kwargs)
|
100
134
|
return response
|
@@ -124,6 +158,7 @@ class Groups(ApiManager):
|
|
124
158
|
Keyword Args:
|
125
159
|
sort_by (string optional): Stringa separata da virgole di campi su cui ordinare. Si indica uno o piu campi della risposta e si puo chiedere di ottenere i valori di quei campi in ordine ascendente o discendente. Esempio "Customer:Desc". Default to "". - parameter
|
126
160
|
not_in (boolean optional): additional filter - parameter
|
161
|
+
name (string optional): additional filter - parameter
|
127
162
|
profile (string optional): additional filter - parameter
|
128
163
|
extract_severity (boolean optional): Se True nella risposta e' anche presente la severita, Default to False. - parameter
|
129
164
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
@@ -134,6 +169,14 @@ class Groups(ApiManager):
|
|
134
169
|
Returns: list"""
|
135
170
|
if kwargs is None:
|
136
171
|
kwargs = dict()
|
172
|
+
official_params_list = ['sort_by', 'not_in', 'name', 'profile',
|
173
|
+
'extract_severity', 'skip', 'limit', 'like', 'join', 'count']
|
174
|
+
params.get('sort_by'), params.get('not_in'), params.get('name'
|
175
|
+
), params.get('profile'), params.get('extract_severity'
|
176
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
177
|
+
), params.get('join'), params.get('count')
|
178
|
+
warning_wrong_parameters(self.groups_objects.__name__, params,
|
179
|
+
official_params_list)
|
137
180
|
response = self.execute('GET', path=f'/groups/{uuid}/objects',
|
138
181
|
single_page=single_page, page_size=page_size, warm_start=
|
139
182
|
warm_start, params=params, **kwargs)
|
@@ -180,6 +223,7 @@ class Groups(ApiManager):
|
|
180
223
|
**params: additional parameters for the API.
|
181
224
|
Keyword Args:
|
182
225
|
not_in (boolean optional): additional filter - parameter
|
226
|
+
name (string optional): additional filter - parameter
|
183
227
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
184
228
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
185
229
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -188,6 +232,13 @@ class Groups(ApiManager):
|
|
188
232
|
Returns: list"""
|
189
233
|
if kwargs is None:
|
190
234
|
kwargs = dict()
|
235
|
+
official_params_list = ['not_in', 'name', 'skip', 'limit', 'like',
|
236
|
+
'join', 'count']
|
237
|
+
params.get('not_in'), params.get('name'), params.get('skip'
|
238
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
239
|
+
), params.get('count')
|
240
|
+
warning_wrong_parameters(self.groups_users.__name__, params,
|
241
|
+
official_params_list)
|
191
242
|
response = self.execute('GET', path=f'/groups/{uuid}/users',
|
192
243
|
single_page=single_page, page_size=page_size, warm_start=
|
193
244
|
warm_start, params=params, **kwargs)
|
@@ -234,6 +285,7 @@ class Groups(ApiManager):
|
|
234
285
|
**params: additional parameters for the API.
|
235
286
|
Keyword Args:
|
236
287
|
not_in (boolean optional): additional filter - parameter
|
288
|
+
code (string optional): additional filter - parameter
|
237
289
|
active_at_timestamp (string optional): additional filter - parameter
|
238
290
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
239
291
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -243,6 +295,13 @@ class Groups(ApiManager):
|
|
243
295
|
Returns: list"""
|
244
296
|
if kwargs is None:
|
245
297
|
kwargs = dict()
|
298
|
+
official_params_list = ['not_in', 'code', 'active_at_timestamp',
|
299
|
+
'skip', 'limit', 'like', 'join', 'count']
|
300
|
+
params.get('not_in'), params.get('code'), params.get(
|
301
|
+
'active_at_timestamp'), params.get('skip'), params.get('limit'
|
302
|
+
), params.get('like'), params.get('join'), params.get('count')
|
303
|
+
warning_wrong_parameters(self.groups_downtimes.__name__, params,
|
304
|
+
official_params_list)
|
246
305
|
response = self.execute('GET', path=f'/groups/{uuid}/downtimes',
|
247
306
|
single_page=single_page, page_size=page_size, warm_start=
|
248
307
|
warm_start, params=params, **kwargs)
|
@@ -289,6 +348,7 @@ class Groups(ApiManager):
|
|
289
348
|
**params: additional parameters for the API.
|
290
349
|
Keyword Args:
|
291
350
|
not_in (boolean optional): additional filter - parameter
|
351
|
+
code (string optional): additional filter - parameter
|
292
352
|
active_at_timestamp (string optional): additional filter - parameter
|
293
353
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
294
354
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
@@ -298,6 +358,13 @@ class Groups(ApiManager):
|
|
298
358
|
Returns: list"""
|
299
359
|
if kwargs is None:
|
300
360
|
kwargs = dict()
|
361
|
+
official_params_list = ['not_in', 'code', 'active_at_timestamp',
|
362
|
+
'skip', 'limit', 'like', 'join', 'count']
|
363
|
+
params.get('not_in'), params.get('code'), params.get(
|
364
|
+
'active_at_timestamp'), params.get('skip'), params.get('limit'
|
365
|
+
), params.get('like'), params.get('join'), params.get('count')
|
366
|
+
warning_wrong_parameters(self.groups_dispatchers.__name__, params,
|
367
|
+
official_params_list)
|
301
368
|
response = self.execute('GET', path=f'/groups/{uuid}/dispatchers',
|
302
369
|
single_page=single_page, page_size=page_size, warm_start=
|
303
370
|
warm_start, params=params, **kwargs)
|
@@ -355,6 +422,10 @@ class Groups(ApiManager):
|
|
355
422
|
Returns: list"""
|
356
423
|
if kwargs is None:
|
357
424
|
kwargs = dict()
|
425
|
+
official_params_list = ['join']
|
426
|
+
params.get('join')
|
427
|
+
warning_wrong_parameters(self.groups_bulk.__name__, params,
|
428
|
+
official_params_list)
|
358
429
|
response = self.execute('POST', path=f'/groups/bulk/read/',
|
359
430
|
single_page=single_page, page_size=page_size, warm_start=
|
360
431
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -420,6 +491,10 @@ class Groups(ApiManager):
|
|
420
491
|
Returns: list"""
|
421
492
|
if kwargs is None:
|
422
493
|
kwargs = dict()
|
494
|
+
official_params_list = ['best_effort']
|
495
|
+
params.get('best_effort')
|
496
|
+
warning_wrong_parameters(self.groups_create_bulk.__name__, params,
|
497
|
+
official_params_list)
|
423
498
|
response = self.execute('POST', path=f'/groups/bulk/create/',
|
424
499
|
single_page=single_page, page_size=page_size, params=params,
|
425
500
|
payload=payload, **kwargs)
|
@@ -473,6 +548,10 @@ class Groups(ApiManager):
|
|
473
548
|
Returns: list"""
|
474
549
|
if kwargs is None:
|
475
550
|
kwargs = dict()
|
551
|
+
official_params_list = ['best_effort']
|
552
|
+
params.get('best_effort')
|
553
|
+
warning_wrong_parameters(self.groups_objects_create_bulk.__name__,
|
554
|
+
params, official_params_list)
|
476
555
|
response = self.execute('POST', path=f'/groups/bulk/create/objects',
|
477
556
|
single_page=single_page, page_size=page_size, params=params,
|
478
557
|
payload=payload, **kwargs)
|
@@ -530,6 +609,10 @@ class Groups(ApiManager):
|
|
530
609
|
Returns: list"""
|
531
610
|
if kwargs is None:
|
532
611
|
kwargs = dict()
|
612
|
+
official_params_list = ['best_effort']
|
613
|
+
params.get('best_effort')
|
614
|
+
warning_wrong_parameters(self.groups_downtimes_create_bulk.__name__,
|
615
|
+
params, official_params_list)
|
533
616
|
response = self.execute('POST', path=
|
534
617
|
f'/groups/bulk/create/downtimes', single_page=single_page,
|
535
618
|
page_size=page_size, params=params, payload=payload, **kwargs)
|
@@ -587,6 +670,10 @@ class Groups(ApiManager):
|
|
587
670
|
Returns: list"""
|
588
671
|
if kwargs is None:
|
589
672
|
kwargs = dict()
|
673
|
+
official_params_list = ['best_effort']
|
674
|
+
params.get('best_effort')
|
675
|
+
warning_wrong_parameters(self.groups_users_create_bulk.__name__,
|
676
|
+
params, official_params_list)
|
590
677
|
response = self.execute('POST', path=f'/groups/bulk/create/users',
|
591
678
|
single_page=single_page, page_size=page_size, params=params,
|
592
679
|
payload=payload, **kwargs)
|
hive/cookbook/last_status.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class LastStatus(ApiManager):
|
@@ -55,7 +55,7 @@ class LastStatus(ApiManager):
|
|
55
55
|
last_value_unit (string optional): additional filter - parameter
|
56
56
|
last_value_description (string optional): additional filter - parameter
|
57
57
|
last_value_status (None optional): additional filter - parameter
|
58
|
-
last_value_ranking (
|
58
|
+
last_value_ranking (integer optional): additional filter - parameter
|
59
59
|
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
60
60
|
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
61
61
|
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
@@ -64,6 +64,45 @@ class LastStatus(ApiManager):
|
|
64
64
|
Returns: list"""
|
65
65
|
if kwargs is None:
|
66
66
|
kwargs = dict()
|
67
|
+
official_params_list = ['extract_valueless_metrics', 'sort_by',
|
68
|
+
'null_fields', 'uuid_customer', 'customer_code',
|
69
|
+
'customer_status', 'uuid_site', 'site_code', 'site_description',
|
70
|
+
'site_address', 'site_zip_code', 'site_city', 'site_country',
|
71
|
+
'site_state_province', 'site_status', 'uuid_group',
|
72
|
+
'group_name', 'group_status', 'group_type', 'uuid_object',
|
73
|
+
'object_name', 'object_status', 'object_profile',
|
74
|
+
'uuid_metric_type', 'metric_type_name', 'metric_type_status',
|
75
|
+
'uuid_metric', 'metric_name', 'metric_status', 'metric_profile',
|
76
|
+
'topic', 'last_value_uuid_probe', 'last_value_timestamp_start',
|
77
|
+
'last_value_timestamp_end', 'last_value_object_type',
|
78
|
+
'last_value_name', 'last_value_value', 'last_value_unit',
|
79
|
+
'last_value_description', 'last_value_status',
|
80
|
+
'last_value_ranking', 'skip', 'limit', 'like', 'join', 'count']
|
81
|
+
params.get('extract_valueless_metrics'), params.get('sort_by'
|
82
|
+
), params.get('null_fields'), params.get('uuid_customer'
|
83
|
+
), params.get('customer_code'), params.get('customer_status'
|
84
|
+
), params.get('uuid_site'), params.get('site_code'), params.get(
|
85
|
+
'site_description'), params.get('site_address'), params.get(
|
86
|
+
'site_zip_code'), params.get('site_city'), params.get(
|
87
|
+
'site_country'), params.get('site_state_province'), params.get(
|
88
|
+
'site_status'), params.get('uuid_group'), params.get('group_name'
|
89
|
+
), params.get('group_status'), params.get('group_type'
|
90
|
+
), params.get('uuid_object'), params.get('object_name'
|
91
|
+
), params.get('object_status'), params.get('object_profile'
|
92
|
+
), params.get('uuid_metric_type'), params.get('metric_type_name'
|
93
|
+
), params.get('metric_type_status'), params.get('uuid_metric'
|
94
|
+
), params.get('metric_name'), params.get('metric_status'
|
95
|
+
), params.get('metric_profile'), params.get('topic'), params.get(
|
96
|
+
'last_value_uuid_probe'), params.get('last_value_timestamp_start'
|
97
|
+
), params.get('last_value_timestamp_end'), params.get(
|
98
|
+
'last_value_object_type'), params.get('last_value_name'
|
99
|
+
), params.get('last_value_value'), params.get('last_value_unit'
|
100
|
+
), params.get('last_value_description'), params.get(
|
101
|
+
'last_value_status'), params.get('last_value_ranking'), params.get(
|
102
|
+
'skip'), params.get('limit'), params.get('like'), params.get('join'
|
103
|
+
), params.get('count')
|
104
|
+
warning_wrong_parameters(self.last_status.__name__, params,
|
105
|
+
official_params_list)
|
67
106
|
response = self.execute('GET', path=f'/last_status/', single_page=
|
68
107
|
single_page, page_size=page_size, warm_start=warm_start, params
|
69
108
|
=params, **kwargs)
|
@@ -135,6 +174,13 @@ class LastStatus(ApiManager):
|
|
135
174
|
Returns: list"""
|
136
175
|
if kwargs is None:
|
137
176
|
kwargs = dict()
|
177
|
+
official_params_list = ['sort_by', 'null_fields', 'skip', 'limit',
|
178
|
+
'like', 'join', 'count']
|
179
|
+
params.get('sort_by'), params.get('null_fields'), params.get('skip'
|
180
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
181
|
+
), params.get('count')
|
182
|
+
warning_wrong_parameters(self.last_status_bulk.__name__, params,
|
183
|
+
official_params_list)
|
138
184
|
response = self.execute('POST', path=f'/last_status/', single_page=
|
139
185
|
single_page, page_size=page_size, warm_start=warm_start, params
|
140
186
|
=params, payload=payload, **kwargs)
|
hive/cookbook/login.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Login(ApiManager):
|
@@ -23,6 +23,13 @@ class Login(ApiManager):
|
|
23
23
|
Returns: list"""
|
24
24
|
if kwargs is None:
|
25
25
|
kwargs = dict()
|
26
|
+
official_payload_list = ['grant_type', 'username', 'password',
|
27
|
+
'scope', 'client_id', 'client_secret']
|
28
|
+
payload.get('grant_type'), payload.get('username'), payload.get(
|
29
|
+
'password'), payload.get('scope'), payload.get('client_id'
|
30
|
+
), payload.get('client_secret')
|
31
|
+
warning_wrong_parameters(self.login_access_token_create.__name__,
|
32
|
+
payload, official_payload_list)
|
26
33
|
response = self.execute('POST', path=f'/login/access-token', params
|
27
34
|
=params, payload=payload, **kwargs)
|
28
35
|
return response
|
@@ -37,6 +44,10 @@ class Login(ApiManager):
|
|
37
44
|
Returns: list"""
|
38
45
|
if kwargs is None:
|
39
46
|
kwargs = dict()
|
47
|
+
official_params_list = ['refresh']
|
48
|
+
params.get('refresh')
|
49
|
+
warning_wrong_parameters(self.login_refresh_create.__name__, params,
|
50
|
+
official_params_list)
|
40
51
|
response = self.execute('POST', path=f'/login/refresh', params=
|
41
52
|
params, **kwargs)
|
42
53
|
return response
|
@@ -52,6 +63,10 @@ class Login(ApiManager):
|
|
52
63
|
Returns: list"""
|
53
64
|
if kwargs is None:
|
54
65
|
kwargs = dict()
|
66
|
+
official_params_list = ['refresh']
|
67
|
+
params.get('refresh')
|
68
|
+
warning_wrong_parameters(self.login_refresh_invalidate_create.
|
69
|
+
__name__, params, official_params_list)
|
55
70
|
response = self.execute('POST', path=f'/login/refresh/invalidate',
|
56
71
|
params=params, **kwargs)
|
57
72
|
return response
|
@@ -67,6 +82,10 @@ class Login(ApiManager):
|
|
67
82
|
Returns: list"""
|
68
83
|
if kwargs is None:
|
69
84
|
kwargs = dict()
|
85
|
+
official_params_list = ['username']
|
86
|
+
params.get('username')
|
87
|
+
warning_wrong_parameters(self.login_refresh_invalidate_user_create.
|
88
|
+
__name__, params, official_params_list)
|
70
89
|
response = self.execute('POST', path=
|
71
90
|
f'/login/refresh/invalidate_user', params=params, **kwargs)
|
72
91
|
return response
|
@@ -103,11 +122,21 @@ class Login(ApiManager):
|
|
103
122
|
**payload: additional parameters for the API.
|
104
123
|
Keyword Args:
|
105
124
|
phone (string optional): additional filter - payload
|
125
|
+
verified_email (boolean optional): additional filter - payload
|
126
|
+
profile (string optional): additional filter - payload
|
106
127
|
password (string optional): additional filter - payload
|
107
128
|
email (string optional): additional filter - payload
|
129
|
+
stage (string optional): additional filter - payload
|
108
130
|
Returns: list"""
|
109
131
|
if kwargs is None:
|
110
132
|
kwargs = dict()
|
133
|
+
official_payload_list = ['phone', 'verified_email', 'profile',
|
134
|
+
'password', 'email', 'stage']
|
135
|
+
payload.get('phone'), payload.get('verified_email'), payload.get(
|
136
|
+
'profile'), payload.get('password'), payload.get('email'
|
137
|
+
), payload.get('stage')
|
138
|
+
warning_wrong_parameters(self.login_current_user_put.__name__,
|
139
|
+
payload, official_payload_list)
|
111
140
|
response = self.execute('PUT', path=f'/login/current_user', payload
|
112
141
|
=payload, **kwargs)
|
113
142
|
return response
|
@@ -136,6 +165,139 @@ class Login(ApiManager):
|
|
136
165
|
Returns: list"""
|
137
166
|
if kwargs is None:
|
138
167
|
kwargs = dict()
|
168
|
+
official_payload_list = ['image']
|
169
|
+
payload.get('image')
|
170
|
+
warning_wrong_parameters(self.login_current_user_image_put.__name__,
|
171
|
+
payload, official_payload_list)
|
139
172
|
response = self.execute('PUT', path=f'/login/current_user/image',
|
140
173
|
payload=payload, **kwargs)
|
141
174
|
return response
|
175
|
+
|
176
|
+
def login_current_user_push_tokens(self, warm_start: bool = False,
|
177
|
+
single_page: bool = False, page_size: int = 5000,
|
178
|
+
kwargs: dict = None, **params) -> list:
|
179
|
+
"""Read Tokens
|
180
|
+
Args:
|
181
|
+
warm_start (bool, optional): salva la risposta in un file e se viene richiamata la stessa funzione con gli stessi argomenti restituisce il contenuto del file. Default to False.
|
182
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
183
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
184
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
185
|
+
**params: additional parameters for the API.
|
186
|
+
Keyword Args:
|
187
|
+
token (string optional): additional filter - parameter
|
188
|
+
sort_by (string optional): Stringa separata da virgole di campi su cui ordinare. Si indica uno o piu campi della risposta e si puo chiedere di ottenere i valori di quei campi in ordine ascendente o discendente. Esempio "Customer:Desc". Default to "". - parameter
|
189
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
190
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
191
|
+
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
192
|
+
join (boolean optional): Se join = true, ogni riga restituita conterra' chiavi aggiuntive che fanno riferimento ad altre entita', con cui la riga ha relazioni 1:1. Default to False - parameter
|
193
|
+
count (boolean optional): Se True nel header della risposta e' presente la dimensione massima a db della chiamata fatta, sconsigliabile perche raddoppia il tempo per chiamata. Default to False. - parameter
|
194
|
+
Returns: list"""
|
195
|
+
if kwargs is None:
|
196
|
+
kwargs = dict()
|
197
|
+
official_params_list = ['token', 'sort_by', 'skip', 'limit', 'like',
|
198
|
+
'join', 'count']
|
199
|
+
params.get('token'), params.get('sort_by'), params.get('skip'
|
200
|
+
), params.get('limit'), params.get('like'), params.get('join'
|
201
|
+
), params.get('count')
|
202
|
+
warning_wrong_parameters(self.login_current_user_push_tokens.
|
203
|
+
__name__, params, official_params_list)
|
204
|
+
response = self.execute('GET', path=
|
205
|
+
f'/login/current_user/push_tokens', single_page=single_page,
|
206
|
+
page_size=page_size, warm_start=warm_start, params=params, **kwargs
|
207
|
+
)
|
208
|
+
return response
|
209
|
+
|
210
|
+
def login_current_user_push_tokens_create(self, kwargs: dict = None, **
|
211
|
+
payload) -> list:
|
212
|
+
"""Create Or Update Token
|
213
|
+
Args:
|
214
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
215
|
+
**payload: additional parameters for the API.
|
216
|
+
Keyword Args:
|
217
|
+
token (string required): additional filter - payload
|
218
|
+
Returns: list"""
|
219
|
+
if kwargs is None:
|
220
|
+
kwargs = dict()
|
221
|
+
official_payload_list = ['token']
|
222
|
+
payload.get('token')
|
223
|
+
warning_wrong_parameters(self.login_current_user_push_tokens_create
|
224
|
+
.__name__, payload, official_payload_list)
|
225
|
+
response = self.execute('POST', path=
|
226
|
+
f'/login/current_user/push_tokens', payload=payload, **kwargs)
|
227
|
+
return response
|
228
|
+
|
229
|
+
def login_current_user_notifications(self, warm_start: bool = False,
|
230
|
+
single_page: bool = False, page_size: int = 5000,
|
231
|
+
kwargs: dict = None, **params) -> list:
|
232
|
+
"""Read Notifications
|
233
|
+
Args:
|
234
|
+
warm_start (bool, optional): salva la risposta in un file e se viene richiamata la stessa funzione con gli stessi argomenti restituisce il contenuto del file. Default to False.
|
235
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
236
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
237
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
238
|
+
**params: additional parameters for the API.
|
239
|
+
Keyword Args:
|
240
|
+
sort_by (string optional): Stringa separata da virgole di campi su cui ordinare. Si indica uno o piu campi della risposta e si puo chiedere di ottenere i valori di quei campi in ordine ascendente o discendente. Esempio "Customer:Desc". Default to "". - parameter
|
241
|
+
null_fields (string optional): additional filter - parameter
|
242
|
+
title (string optional): additional filter - parameter
|
243
|
+
body (string optional): additional filter - parameter
|
244
|
+
read (boolean optional): additional filter - parameter
|
245
|
+
sent (boolean optional): additional filter - parameter
|
246
|
+
skip (integer optional): numero di oggetti che si vogliono saltare nella risposta. Default to 0. - parameter
|
247
|
+
limit (integer optional): numero di oggetti massimi che si vogliono ottenere. Default to 1_000_000. - parameter
|
248
|
+
like (boolean optional): Se True, eventuali filtri richiesti dalla API vengono presi come porzioni di testo, se False il matching sul campo dei filtri deve essere esatto. Default to True. - parameter
|
249
|
+
join (boolean optional): Se join = true, ogni riga restituita conterra' chiavi aggiuntive che fanno riferimento ad altre entita', con cui la riga ha relazioni 1:1. Default to False - parameter
|
250
|
+
count (boolean optional): Se True nel header della risposta e' presente la dimensione massima a db della chiamata fatta, sconsigliabile perche raddoppia il tempo per chiamata. Default to False. - parameter
|
251
|
+
Returns: list"""
|
252
|
+
if kwargs is None:
|
253
|
+
kwargs = dict()
|
254
|
+
official_params_list = ['sort_by', 'null_fields', 'title', 'body',
|
255
|
+
'read', 'sent', 'skip', 'limit', 'like', 'join', 'count']
|
256
|
+
params.get('sort_by'), params.get('null_fields'), params.get('title'
|
257
|
+
), params.get('body'), params.get('read'), params.get('sent'
|
258
|
+
), params.get('skip'), params.get('limit'), params.get('like'
|
259
|
+
), params.get('join'), params.get('count')
|
260
|
+
warning_wrong_parameters(self.login_current_user_notifications.
|
261
|
+
__name__, params, official_params_list)
|
262
|
+
response = self.execute('GET', path=
|
263
|
+
f'/login/current_user/notifications', single_page=single_page,
|
264
|
+
page_size=page_size, warm_start=warm_start, params=params, **kwargs
|
265
|
+
)
|
266
|
+
return response
|
267
|
+
|
268
|
+
def login_current_user_notifications_put(self, uuid: str,
|
269
|
+
kwargs: dict = None) -> list:
|
270
|
+
"""Update Notification
|
271
|
+
Args:
|
272
|
+
uuid (str, required): uuid
|
273
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
274
|
+
Returns: list"""
|
275
|
+
if kwargs is None:
|
276
|
+
kwargs = dict()
|
277
|
+
response = self.execute('PUT', path=
|
278
|
+
f'/login/current_user/notifications/{uuid}', **kwargs)
|
279
|
+
return response
|
280
|
+
|
281
|
+
def login_current_user_notifications_put_bulk(self, payload: list,
|
282
|
+
single_page: bool = False, page_size: int = 5000, kwargs: dict = None
|
283
|
+
) -> list:
|
284
|
+
"""Bulk Set Read
|
285
|
+
Args:
|
286
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
287
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
288
|
+
payload (list[dict], optional): List dict to create.
|
289
|
+
single_page (bool, optional): se False la risposta viene ottenuta a step per non appesantire le API. Default to False.
|
290
|
+
page_size (int, optional): Numero di oggetti per pagina se single_page == False. Default to 5000.
|
291
|
+
kwargs (dict, optional): additional parameters for execute. Default to None.
|
292
|
+
Examples:
|
293
|
+
payload =
|
294
|
+
[
|
295
|
+
"uuid": "str", required
|
296
|
+
]
|
297
|
+
Returns: list"""
|
298
|
+
if kwargs is None:
|
299
|
+
kwargs = dict()
|
300
|
+
response = self.execute('POST', path=
|
301
|
+
f'/login/current_user/notifications/bulk/update', single_page=
|
302
|
+
single_page, page_size=page_size, payload=payload, **kwargs)
|
303
|
+
return response
|
hive/cookbook/messages.py
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
from hive.api import ApiManager, handling_single_page_methods
|
1
|
+
from hive.api import ApiManager, handling_single_page_methods, warning_wrong_parameters
|
2
2
|
|
3
3
|
|
4
4
|
class Messages(ApiManager):
|
@@ -30,6 +30,18 @@ class Messages(ApiManager):
|
|
30
30
|
Returns: list"""
|
31
31
|
if kwargs is None:
|
32
32
|
kwargs = dict()
|
33
|
+
official_params_list = ['sort_by', 'null_fields', 'code',
|
34
|
+
'description', 'mask', 'additional_mask', 'mask_mime_type',
|
35
|
+
'additional_mask_mime_type', 'skip', 'limit', 'like', 'join',
|
36
|
+
'count']
|
37
|
+
params.get('sort_by'), params.get('null_fields'), params.get('code'
|
38
|
+
), params.get('description'), params.get('mask'), params.get(
|
39
|
+
'additional_mask'), params.get('mask_mime_type'), params.get(
|
40
|
+
'additional_mask_mime_type'), params.get('skip'), params.get(
|
41
|
+
'limit'), params.get('like'), params.get('join'), params.get(
|
42
|
+
'count')
|
43
|
+
warning_wrong_parameters(self.messages.__name__, params,
|
44
|
+
official_params_list)
|
33
45
|
response = self.execute('GET', path=f'/messages/', single_page=
|
34
46
|
single_page, page_size=page_size, warm_start=warm_start, params
|
35
47
|
=params, **kwargs)
|
@@ -50,6 +62,13 @@ class Messages(ApiManager):
|
|
50
62
|
Returns: list"""
|
51
63
|
if kwargs is None:
|
52
64
|
kwargs = dict()
|
65
|
+
official_payload_list = ['code', 'description', 'mask',
|
66
|
+
'additional_mask', 'mask_mime_type', 'additional_mask_mime_type']
|
67
|
+
payload.get('code'), payload.get('description'), payload.get('mask'
|
68
|
+
), payload.get('additional_mask'), payload.get('mask_mime_type'
|
69
|
+
), payload.get('additional_mask_mime_type')
|
70
|
+
warning_wrong_parameters(self.messages_create.__name__, payload,
|
71
|
+
official_payload_list)
|
53
72
|
response = self.execute('POST', path=f'/messages/', payload=payload,
|
54
73
|
**kwargs)
|
55
74
|
return response
|
@@ -84,6 +103,13 @@ class Messages(ApiManager):
|
|
84
103
|
Returns: list"""
|
85
104
|
if kwargs is None:
|
86
105
|
kwargs = dict()
|
106
|
+
official_payload_list = ['code', 'description', 'mask',
|
107
|
+
'additional_mask', 'mask_mime_type', 'additional_mask_mime_type']
|
108
|
+
payload.get('code'), payload.get('description'), payload.get('mask'
|
109
|
+
), payload.get('additional_mask'), payload.get('mask_mime_type'
|
110
|
+
), payload.get('additional_mask_mime_type')
|
111
|
+
warning_wrong_parameters(self.messages_put.__name__, payload,
|
112
|
+
official_payload_list)
|
87
113
|
response = self.execute('PUT', path=f'/messages/{uuid}', payload=
|
88
114
|
payload, **kwargs)
|
89
115
|
return response
|
@@ -123,6 +149,10 @@ class Messages(ApiManager):
|
|
123
149
|
Returns: list"""
|
124
150
|
if kwargs is None:
|
125
151
|
kwargs = dict()
|
152
|
+
official_params_list = ['join']
|
153
|
+
params.get('join')
|
154
|
+
warning_wrong_parameters(self.messages_bulk.__name__, params,
|
155
|
+
official_params_list)
|
126
156
|
response = self.execute('POST', path=f'/messages/bulk/read/',
|
127
157
|
single_page=single_page, page_size=page_size, warm_start=
|
128
158
|
warm_start, params=params, payload=payload, **kwargs)
|
@@ -156,6 +186,10 @@ class Messages(ApiManager):
|
|
156
186
|
Returns: list"""
|
157
187
|
if kwargs is None:
|
158
188
|
kwargs = dict()
|
189
|
+
official_params_list = ['best_effort']
|
190
|
+
params.get('best_effort')
|
191
|
+
warning_wrong_parameters(self.messages_create_bulk.__name__, params,
|
192
|
+
official_params_list)
|
159
193
|
response = self.execute('POST', path=f'/messages/bulk/create/',
|
160
194
|
single_page=single_page, page_size=page_size, params=params,
|
161
195
|
payload=payload, **kwargs)
|
hive/cookbook/metric_ingest.py
CHANGED