Skip to content

Commit 100ca86

Browse files
Merge pull request #22 from opalsecurity/auto-update-sdk-2024-12-16-00-11-30
Auto-update SDK on 2024-12-16
2 parents f89cf66 + 2c7b5a2 commit 100ca86

13 files changed

Lines changed: 894 additions & 0 deletions

File tree

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ docs/Session.md
139139
docs/SessionsApi.md
140140
docs/SessionsList.md
141141
docs/SubEvent.md
142+
docs/SyncError.md
143+
docs/SyncErrorList.md
142144
docs/Tag.md
143145
docs/TagFilter.md
144146
docs/TagsApi.md
@@ -315,6 +317,8 @@ opal_security/models/risk_sensitivity_enum.py
315317
opal_security/models/session.py
316318
opal_security/models/sessions_list.py
317319
opal_security/models/sub_event.py
320+
opal_security/models/sync_error.py
321+
opal_security/models/sync_error_list.py
318322
opal_security/models/tag.py
319323
opal_security/models/tag_filter.py
320324
opal_security/models/tags_list.py
@@ -349,4 +353,6 @@ setup.cfg
349353
setup.py
350354
test-requirements.txt
351355
test/__init__.py
356+
test/test_sync_error.py
357+
test/test_sync_error_list.py
352358
tox.ini

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ Class | Method | HTTP request | Description
143143
------------ | ------------- | ------------- | -------------
144144
*AppsApi* | [**get_app**](docs/AppsApi.md#get_app) | **GET** /apps/{app_id} |
145145
*AppsApi* | [**get_apps**](docs/AppsApi.md#get_apps) | **GET** /apps |
146+
*AppsApi* | [**get_sync_errors**](docs/AppsApi.md#get_sync_errors) | **GET** /sync_errors |
146147
*ConfigurationTemplatesApi* | [**create_configuration_template**](docs/ConfigurationTemplatesApi.md#create_configuration_template) | **POST** /configuration-templates |
147148
*ConfigurationTemplatesApi* | [**delete_configuration_template**](docs/ConfigurationTemplatesApi.md#delete_configuration_template) | **DELETE** /configuration-templates/{configuration_template_id} |
148149
*ConfigurationTemplatesApi* | [**get_configuration_templates**](docs/ConfigurationTemplatesApi.md#get_configuration_templates) | **GET** /configuration-templates |
@@ -361,6 +362,8 @@ Class | Method | HTTP request | Description
361362
- [Session](docs/Session.md)
362363
- [SessionsList](docs/SessionsList.md)
363364
- [SubEvent](docs/SubEvent.md)
365+
- [SyncError](docs/SyncError.md)
366+
- [SyncErrorList](docs/SyncErrorList.md)
364367
- [Tag](docs/Tag.md)
365368
- [TagFilter](docs/TagFilter.md)
366369
- [TagsList](docs/TagsList.md)

api/openapi.yaml

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3017,6 +3017,54 @@ paths:
30173017
- BearerAuth: []
30183018
tags:
30193019
- uars
3020+
/sync_errors:
3021+
get:
3022+
description: Returns a list of recent sync errors that have occurred since the last successful sync.
3023+
operationId: getSyncErrors
3024+
parameters:
3025+
- description: The ID of the app to list sync errors for.
3026+
example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
3027+
explode: false
3028+
in: query
3029+
name: app_id
3030+
required: false
3031+
schema:
3032+
format: uuid
3033+
type: string
3034+
style: form
3035+
- description: The ID of the resource to list sync errors for.
3036+
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
3037+
explode: false
3038+
in: query
3039+
name: resource_id
3040+
required: false
3041+
schema:
3042+
format: uuid
3043+
type: string
3044+
style: form
3045+
- description: The ID of the group to list sync errors for.
3046+
example: 9546209c-42c2-4801-96d7-9ec42df0f59c
3047+
explode: false
3048+
in: query
3049+
name: group_id
3050+
required: false
3051+
schema:
3052+
format: uuid
3053+
type: string
3054+
style: form
3055+
responses:
3056+
"200":
3057+
content:
3058+
application/json:
3059+
schema:
3060+
items:
3061+
$ref: "#/components/schemas/SyncErrorList"
3062+
type: array
3063+
description: A list of sync errors.
3064+
security:
3065+
- BearerAuth: []
3066+
tags:
3067+
- apps
30203068
components:
30213069
schemas:
30223070
UARScope:
@@ -7658,6 +7706,63 @@ components:
76587706
- duration_minutes
76597707
- resources
76607708
- groups
7709+
SyncErrorList:
7710+
example:
7711+
sync_errors:
7712+
- app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
7713+
first_seen: 2022-07-14T06:59:59Z
7714+
last_seen: 2022-08-23T04:32:46Z
7715+
error_message: Failed to connect to the remote system - insufficient credentials.
7716+
- app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
7717+
first_seen: 2023-04-24T06:59:59Z
7718+
last_seen: 2024-08-21T04:32:46Z
7719+
error_message: Resource not found.
7720+
properties:
7721+
sync_errors:
7722+
items:
7723+
$ref: "#/components/schemas/SyncError"
7724+
type: array
7725+
type: object
7726+
required:
7727+
- sync_errors
7728+
SyncError:
7729+
description: |-
7730+
# SyncError Object
7731+
### Description
7732+
The `SyncError` object is used to represent a sync error.
7733+
7734+
### Usage Example
7735+
List from the `GET Sync Errors` endpoint.
7736+
example:
7737+
app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
7738+
first_seen: 2022-07-14T06:59:59Z
7739+
last_seen: 2022-08-23T04:32:46Z
7740+
error_message: Failed to connect to the remote system - insufficient credentials.
7741+
properties:
7742+
first_seen:
7743+
description: The time when this error was first seen.
7744+
example: 2022-07-14T06:59:59Z
7745+
type: string
7746+
format: date-time
7747+
last_seen:
7748+
description: The time when this error was most recently seen.
7749+
example: 2022-07-14T06:59:59Z
7750+
type: string
7751+
format: date-time
7752+
error_message:
7753+
description: The error message associated with the sync error.
7754+
example: Failed to connect to the remote system - insufficient credentials.
7755+
type: string
7756+
app_id:
7757+
description: The ID of the app that the error occured for.
7758+
example: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
7759+
format: uuid
7760+
type: string
7761+
required:
7762+
- first_seen
7763+
- last_seen
7764+
- error_message
7765+
type: object
76617766
securitySchemes:
76627767
BearerAuth:
76637768
scheme: bearer

docs/AppsApi.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**get_app**](AppsApi.md#get_app) | **GET** /apps/{app_id} |
88
[**get_apps**](AppsApi.md#get_apps) | **GET** /apps |
9+
[**get_sync_errors**](AppsApi.md#get_sync_errors) | **GET** /sync_errors |
910

1011

1112
# **get_app**
@@ -169,3 +170,86 @@ Name | Type | Description | Notes
169170

170171
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
171172

173+
# **get_sync_errors**
174+
> List[SyncErrorList] get_sync_errors(app_id=app_id, resource_id=resource_id, group_id=group_id)
175+
176+
177+
178+
Returns a list of recent sync errors that have occurred since the last successful sync.
179+
180+
### Example
181+
182+
* Bearer Authentication (BearerAuth):
183+
184+
```python
185+
import opal_security
186+
from opal_security.models.sync_error_list import SyncErrorList
187+
from opal_security.rest import ApiException
188+
from pprint import pprint
189+
190+
# Defining the host is optional and defaults to https://api.opal.dev/v1
191+
# See configuration.py for a list of all supported configuration parameters.
192+
import opal_security as opal
193+
194+
configuration = opal.Configuration(
195+
host = "https://api.opal.dev/v1"
196+
)
197+
198+
# The client must configure the authentication and authorization parameters
199+
# in accordance with the API server security policy.
200+
# Examples for each auth method are provided below, use the example that
201+
# satisfies your auth use case.
202+
203+
# Configure Bearer authorization: BearerAuth
204+
configuration = opal.Configuration(
205+
access_token = os.environ["BEARER_TOKEN"]
206+
)
207+
208+
# Enter a context with an instance of the API client
209+
with opal_security.ApiClient(configuration) as api_client:
210+
# Create an instance of the API class
211+
api_instance = opal_security.AppsApi(api_client)
212+
app_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac' # str | The ID of the app to list sync errors for. (optional)
213+
resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource to list sync errors for. (optional)
214+
group_id = '9546209c-42c2-4801-96d7-9ec42df0f59c' # str | The ID of the group to list sync errors for. (optional)
215+
216+
try:
217+
api_response = api_instance.get_sync_errors(app_id=app_id, resource_id=resource_id, group_id=group_id)
218+
print("The response of AppsApi->get_sync_errors:\n")
219+
pprint(api_response)
220+
except Exception as e:
221+
print("Exception when calling AppsApi->get_sync_errors: %s\n" % e)
222+
```
223+
224+
225+
226+
### Parameters
227+
228+
229+
Name | Type | Description | Notes
230+
------------- | ------------- | ------------- | -------------
231+
**app_id** | **str**| The ID of the app to list sync errors for. | [optional]
232+
**resource_id** | **str**| The ID of the resource to list sync errors for. | [optional]
233+
**group_id** | **str**| The ID of the group to list sync errors for. | [optional]
234+
235+
### Return type
236+
237+
[**List[SyncErrorList]**](SyncErrorList.md)
238+
239+
### Authorization
240+
241+
[BearerAuth](../README.md#BearerAuth)
242+
243+
### HTTP request headers
244+
245+
- **Content-Type**: Not defined
246+
- **Accept**: application/json
247+
248+
### HTTP response details
249+
250+
| Status code | Description | Response headers |
251+
|-------------|-------------|------------------|
252+
**200** | A list of sync errors. | - |
253+
254+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
255+

docs/SyncError.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# SyncError
2+
3+
# SyncError Object ### Description The `SyncError` object is used to represent a sync error. ### Usage Example List from the `GET Sync Errors` endpoint.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**first_seen** | **datetime** | The time when this error was first seen. |
10+
**last_seen** | **datetime** | The time when this error was most recently seen. |
11+
**error_message** | **str** | The error message associated with the sync error. |
12+
**app_id** | **str** | The ID of the app that the error occured for. | [optional]
13+
14+
## Example
15+
16+
```python
17+
from opal_security.models.sync_error import SyncError
18+
19+
# TODO update the JSON string below
20+
json = "{}"
21+
# create an instance of SyncError from a JSON string
22+
sync_error_instance = SyncError.from_json(json)
23+
# print the JSON string representation of the object
24+
print(SyncError.to_json())
25+
26+
# convert the object into a dict
27+
sync_error_dict = sync_error_instance.to_dict()
28+
# create an instance of SyncError from a dict
29+
sync_error_from_dict = SyncError.from_dict(sync_error_dict)
30+
```
31+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
32+
33+

docs/SyncErrorList.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# SyncErrorList
2+
3+
4+
## Properties
5+
6+
Name | Type | Description | Notes
7+
------------ | ------------- | ------------- | -------------
8+
**sync_errors** | [**List[SyncError]**](SyncError.md) | |
9+
10+
## Example
11+
12+
```python
13+
from opal_security.models.sync_error_list import SyncErrorList
14+
15+
# TODO update the JSON string below
16+
json = "{}"
17+
# create an instance of SyncErrorList from a JSON string
18+
sync_error_list_instance = SyncErrorList.from_json(json)
19+
# print the JSON string representation of the object
20+
print(SyncErrorList.to_json())
21+
22+
# convert the object into a dict
23+
sync_error_list_dict = sync_error_list_instance.to_dict()
24+
# create an instance of SyncErrorList from a dict
25+
sync_error_list_from_dict = SyncErrorList.from_dict(sync_error_list_dict)
26+
```
27+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
28+
29+

opal_security/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@
170170
from opal_security.models.session import Session
171171
from opal_security.models.sessions_list import SessionsList
172172
from opal_security.models.sub_event import SubEvent
173+
from opal_security.models.sync_error import SyncError
174+
from opal_security.models.sync_error_list import SyncErrorList
173175
from opal_security.models.tag import Tag
174176
from opal_security.models.tag_filter import TagFilter
175177
from opal_security.models.tags_list import TagsList

0 commit comments

Comments
 (0)