5.7 KiB
5.7 KiB
generated.immich.openapi_client.ViewApi
All URIs are relative to https://github.com/api
| Method | HTTP request | Description |
|---|---|---|
| get_assets_by_original_path | GET /view/folder | |
| get_unique_original_paths | GET /view/folder/unique-paths |
get_assets_by_original_path
List[AssetResponseDto] get_assets_by_original_path(path)
Example
- Api Key Authentication (cookie):
- Api Key Authentication (api_key):
- Bearer (JWT) Authentication (bearer):
import generated.immich.openapi_client
from generated.immich.openapi_client.models.asset_response_dto import AssetResponseDto
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/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: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.ViewApi(api_client)
path = 'path_example' # str |
try:
api_response = api_instance.get_assets_by_original_path(path)
print("The response of ViewApi->get_assets_by_original_path:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ViewApi->get_assets_by_original_path: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| path | str |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_unique_original_paths
List[str] get_unique_original_paths()
Example
- Api Key Authentication (cookie):
- Api Key Authentication (api_key):
- Bearer (JWT) Authentication (bearer):
import generated.immich.openapi_client
from generated.immich.openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://github.com/api
# See configuration.py for a list of all supported configuration parameters.
configuration = generated.immich.openapi_client.Configuration(
host = "https://github.com/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: cookie
configuration.api_key['cookie'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['cookie'] = 'Bearer'
# Configure API key authorization: api_key
configuration.api_key['api_key'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api_key'] = 'Bearer'
# Configure Bearer authorization (JWT): bearer
configuration = generated.immich.openapi_client.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Enter a context with an instance of the API client
with generated.immich.openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = generated.immich.openapi_client.ViewApi(api_client)
try:
api_response = api_instance.get_unique_original_paths()
print("The response of ViewApi->get_unique_original_paths:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ViewApi->get_unique_original_paths: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
List[str]
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]