Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update detector #244

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 8 additions & 0 deletions generated/.openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ docs/AnnotationsRequestedEnum.md
docs/BBoxGeometry.md
docs/BBoxGeometryRequest.md
docs/BinaryClassificationResult.md
docs/BlankEnum.md
docs/ChannelEnum.md
docs/Condition.md
docs/ConditionRequest.md
Expand All @@ -22,6 +23,7 @@ docs/DetectorGroupsApi.md
docs/DetectorResetApi.md
docs/DetectorTypeEnum.md
docs/DetectorsApi.md
docs/EscalationTypeEnum.md
docs/ImageQueriesApi.md
docs/ImageQuery.md
docs/ImageQueryTypeEnum.md
Expand All @@ -36,13 +38,15 @@ docs/NotesApi.md
docs/PaginatedDetectorList.md
docs/PaginatedImageQueryList.md
docs/PaginatedRuleList.md
docs/PatchedDetectorRequest.md
docs/ROI.md
docs/ROIRequest.md
docs/ResultTypeEnum.md
docs/Rule.md
docs/RuleRequest.md
docs/SnoozeTimeUnitEnum.md
docs/SourceEnum.md
docs/StatusEnum.md
docs/UserApi.md
docs/VerbEnum.md
git_push.sh
Expand All @@ -68,6 +72,7 @@ groundlight_openapi_client/model/annotations_requested_enum.py
groundlight_openapi_client/model/b_box_geometry.py
groundlight_openapi_client/model/b_box_geometry_request.py
groundlight_openapi_client/model/binary_classification_result.py
groundlight_openapi_client/model/blank_enum.py
groundlight_openapi_client/model/channel_enum.py
groundlight_openapi_client/model/condition.py
groundlight_openapi_client/model/condition_request.py
Expand All @@ -77,6 +82,7 @@ groundlight_openapi_client/model/detector_creation_input_request.py
groundlight_openapi_client/model/detector_group.py
groundlight_openapi_client/model/detector_group_request.py
groundlight_openapi_client/model/detector_type_enum.py
groundlight_openapi_client/model/escalation_type_enum.py
groundlight_openapi_client/model/image_query.py
groundlight_openapi_client/model/image_query_type_enum.py
groundlight_openapi_client/model/inline_response200.py
Expand All @@ -88,13 +94,15 @@ groundlight_openapi_client/model/note_request.py
groundlight_openapi_client/model/paginated_detector_list.py
groundlight_openapi_client/model/paginated_image_query_list.py
groundlight_openapi_client/model/paginated_rule_list.py
groundlight_openapi_client/model/patched_detector_request.py
groundlight_openapi_client/model/result_type_enum.py
groundlight_openapi_client/model/roi.py
groundlight_openapi_client/model/roi_request.py
groundlight_openapi_client/model/rule.py
groundlight_openapi_client/model/rule_request.py
groundlight_openapi_client/model/snooze_time_unit_enum.py
groundlight_openapi_client/model/source_enum.py
groundlight_openapi_client/model/status_enum.py
groundlight_openapi_client/model/verb_enum.py
groundlight_openapi_client/model_utils.py
groundlight_openapi_client/models/__init__.py
Expand Down
7 changes: 5 additions & 2 deletions generated/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,10 @@ Class | Method | HTTP request | Description
*DetectorGroupsApi* | [**get_detector_groups**](docs/DetectorGroupsApi.md#get_detector_groups) | **GET** /v1/detector-groups |
*DetectorResetApi* | [**reset_detector**](docs/DetectorResetApi.md#reset_detector) | **DELETE** /v1/detector-reset/{id} |
*DetectorsApi* | [**create_detector**](docs/DetectorsApi.md#create_detector) | **POST** /v1/detectors |
*DetectorsApi* | [**create_detector_group2**](docs/DetectorsApi.md#create_detector_group2) | **POST** /v1/detectors/detector-groups |
*DetectorsApi* | [**delete_detector**](docs/DetectorsApi.md#delete_detector) | **DELETE** /v1/detectors/{id} |
*DetectorsApi* | [**get_detector**](docs/DetectorsApi.md#get_detector) | **GET** /v1/detectors/{id} |
*DetectorsApi* | [**get_detector_groups2**](docs/DetectorsApi.md#get_detector_groups2) | **GET** /v1/detectors/detector-groups |
*DetectorsApi* | [**list_detectors**](docs/DetectorsApi.md#list_detectors) | **GET** /v1/detectors |
*DetectorsApi* | [**update_detector**](docs/DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} |
*ImageQueriesApi* | [**get_image**](docs/ImageQueriesApi.md#get_image) | **GET** /v1/image-queries/{id}/image |
*ImageQueriesApi* | [**get_image_query**](docs/ImageQueriesApi.md#get_image_query) | **GET** /v1/image-queries/{id} |
*ImageQueriesApi* | [**list_image_queries**](docs/ImageQueriesApi.md#list_image_queries) | **GET** /v1/image-queries |
Expand All @@ -142,6 +141,7 @@ Class | Method | HTTP request | Description
- [BBoxGeometry](docs/BBoxGeometry.md)
- [BBoxGeometryRequest](docs/BBoxGeometryRequest.md)
- [BinaryClassificationResult](docs/BinaryClassificationResult.md)
- [BlankEnum](docs/BlankEnum.md)
- [ChannelEnum](docs/ChannelEnum.md)
- [Condition](docs/Condition.md)
- [ConditionRequest](docs/ConditionRequest.md)
Expand All @@ -151,6 +151,7 @@ Class | Method | HTTP request | Description
- [DetectorGroup](docs/DetectorGroup.md)
- [DetectorGroupRequest](docs/DetectorGroupRequest.md)
- [DetectorTypeEnum](docs/DetectorTypeEnum.md)
- [EscalationTypeEnum](docs/EscalationTypeEnum.md)
- [ImageQuery](docs/ImageQuery.md)
- [ImageQueryTypeEnum](docs/ImageQueryTypeEnum.md)
- [InlineResponse200](docs/InlineResponse200.md)
Expand All @@ -162,13 +163,15 @@ Class | Method | HTTP request | Description
- [PaginatedDetectorList](docs/PaginatedDetectorList.md)
- [PaginatedImageQueryList](docs/PaginatedImageQueryList.md)
- [PaginatedRuleList](docs/PaginatedRuleList.md)
- [PatchedDetectorRequest](docs/PatchedDetectorRequest.md)
- [ROI](docs/ROI.md)
- [ROIRequest](docs/ROIRequest.md)
- [ResultTypeEnum](docs/ResultTypeEnum.md)
- [Rule](docs/Rule.md)
- [RuleRequest](docs/RuleRequest.md)
- [SnoozeTimeUnitEnum](docs/SnoozeTimeUnitEnum.md)
- [SourceEnum](docs/SourceEnum.md)
- [StatusEnum](docs/StatusEnum.md)
- [VerbEnum](docs/VerbEnum.md)


Expand Down
2 changes: 2 additions & 0 deletions generated/docs/Detector.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ Name | Type | Description | Notes
**mode_configuration** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | | [readonly]
**confidence_threshold** | **float** | If the detector's prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9
**patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0
**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**escalation_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
17 changes: 17 additions & 0 deletions generated/docs/DetectorRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# DetectorRequest

Spec for serializing a detector object in the public API.

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | A short, descriptive name for the detector. |
**confidence_threshold** | **float** | If the detector's prediction is below this confidence threshold, send the image query for human review. | [optional] if omitted the server will use the default value of 0.9
**patience_time** | **float** | How long Groundlight will attempt to generate a confident prediction | [optional] if omitted the server will use the default value of 30.0
**status** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**escalation_type** | **bool, date, datetime, dict, float, int, list, str, none_type** | Category that define internal proccess for labeling image queries * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | [optional]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

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


146 changes: 43 additions & 103 deletions generated/docs/DetectorsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@ All URIs are relative to *https://api.groundlight.ai/device-api*
Method | HTTP request | Description
------------- | ------------- | -------------
[**create_detector**](DetectorsApi.md#create_detector) | **POST** /v1/detectors |
[**create_detector_group2**](DetectorsApi.md#create_detector_group2) | **POST** /v1/detectors/detector-groups |
[**delete_detector**](DetectorsApi.md#delete_detector) | **DELETE** /v1/detectors/{id} |
[**get_detector**](DetectorsApi.md#get_detector) | **GET** /v1/detectors/{id} |
[**get_detector_groups2**](DetectorsApi.md#get_detector_groups2) | **GET** /v1/detectors/detector-groups |
[**list_detectors**](DetectorsApi.md#list_detectors) | **GET** /v1/detectors |
[**update_detector**](DetectorsApi.md#update_detector) | **PATCH** /v1/detectors/{id} |


# **create_detector**
Expand Down Expand Up @@ -92,86 +91,6 @@ Name | Type | Description | Notes
- **Accept**: application/json


### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | | - |

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

# **create_detector_group2**
> DetectorGroup create_detector_group2(detector_group_request)



Create a new detector group POST data: Required: - name (str) - name of the predictor set

### Example

* Api Key Authentication (ApiToken):

```python
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import detectors_api
from groundlight_openapi_client.model.detector_group_request import DetectorGroupRequest
from groundlight_openapi_client.model.detector_group import DetectorGroup
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
configuration = groundlight_openapi_client.Configuration(
host = "https://api.groundlight.ai/device-api"
)

# 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 API key authorization: ApiToken
configuration.api_key['ApiToken'] = 'YOUR_API_KEY'

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiToken'] = 'Bearer'

# Enter a context with an instance of the API client
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = detectors_api.DetectorsApi(api_client)
detector_group_request = DetectorGroupRequest(
name="name_example",
) # DetectorGroupRequest |

# example passing only required values which don't have defaults set
try:
api_response = api_instance.create_detector_group2(detector_group_request)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling DetectorsApi->create_detector_group2: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**detector_group_request** | [**DetectorGroupRequest**](DetectorGroupRequest.md)| |

### Return type

[**DetectorGroup**](DetectorGroup.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
- **Accept**: application/json


### HTTP response details

| Status code | Description | Response headers |
Expand Down Expand Up @@ -332,12 +251,12 @@ 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_detector_groups2**
> [DetectorGroup] get_detector_groups2()
# **list_detectors**
> PaginatedDetectorList list_detectors()



List all detector groups
Retrieve a list of detectors.

### Example

Expand All @@ -347,7 +266,7 @@ List all detector groups
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import detectors_api
from groundlight_openapi_client.model.detector_group import DetectorGroup
from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
Expand All @@ -370,22 +289,29 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = detectors_api.DetectorsApi(api_client)
page = 1 # int | A page number within the paginated result set. (optional)
page_size = 1 # int | Number of items to return per page. (optional)

# example, this endpoint has no required or optional parameters
# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.get_detector_groups2()
api_response = api_instance.list_detectors(page=page, page_size=page_size)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling DetectorsApi->get_detector_groups2: %s\n" % e)
print("Exception when calling DetectorsApi->list_detectors: %s\n" % e)
```


### Parameters
This endpoint does not need any parameter.

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int**| A page number within the paginated result set. | [optional]
**page_size** | **int**| Number of items to return per page. | [optional]

### Return type

[**[DetectorGroup]**](DetectorGroup.md)
[**PaginatedDetectorList**](PaginatedDetectorList.md)

### Authorization

Expand All @@ -405,12 +331,12 @@ This endpoint does not need any parameter.

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

# **list_detectors**
> PaginatedDetectorList list_detectors()
# **update_detector**
> Detector update_detector(id)



Retrieve a list of detectors.
Update a detector

### Example

Expand All @@ -420,7 +346,8 @@ Retrieve a list of detectors.
import time
import groundlight_openapi_client
from groundlight_openapi_client.api import detectors_api
from groundlight_openapi_client.model.paginated_detector_list import PaginatedDetectorList
from groundlight_openapi_client.model.detector import Detector
from groundlight_openapi_client.model.patched_detector_request import PatchedDetectorRequest
from pprint import pprint
# Defining the host is optional and defaults to https://api.groundlight.ai/device-api
# See configuration.py for a list of all supported configuration parameters.
Expand All @@ -443,37 +370,50 @@ configuration.api_key['ApiToken'] = 'YOUR_API_KEY'
with groundlight_openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = detectors_api.DetectorsApi(api_client)
page = 1 # int | A page number within the paginated result set. (optional)
page_size = 1 # int | Number of items to return per page. (optional)
id = "id_example" # str |
patched_detector_request = PatchedDetectorRequest(
name="name_example",
confidence_threshold=0.9,
patience_time=30.0,
status=None,
escalation_type=None,
) # PatchedDetectorRequest | (optional)

# example passing only required values which don't have defaults set
try:
api_response = api_instance.update_detector(id)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling DetectorsApi->update_detector: %s\n" % e)

# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.list_detectors(page=page, page_size=page_size)
api_response = api_instance.update_detector(id, patched_detector_request=patched_detector_request)
pprint(api_response)
except groundlight_openapi_client.ApiException as e:
print("Exception when calling DetectorsApi->list_detectors: %s\n" % e)
print("Exception when calling DetectorsApi->update_detector: %s\n" % e)
```


### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**page** | **int**| A page number within the paginated result set. | [optional]
**page_size** | **int**| Number of items to return per page. | [optional]
**id** | **str**| |
**patched_detector_request** | [**PatchedDetectorRequest**](PatchedDetectorRequest.md)| | [optional]

### Return type

[**PaginatedDetectorList**](PaginatedDetectorList.md)
[**Detector**](Detector.md)

### Authorization

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

### HTTP request headers

- **Content-Type**: Not defined
- **Content-Type**: application/json, application/x-www-form-urlencoded, multipart/form-data
- **Accept**: application/json


Expand Down
12 changes: 12 additions & 0 deletions generated/docs/EscalationTypeEnum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EscalationTypeEnum

* `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | * `STANDARD` - STANDARD * `NO_HUMAN_LABELING` - NO_HUMAN_LABELING | must be one of ["STANDARD", "NO_HUMAN_LABELING", ]

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


Loading
Loading