windmill-api 1.417.3__py3-none-any.whl → 1.419.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.
- windmill_api/api/index_search/count_search_logs_index.py +211 -0
- windmill_api/api/index_search/search_logs_index.py +241 -0
- windmill_api/models/count_search_logs_index_response_200.py +85 -0
- windmill_api/models/count_search_logs_index_response_200_count_per_host.py +44 -0
- windmill_api/models/create_websocket_trigger_json_body.py +82 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_0.py +58 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1.py +70 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/create_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/create_websocket_trigger_json_body_url_runnable_args.py +44 -0
- windmill_api/models/edit_websocket_trigger.py +71 -1
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_0.py +58 -0
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1.py +68 -0
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/edit_websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/edit_websocket_trigger_url_runnable_args.py +44 -0
- windmill_api/models/get_websocket_trigger_response_200.py +82 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_0.py +58 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1.py +70 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/get_websocket_trigger_response_200_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/get_websocket_trigger_response_200_url_runnable_args.py +44 -0
- windmill_api/models/list_websocket_triggers_response_200_item.py +84 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_0.py +58 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1.py +70 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/list_websocket_triggers_response_200_item_initial_messages_item_type_1_runnable_result_args.py +46 -0
- windmill_api/models/list_websocket_triggers_response_200_item_url_runnable_args.py +44 -0
- windmill_api/models/log_search_hit.py +58 -0
- windmill_api/models/new_websocket_trigger.py +66 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_0.py +58 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_1.py +68 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/new_websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/new_websocket_trigger_url_runnable_args.py +44 -0
- windmill_api/models/path_script.py +8 -0
- windmill_api/models/raw_script.py +8 -0
- windmill_api/models/search_logs_index_response_200.py +86 -0
- windmill_api/models/search_logs_index_response_200_hits_item.py +58 -0
- windmill_api/models/test_smtp_json_body_smtp.py +7 -0
- windmill_api/models/update_websocket_trigger_json_body.py +83 -1
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_0.py +58 -0
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1.py +70 -0
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/update_websocket_trigger_json_body_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/update_websocket_trigger_json_body_url_runnable_args.py +44 -0
- windmill_api/models/websocket_trigger.py +60 -0
- windmill_api/models/websocket_trigger_initial_message_type_0.py +58 -0
- windmill_api/models/websocket_trigger_initial_message_type_1_runnable_result_args.py +44 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_0.py +58 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_1.py +68 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_1_runnable_result.py +83 -0
- windmill_api/models/websocket_trigger_initial_messages_item_type_1_runnable_result_args.py +44 -0
- windmill_api/models/websocket_trigger_url_runnable_args.py +44 -0
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/METADATA +1 -1
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/RECORD +58 -14
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/LICENSE +0 -0
- {windmill_api-1.417.3.dist-info → windmill_api-1.419.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from http import HTTPStatus
|
|
3
|
+
from typing import Any, Dict, Optional, Union
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.count_search_logs_index_response_200 import CountSearchLogsIndexResponse200
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
search_query: str,
|
|
16
|
+
hosts: str,
|
|
17
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
18
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
19
|
+
) -> Dict[str, Any]:
|
|
20
|
+
pass
|
|
21
|
+
|
|
22
|
+
params: Dict[str, Any] = {}
|
|
23
|
+
params["search_query"] = search_query
|
|
24
|
+
|
|
25
|
+
params["hosts"] = hosts
|
|
26
|
+
|
|
27
|
+
json_min_ts: Union[Unset, None, str] = UNSET
|
|
28
|
+
if not isinstance(min_ts, Unset):
|
|
29
|
+
json_min_ts = min_ts.isoformat() if min_ts else None
|
|
30
|
+
|
|
31
|
+
params["min_ts"] = json_min_ts
|
|
32
|
+
|
|
33
|
+
json_max_ts: Union[Unset, None, str] = UNSET
|
|
34
|
+
if not isinstance(max_ts, Unset):
|
|
35
|
+
json_max_ts = max_ts.isoformat() if max_ts else None
|
|
36
|
+
|
|
37
|
+
params["max_ts"] = json_max_ts
|
|
38
|
+
|
|
39
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
"method": "get",
|
|
43
|
+
"url": "/srch/index/search/count_service_logs",
|
|
44
|
+
"params": params,
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def _parse_response(
|
|
49
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
50
|
+
) -> Optional[CountSearchLogsIndexResponse200]:
|
|
51
|
+
if response.status_code == HTTPStatus.OK:
|
|
52
|
+
response_200 = CountSearchLogsIndexResponse200.from_dict(response.json())
|
|
53
|
+
|
|
54
|
+
return response_200
|
|
55
|
+
if client.raise_on_unexpected_status:
|
|
56
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
57
|
+
else:
|
|
58
|
+
return None
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def _build_response(
|
|
62
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
63
|
+
) -> Response[CountSearchLogsIndexResponse200]:
|
|
64
|
+
return Response(
|
|
65
|
+
status_code=HTTPStatus(response.status_code),
|
|
66
|
+
content=response.content,
|
|
67
|
+
headers=response.headers,
|
|
68
|
+
parsed=_parse_response(client=client, response=response),
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
def sync_detailed(
|
|
73
|
+
*,
|
|
74
|
+
client: Union[AuthenticatedClient, Client],
|
|
75
|
+
search_query: str,
|
|
76
|
+
hosts: str,
|
|
77
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
78
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
79
|
+
) -> Response[CountSearchLogsIndexResponse200]:
|
|
80
|
+
"""Search and count the log line hits on every provided host
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
search_query (str):
|
|
84
|
+
hosts (str):
|
|
85
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
86
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
87
|
+
|
|
88
|
+
Raises:
|
|
89
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
90
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
Response[CountSearchLogsIndexResponse200]
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
kwargs = _get_kwargs(
|
|
97
|
+
search_query=search_query,
|
|
98
|
+
hosts=hosts,
|
|
99
|
+
min_ts=min_ts,
|
|
100
|
+
max_ts=max_ts,
|
|
101
|
+
)
|
|
102
|
+
|
|
103
|
+
response = client.get_httpx_client().request(
|
|
104
|
+
**kwargs,
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
return _build_response(client=client, response=response)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def sync(
|
|
111
|
+
*,
|
|
112
|
+
client: Union[AuthenticatedClient, Client],
|
|
113
|
+
search_query: str,
|
|
114
|
+
hosts: str,
|
|
115
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
116
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
117
|
+
) -> Optional[CountSearchLogsIndexResponse200]:
|
|
118
|
+
"""Search and count the log line hits on every provided host
|
|
119
|
+
|
|
120
|
+
Args:
|
|
121
|
+
search_query (str):
|
|
122
|
+
hosts (str):
|
|
123
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
124
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
125
|
+
|
|
126
|
+
Raises:
|
|
127
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
128
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
129
|
+
|
|
130
|
+
Returns:
|
|
131
|
+
CountSearchLogsIndexResponse200
|
|
132
|
+
"""
|
|
133
|
+
|
|
134
|
+
return sync_detailed(
|
|
135
|
+
client=client,
|
|
136
|
+
search_query=search_query,
|
|
137
|
+
hosts=hosts,
|
|
138
|
+
min_ts=min_ts,
|
|
139
|
+
max_ts=max_ts,
|
|
140
|
+
).parsed
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
async def asyncio_detailed(
|
|
144
|
+
*,
|
|
145
|
+
client: Union[AuthenticatedClient, Client],
|
|
146
|
+
search_query: str,
|
|
147
|
+
hosts: str,
|
|
148
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
149
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
150
|
+
) -> Response[CountSearchLogsIndexResponse200]:
|
|
151
|
+
"""Search and count the log line hits on every provided host
|
|
152
|
+
|
|
153
|
+
Args:
|
|
154
|
+
search_query (str):
|
|
155
|
+
hosts (str):
|
|
156
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
157
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
158
|
+
|
|
159
|
+
Raises:
|
|
160
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
161
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
162
|
+
|
|
163
|
+
Returns:
|
|
164
|
+
Response[CountSearchLogsIndexResponse200]
|
|
165
|
+
"""
|
|
166
|
+
|
|
167
|
+
kwargs = _get_kwargs(
|
|
168
|
+
search_query=search_query,
|
|
169
|
+
hosts=hosts,
|
|
170
|
+
min_ts=min_ts,
|
|
171
|
+
max_ts=max_ts,
|
|
172
|
+
)
|
|
173
|
+
|
|
174
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
175
|
+
|
|
176
|
+
return _build_response(client=client, response=response)
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
async def asyncio(
|
|
180
|
+
*,
|
|
181
|
+
client: Union[AuthenticatedClient, Client],
|
|
182
|
+
search_query: str,
|
|
183
|
+
hosts: str,
|
|
184
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
185
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
186
|
+
) -> Optional[CountSearchLogsIndexResponse200]:
|
|
187
|
+
"""Search and count the log line hits on every provided host
|
|
188
|
+
|
|
189
|
+
Args:
|
|
190
|
+
search_query (str):
|
|
191
|
+
hosts (str):
|
|
192
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
193
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
194
|
+
|
|
195
|
+
Raises:
|
|
196
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
197
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
198
|
+
|
|
199
|
+
Returns:
|
|
200
|
+
CountSearchLogsIndexResponse200
|
|
201
|
+
"""
|
|
202
|
+
|
|
203
|
+
return (
|
|
204
|
+
await asyncio_detailed(
|
|
205
|
+
client=client,
|
|
206
|
+
search_query=search_query,
|
|
207
|
+
hosts=hosts,
|
|
208
|
+
min_ts=min_ts,
|
|
209
|
+
max_ts=max_ts,
|
|
210
|
+
)
|
|
211
|
+
).parsed
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from http import HTTPStatus
|
|
3
|
+
from typing import Any, Dict, Optional, Union
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
from ... import errors
|
|
8
|
+
from ...client import AuthenticatedClient, Client
|
|
9
|
+
from ...models.search_logs_index_response_200 import SearchLogsIndexResponse200
|
|
10
|
+
from ...types import UNSET, Response, Unset
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
search_query: str,
|
|
16
|
+
mode: str,
|
|
17
|
+
worker_group: Union[Unset, None, str] = UNSET,
|
|
18
|
+
hostname: str,
|
|
19
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
20
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
21
|
+
) -> Dict[str, Any]:
|
|
22
|
+
pass
|
|
23
|
+
|
|
24
|
+
params: Dict[str, Any] = {}
|
|
25
|
+
params["search_query"] = search_query
|
|
26
|
+
|
|
27
|
+
params["mode"] = mode
|
|
28
|
+
|
|
29
|
+
params["worker_group"] = worker_group
|
|
30
|
+
|
|
31
|
+
params["hostname"] = hostname
|
|
32
|
+
|
|
33
|
+
json_min_ts: Union[Unset, None, str] = UNSET
|
|
34
|
+
if not isinstance(min_ts, Unset):
|
|
35
|
+
json_min_ts = min_ts.isoformat() if min_ts else None
|
|
36
|
+
|
|
37
|
+
params["min_ts"] = json_min_ts
|
|
38
|
+
|
|
39
|
+
json_max_ts: Union[Unset, None, str] = UNSET
|
|
40
|
+
if not isinstance(max_ts, Unset):
|
|
41
|
+
json_max_ts = max_ts.isoformat() if max_ts else None
|
|
42
|
+
|
|
43
|
+
params["max_ts"] = json_max_ts
|
|
44
|
+
|
|
45
|
+
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
|
|
46
|
+
|
|
47
|
+
return {
|
|
48
|
+
"method": "get",
|
|
49
|
+
"url": "/srch/index/search/service_logs",
|
|
50
|
+
"params": params,
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
def _parse_response(
|
|
55
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
56
|
+
) -> Optional[SearchLogsIndexResponse200]:
|
|
57
|
+
if response.status_code == HTTPStatus.OK:
|
|
58
|
+
response_200 = SearchLogsIndexResponse200.from_dict(response.json())
|
|
59
|
+
|
|
60
|
+
return response_200
|
|
61
|
+
if client.raise_on_unexpected_status:
|
|
62
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
63
|
+
else:
|
|
64
|
+
return None
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def _build_response(
|
|
68
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
69
|
+
) -> Response[SearchLogsIndexResponse200]:
|
|
70
|
+
return Response(
|
|
71
|
+
status_code=HTTPStatus(response.status_code),
|
|
72
|
+
content=response.content,
|
|
73
|
+
headers=response.headers,
|
|
74
|
+
parsed=_parse_response(client=client, response=response),
|
|
75
|
+
)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def sync_detailed(
|
|
79
|
+
*,
|
|
80
|
+
client: Union[AuthenticatedClient, Client],
|
|
81
|
+
search_query: str,
|
|
82
|
+
mode: str,
|
|
83
|
+
worker_group: Union[Unset, None, str] = UNSET,
|
|
84
|
+
hostname: str,
|
|
85
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
86
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
87
|
+
) -> Response[SearchLogsIndexResponse200]:
|
|
88
|
+
"""Search through service logs with a string query
|
|
89
|
+
|
|
90
|
+
Args:
|
|
91
|
+
search_query (str):
|
|
92
|
+
mode (str):
|
|
93
|
+
worker_group (Union[Unset, None, str]):
|
|
94
|
+
hostname (str):
|
|
95
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
96
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
97
|
+
|
|
98
|
+
Raises:
|
|
99
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
100
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
101
|
+
|
|
102
|
+
Returns:
|
|
103
|
+
Response[SearchLogsIndexResponse200]
|
|
104
|
+
"""
|
|
105
|
+
|
|
106
|
+
kwargs = _get_kwargs(
|
|
107
|
+
search_query=search_query,
|
|
108
|
+
mode=mode,
|
|
109
|
+
worker_group=worker_group,
|
|
110
|
+
hostname=hostname,
|
|
111
|
+
min_ts=min_ts,
|
|
112
|
+
max_ts=max_ts,
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
response = client.get_httpx_client().request(
|
|
116
|
+
**kwargs,
|
|
117
|
+
)
|
|
118
|
+
|
|
119
|
+
return _build_response(client=client, response=response)
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
def sync(
|
|
123
|
+
*,
|
|
124
|
+
client: Union[AuthenticatedClient, Client],
|
|
125
|
+
search_query: str,
|
|
126
|
+
mode: str,
|
|
127
|
+
worker_group: Union[Unset, None, str] = UNSET,
|
|
128
|
+
hostname: str,
|
|
129
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
130
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
131
|
+
) -> Optional[SearchLogsIndexResponse200]:
|
|
132
|
+
"""Search through service logs with a string query
|
|
133
|
+
|
|
134
|
+
Args:
|
|
135
|
+
search_query (str):
|
|
136
|
+
mode (str):
|
|
137
|
+
worker_group (Union[Unset, None, str]):
|
|
138
|
+
hostname (str):
|
|
139
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
140
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
141
|
+
|
|
142
|
+
Raises:
|
|
143
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
144
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
145
|
+
|
|
146
|
+
Returns:
|
|
147
|
+
SearchLogsIndexResponse200
|
|
148
|
+
"""
|
|
149
|
+
|
|
150
|
+
return sync_detailed(
|
|
151
|
+
client=client,
|
|
152
|
+
search_query=search_query,
|
|
153
|
+
mode=mode,
|
|
154
|
+
worker_group=worker_group,
|
|
155
|
+
hostname=hostname,
|
|
156
|
+
min_ts=min_ts,
|
|
157
|
+
max_ts=max_ts,
|
|
158
|
+
).parsed
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
async def asyncio_detailed(
|
|
162
|
+
*,
|
|
163
|
+
client: Union[AuthenticatedClient, Client],
|
|
164
|
+
search_query: str,
|
|
165
|
+
mode: str,
|
|
166
|
+
worker_group: Union[Unset, None, str] = UNSET,
|
|
167
|
+
hostname: str,
|
|
168
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
169
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
170
|
+
) -> Response[SearchLogsIndexResponse200]:
|
|
171
|
+
"""Search through service logs with a string query
|
|
172
|
+
|
|
173
|
+
Args:
|
|
174
|
+
search_query (str):
|
|
175
|
+
mode (str):
|
|
176
|
+
worker_group (Union[Unset, None, str]):
|
|
177
|
+
hostname (str):
|
|
178
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
179
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
180
|
+
|
|
181
|
+
Raises:
|
|
182
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
183
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
184
|
+
|
|
185
|
+
Returns:
|
|
186
|
+
Response[SearchLogsIndexResponse200]
|
|
187
|
+
"""
|
|
188
|
+
|
|
189
|
+
kwargs = _get_kwargs(
|
|
190
|
+
search_query=search_query,
|
|
191
|
+
mode=mode,
|
|
192
|
+
worker_group=worker_group,
|
|
193
|
+
hostname=hostname,
|
|
194
|
+
min_ts=min_ts,
|
|
195
|
+
max_ts=max_ts,
|
|
196
|
+
)
|
|
197
|
+
|
|
198
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
199
|
+
|
|
200
|
+
return _build_response(client=client, response=response)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
async def asyncio(
|
|
204
|
+
*,
|
|
205
|
+
client: Union[AuthenticatedClient, Client],
|
|
206
|
+
search_query: str,
|
|
207
|
+
mode: str,
|
|
208
|
+
worker_group: Union[Unset, None, str] = UNSET,
|
|
209
|
+
hostname: str,
|
|
210
|
+
min_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
211
|
+
max_ts: Union[Unset, None, datetime.datetime] = UNSET,
|
|
212
|
+
) -> Optional[SearchLogsIndexResponse200]:
|
|
213
|
+
"""Search through service logs with a string query
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
search_query (str):
|
|
217
|
+
mode (str):
|
|
218
|
+
worker_group (Union[Unset, None, str]):
|
|
219
|
+
hostname (str):
|
|
220
|
+
min_ts (Union[Unset, None, datetime.datetime]):
|
|
221
|
+
max_ts (Union[Unset, None, datetime.datetime]):
|
|
222
|
+
|
|
223
|
+
Raises:
|
|
224
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
|
|
225
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
226
|
+
|
|
227
|
+
Returns:
|
|
228
|
+
SearchLogsIndexResponse200
|
|
229
|
+
"""
|
|
230
|
+
|
|
231
|
+
return (
|
|
232
|
+
await asyncio_detailed(
|
|
233
|
+
client=client,
|
|
234
|
+
search_query=search_query,
|
|
235
|
+
mode=mode,
|
|
236
|
+
worker_group=worker_group,
|
|
237
|
+
hostname=hostname,
|
|
238
|
+
min_ts=min_ts,
|
|
239
|
+
max_ts=max_ts,
|
|
240
|
+
)
|
|
241
|
+
).parsed
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union, cast
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
from ..types import UNSET, Unset
|
|
7
|
+
|
|
8
|
+
if TYPE_CHECKING:
|
|
9
|
+
from ..models.count_search_logs_index_response_200_count_per_host import CountSearchLogsIndexResponse200CountPerHost
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
T = TypeVar("T", bound="CountSearchLogsIndexResponse200")
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
@_attrs_define
|
|
16
|
+
class CountSearchLogsIndexResponse200:
|
|
17
|
+
"""
|
|
18
|
+
Attributes:
|
|
19
|
+
query_parse_errors (Union[Unset, List[str]]): a list of the terms that couldn't be parsed (and thus ignored)
|
|
20
|
+
count_per_host (Union[Unset, CountSearchLogsIndexResponse200CountPerHost]): count of log lines that matched the
|
|
21
|
+
query per hostname
|
|
22
|
+
"""
|
|
23
|
+
|
|
24
|
+
query_parse_errors: Union[Unset, List[str]] = UNSET
|
|
25
|
+
count_per_host: Union[Unset, "CountSearchLogsIndexResponse200CountPerHost"] = UNSET
|
|
26
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
29
|
+
query_parse_errors: Union[Unset, List[str]] = UNSET
|
|
30
|
+
if not isinstance(self.query_parse_errors, Unset):
|
|
31
|
+
query_parse_errors = self.query_parse_errors
|
|
32
|
+
|
|
33
|
+
count_per_host: Union[Unset, Dict[str, Any]] = UNSET
|
|
34
|
+
if not isinstance(self.count_per_host, Unset):
|
|
35
|
+
count_per_host = self.count_per_host.to_dict()
|
|
36
|
+
|
|
37
|
+
field_dict: Dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update({})
|
|
40
|
+
if query_parse_errors is not UNSET:
|
|
41
|
+
field_dict["query_parse_errors"] = query_parse_errors
|
|
42
|
+
if count_per_host is not UNSET:
|
|
43
|
+
field_dict["count_per_host"] = count_per_host
|
|
44
|
+
|
|
45
|
+
return field_dict
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
49
|
+
from ..models.count_search_logs_index_response_200_count_per_host import (
|
|
50
|
+
CountSearchLogsIndexResponse200CountPerHost,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
d = src_dict.copy()
|
|
54
|
+
query_parse_errors = cast(List[str], d.pop("query_parse_errors", UNSET))
|
|
55
|
+
|
|
56
|
+
_count_per_host = d.pop("count_per_host", UNSET)
|
|
57
|
+
count_per_host: Union[Unset, CountSearchLogsIndexResponse200CountPerHost]
|
|
58
|
+
if isinstance(_count_per_host, Unset):
|
|
59
|
+
count_per_host = UNSET
|
|
60
|
+
else:
|
|
61
|
+
count_per_host = CountSearchLogsIndexResponse200CountPerHost.from_dict(_count_per_host)
|
|
62
|
+
|
|
63
|
+
count_search_logs_index_response_200 = cls(
|
|
64
|
+
query_parse_errors=query_parse_errors,
|
|
65
|
+
count_per_host=count_per_host,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
count_search_logs_index_response_200.additional_properties = d
|
|
69
|
+
return count_search_logs_index_response_200
|
|
70
|
+
|
|
71
|
+
@property
|
|
72
|
+
def additional_keys(self) -> List[str]:
|
|
73
|
+
return list(self.additional_properties.keys())
|
|
74
|
+
|
|
75
|
+
def __getitem__(self, key: str) -> Any:
|
|
76
|
+
return self.additional_properties[key]
|
|
77
|
+
|
|
78
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
79
|
+
self.additional_properties[key] = value
|
|
80
|
+
|
|
81
|
+
def __delitem__(self, key: str) -> None:
|
|
82
|
+
del self.additional_properties[key]
|
|
83
|
+
|
|
84
|
+
def __contains__(self, key: str) -> bool:
|
|
85
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from typing import Any, Dict, List, Type, TypeVar
|
|
2
|
+
|
|
3
|
+
from attrs import define as _attrs_define
|
|
4
|
+
from attrs import field as _attrs_field
|
|
5
|
+
|
|
6
|
+
T = TypeVar("T", bound="CountSearchLogsIndexResponse200CountPerHost")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
@_attrs_define
|
|
10
|
+
class CountSearchLogsIndexResponse200CountPerHost:
|
|
11
|
+
"""count of log lines that matched the query per hostname"""
|
|
12
|
+
|
|
13
|
+
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
14
|
+
|
|
15
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
16
|
+
field_dict: Dict[str, Any] = {}
|
|
17
|
+
field_dict.update(self.additional_properties)
|
|
18
|
+
field_dict.update({})
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
|
|
24
|
+
d = src_dict.copy()
|
|
25
|
+
count_search_logs_index_response_200_count_per_host = cls()
|
|
26
|
+
|
|
27
|
+
count_search_logs_index_response_200_count_per_host.additional_properties = d
|
|
28
|
+
return count_search_logs_index_response_200_count_per_host
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> List[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|