Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ docs/Session.md
docs/SessionsApi.md
docs/SessionsList.md
docs/SubEvent.md
docs/SyncError.md
docs/SyncErrorList.md
docs/Tag.md
docs/TagFilter.md
docs/TagsApi.md
Expand Down Expand Up @@ -315,6 +317,8 @@ opal_security/models/risk_sensitivity_enum.py
opal_security/models/session.py
opal_security/models/sessions_list.py
opal_security/models/sub_event.py
opal_security/models/sync_error.py
opal_security/models/sync_error_list.py
opal_security/models/tag.py
opal_security/models/tag_filter.py
opal_security/models/tags_list.py
Expand Down Expand Up @@ -349,4 +353,6 @@ setup.cfg
setup.py
test-requirements.txt
test/__init__.py
test/test_sync_error.py
test/test_sync_error_list.py
tox.ini
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*AppsApi* | [**get_app**](docs/AppsApi.md#get_app) | **GET** /apps/{app_id} |
*AppsApi* | [**get_apps**](docs/AppsApi.md#get_apps) | **GET** /apps |
*AppsApi* | [**get_sync_errors**](docs/AppsApi.md#get_sync_errors) | **GET** /sync_errors |
*ConfigurationTemplatesApi* | [**create_configuration_template**](docs/ConfigurationTemplatesApi.md#create_configuration_template) | **POST** /configuration-templates |
*ConfigurationTemplatesApi* | [**delete_configuration_template**](docs/ConfigurationTemplatesApi.md#delete_configuration_template) | **DELETE** /configuration-templates/{configuration_template_id} |
*ConfigurationTemplatesApi* | [**get_configuration_templates**](docs/ConfigurationTemplatesApi.md#get_configuration_templates) | **GET** /configuration-templates |
Expand Down Expand Up @@ -361,6 +362,8 @@ Class | Method | HTTP request | Description
- [Session](docs/Session.md)
- [SessionsList](docs/SessionsList.md)
- [SubEvent](docs/SubEvent.md)
- [SyncError](docs/SyncError.md)
- [SyncErrorList](docs/SyncErrorList.md)
- [Tag](docs/Tag.md)
- [TagFilter](docs/TagFilter.md)
- [TagsList](docs/TagsList.md)
Expand Down
105 changes: 105 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3017,6 +3017,54 @@ paths:
- BearerAuth: []
tags:
- uars
/sync_errors:
get:
description: Returns a list of recent sync errors that have occurred since the last successful sync.
operationId: getSyncErrors
parameters:
- description: The ID of the app to list sync errors for.
example: 29827fb8-f2dd-4e80-9576-28e31e9934ac
explode: false
in: query
name: app_id
required: false
schema:
format: uuid
type: string
style: form
- description: The ID of the resource to list sync errors for.
example: 4baf8423-db0a-4037-a4cf-f79c60cb67a5
explode: false
in: query
name: resource_id
required: false
schema:
format: uuid
type: string
style: form
- description: The ID of the group to list sync errors for.
example: 9546209c-42c2-4801-96d7-9ec42df0f59c
explode: false
in: query
name: group_id
required: false
schema:
format: uuid
type: string
style: form
responses:
"200":
content:
application/json:
schema:
items:
$ref: "#/components/schemas/SyncErrorList"
type: array
description: A list of sync errors.
security:
- BearerAuth: []
tags:
- apps
components:
schemas:
UARScope:
Expand Down Expand Up @@ -7658,6 +7706,63 @@ components:
- duration_minutes
- resources
- groups
SyncErrorList:
example:
sync_errors:
- app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
first_seen: 2022-07-14T06:59:59Z
last_seen: 2022-08-23T04:32:46Z
error_message: Failed to connect to the remote system - insufficient credentials.
- app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
first_seen: 2023-04-24T06:59:59Z
last_seen: 2024-08-21T04:32:46Z
error_message: Resource not found.
properties:
sync_errors:
items:
$ref: "#/components/schemas/SyncError"
type: array
type: object
required:
- sync_errors
SyncError:
description: |-
# SyncError Object
### Description
The `SyncError` object is used to represent a sync error.

### Usage Example
List from the `GET Sync Errors` endpoint.
example:
app_id: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
first_seen: 2022-07-14T06:59:59Z
last_seen: 2022-08-23T04:32:46Z
error_message: Failed to connect to the remote system - insufficient credentials.
properties:
first_seen:
description: The time when this error was first seen.
example: 2022-07-14T06:59:59Z
type: string
format: date-time
last_seen:
description: The time when this error was most recently seen.
example: 2022-07-14T06:59:59Z
type: string
format: date-time
error_message:
description: The error message associated with the sync error.
example: Failed to connect to the remote system - insufficient credentials.
type: string
app_id:
description: The ID of the app that the error occured for.
example: b5a5ca27-0ea3-4d86-9199-2126d57d1fbd
format: uuid
type: string
required:
- first_seen
- last_seen
- error_message
type: object
securitySchemes:
BearerAuth:
scheme: bearer
Expand Down
84 changes: 84 additions & 0 deletions docs/AppsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**get_app**](AppsApi.md#get_app) | **GET** /apps/{app_id} |
[**get_apps**](AppsApi.md#get_apps) | **GET** /apps |
[**get_sync_errors**](AppsApi.md#get_sync_errors) | **GET** /sync_errors |


# **get_app**
Expand Down Expand Up @@ -169,3 +170,86 @@ Name | Type | Description | Notes

[[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)

# **get_sync_errors**
> List[SyncErrorList] get_sync_errors(app_id=app_id, resource_id=resource_id, group_id=group_id)



Returns a list of recent sync errors that have occurred since the last successful sync.

### Example

* Bearer Authentication (BearerAuth):

```python
import opal_security
from opal_security.models.sync_error_list import SyncErrorList
from opal_security.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal

configuration = opal.Configuration(
host = "https://api.opal.dev/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = opal_security.AppsApi(api_client)
app_id = '29827fb8-f2dd-4e80-9576-28e31e9934ac' # str | The ID of the app to list sync errors for. (optional)
resource_id = '4baf8423-db0a-4037-a4cf-f79c60cb67a5' # str | The ID of the resource to list sync errors for. (optional)
group_id = '9546209c-42c2-4801-96d7-9ec42df0f59c' # str | The ID of the group to list sync errors for. (optional)

try:
api_response = api_instance.get_sync_errors(app_id=app_id, resource_id=resource_id, group_id=group_id)
print("The response of AppsApi->get_sync_errors:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AppsApi->get_sync_errors: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**app_id** | **str**| The ID of the app to list sync errors for. | [optional]
**resource_id** | **str**| The ID of the resource to list sync errors for. | [optional]
**group_id** | **str**| The ID of the group to list sync errors for. | [optional]

### Return type

[**List[SyncErrorList]**](SyncErrorList.md)

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A list of sync errors. | - |

[[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)

33 changes: 33 additions & 0 deletions docs/SyncError.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# SyncError

# SyncError Object ### Description The `SyncError` object is used to represent a sync error. ### Usage Example List from the `GET Sync Errors` endpoint.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**first_seen** | **datetime** | The time when this error was first seen. |
**last_seen** | **datetime** | The time when this error was most recently seen. |
**error_message** | **str** | The error message associated with the sync error. |
**app_id** | **str** | The ID of the app that the error occured for. | [optional]

## Example

```python
from opal_security.models.sync_error import SyncError

# TODO update the JSON string below
json = "{}"
# create an instance of SyncError from a JSON string
sync_error_instance = SyncError.from_json(json)
# print the JSON string representation of the object
print(SyncError.to_json())

# convert the object into a dict
sync_error_dict = sync_error_instance.to_dict()
# create an instance of SyncError from a dict
sync_error_from_dict = SyncError.from_dict(sync_error_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


29 changes: 29 additions & 0 deletions docs/SyncErrorList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# SyncErrorList


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sync_errors** | [**List[SyncError]**](SyncError.md) | |

## Example

```python
from opal_security.models.sync_error_list import SyncErrorList

# TODO update the JSON string below
json = "{}"
# create an instance of SyncErrorList from a JSON string
sync_error_list_instance = SyncErrorList.from_json(json)
# print the JSON string representation of the object
print(SyncErrorList.to_json())

# convert the object into a dict
sync_error_list_dict = sync_error_list_instance.to_dict()
# create an instance of SyncErrorList from a dict
sync_error_list_from_dict = SyncErrorList.from_dict(sync_error_list_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


2 changes: 2 additions & 0 deletions opal_security/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@
from opal_security.models.session import Session
from opal_security.models.sessions_list import SessionsList
from opal_security.models.sub_event import SubEvent
from opal_security.models.sync_error import SyncError
from opal_security.models.sync_error_list import SyncErrorList
from opal_security.models.tag import Tag
from opal_security.models.tag_filter import TagFilter
from opal_security.models.tags_list import TagsList
Expand Down
Loading