[TASK] (untested) Updated API to work with Immich 3.0
This commit is contained in:
@@ -4,15 +4,19 @@ All URIs are relative to *https://github.com/api*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**create_face**](FacesApi.md#create_face) | **POST** /faces |
|
||||
[**delete_face**](FacesApi.md#delete_face) | **DELETE** /faces/{id} |
|
||||
[**get_faces**](FacesApi.md#get_faces) | **GET** /faces |
|
||||
[**reassign_faces_by_id**](FacesApi.md#reassign_faces_by_id) | **PUT** /faces/{id} |
|
||||
[**create_face**](FacesApi.md#create_face) | **POST** /faces | Create a face
|
||||
[**delete_face**](FacesApi.md#delete_face) | **DELETE** /faces/{id} | Delete a face
|
||||
[**get_faces**](FacesApi.md#get_faces) | **GET** /faces | Retrieve faces for asset
|
||||
[**reassign_faces_by_id**](FacesApi.md#reassign_faces_by_id) | **PUT** /faces/{id} | Re-assign a face to another person
|
||||
|
||||
|
||||
# **create_face**
|
||||
> create_face(asset_face_create_dto)
|
||||
|
||||
Create a face
|
||||
|
||||
Create a new face that has not been discovered by facial recognition. The content of the bounding box is considered a face.
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (cookie):
|
||||
@@ -60,6 +64,7 @@ with generated.immich.openapi_client.ApiClient(configuration) as api_client:
|
||||
asset_face_create_dto = generated.immich.openapi_client.AssetFaceCreateDto() # AssetFaceCreateDto |
|
||||
|
||||
try:
|
||||
# Create a face
|
||||
api_instance.create_face(asset_face_create_dto)
|
||||
except Exception as e:
|
||||
print("Exception when calling FacesApi->create_face: %s\n" % e)
|
||||
@@ -98,6 +103,10 @@ void (empty response body)
|
||||
# **delete_face**
|
||||
> delete_face(id, asset_face_delete_dto)
|
||||
|
||||
Delete a face
|
||||
|
||||
Delete a face identified by the id. Optionally can be force deleted.
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (cookie):
|
||||
@@ -142,10 +151,11 @@ configuration = generated.immich.openapi_client.Configuration(
|
||||
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = generated.immich.openapi_client.FacesApi(api_client)
|
||||
id = 'id_example' # str |
|
||||
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
|
||||
asset_face_delete_dto = generated.immich.openapi_client.AssetFaceDeleteDto() # AssetFaceDeleteDto |
|
||||
|
||||
try:
|
||||
# Delete a face
|
||||
api_instance.delete_face(id, asset_face_delete_dto)
|
||||
except Exception as e:
|
||||
print("Exception when calling FacesApi->delete_face: %s\n" % e)
|
||||
@@ -158,7 +168,7 @@ with generated.immich.openapi_client.ApiClient(configuration) as api_client:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| |
|
||||
**id** | **UUID**| |
|
||||
**asset_face_delete_dto** | [**AssetFaceDeleteDto**](AssetFaceDeleteDto.md)| |
|
||||
|
||||
### Return type
|
||||
@@ -178,13 +188,17 @@ void (empty response body)
|
||||
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
**200** | | - |
|
||||
**204** | | - |
|
||||
|
||||
[[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_faces**
|
||||
> List[AssetFaceResponseDto] get_faces(id)
|
||||
|
||||
Retrieve faces for asset
|
||||
|
||||
Retrieve all faces belonging to an asset.
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (cookie):
|
||||
@@ -229,9 +243,10 @@ configuration = generated.immich.openapi_client.Configuration(
|
||||
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = generated.immich.openapi_client.FacesApi(api_client)
|
||||
id = 'id_example' # str |
|
||||
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Face ID
|
||||
|
||||
try:
|
||||
# Retrieve faces for asset
|
||||
api_response = api_instance.get_faces(id)
|
||||
print("The response of FacesApi->get_faces:\n")
|
||||
pprint(api_response)
|
||||
@@ -246,7 +261,7 @@ with generated.immich.openapi_client.ApiClient(configuration) as api_client:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| |
|
||||
**id** | **UUID**| Face ID |
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -272,6 +287,10 @@ Name | Type | Description | Notes
|
||||
# **reassign_faces_by_id**
|
||||
> PersonResponseDto reassign_faces_by_id(id, face_dto)
|
||||
|
||||
Re-assign a face to another person
|
||||
|
||||
Re-assign the face provided in the body to the person identified by the id in the path parameter.
|
||||
|
||||
### Example
|
||||
|
||||
* Api Key Authentication (cookie):
|
||||
@@ -317,10 +336,11 @@ configuration = generated.immich.openapi_client.Configuration(
|
||||
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
|
||||
# Create an instance of the API class
|
||||
api_instance = generated.immich.openapi_client.FacesApi(api_client)
|
||||
id = 'id_example' # str |
|
||||
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
|
||||
face_dto = generated.immich.openapi_client.FaceDto() # FaceDto |
|
||||
|
||||
try:
|
||||
# Re-assign a face to another person
|
||||
api_response = api_instance.reassign_faces_by_id(id, face_dto)
|
||||
print("The response of FacesApi->reassign_faces_by_id:\n")
|
||||
pprint(api_response)
|
||||
@@ -335,7 +355,7 @@ with generated.immich.openapi_client.ApiClient(configuration) as api_client:
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**id** | **str**| |
|
||||
**id** | **UUID**| |
|
||||
**face_dto** | [**FaceDto**](FaceDto.md)| |
|
||||
|
||||
### Return type
|
||||
|
||||
Reference in New Issue
Block a user