Files
immich-to-cloud-exporter/generated/immich/openapi_client/docs/AssetsApi.md
T

85 KiB

generated.immich.openapi_client.AssetsApi

All URIs are relative to https://github.com/api

Method HTTP request Description
check_bulk_upload POST /assets/bulk-upload-check Check bulk upload
copy_asset PUT /assets/copy Copy asset
delete_asset_metadata DELETE /assets/{id}/metadata/{key} Delete asset metadata by key
delete_assets DELETE /assets Delete assets
delete_bulk_asset_metadata DELETE /assets/metadata Delete asset metadata
download_asset GET /assets/{id}/original Download original asset
edit_asset PUT /assets/{id}/edits Apply edits to an existing asset
end_session DELETE /assets/{id}/video/stream/{sessionId} End HLS streaming session
get_asset_edits GET /assets/{id}/edits Retrieve edits for an existing asset
get_asset_info GET /assets/{id} Retrieve an asset
get_asset_metadata GET /assets/{id}/metadata Get asset metadata
get_asset_metadata_by_key GET /assets/{id}/metadata/{key} Retrieve asset metadata by key
get_asset_ocr GET /assets/{id}/ocr Retrieve asset OCR data
get_asset_statistics GET /assets/statistics Get asset statistics
get_main_playlist GET /assets/{id}/video/stream/main.m3u8 Get HLS main playlist
get_media_playlist GET /assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8 Get HLS media playlist
get_segment GET /assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename} Get HLS segment or init file
play_asset_video GET /assets/{id}/video/playback Play asset video
remove_asset_edits DELETE /assets/{id}/edits Remove edits from an existing asset
run_asset_jobs POST /assets/jobs Run an asset job
update_asset PUT /assets/{id} Update an asset
update_asset_metadata PUT /assets/{id}/metadata Update asset metadata
update_assets PUT /assets Update assets
update_bulk_asset_metadata PUT /assets/metadata Upsert asset metadata
upload_asset POST /assets Upload asset
view_asset GET /assets/{id}/thumbnail View asset thumbnail

check_bulk_upload

AssetBulkUploadCheckResponseDto check_bulk_upload(asset_bulk_upload_check_dto)

Check bulk upload

Determine which assets have already been uploaded to the server based on their SHA1 checksums.

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_bulk_upload_check_dto import AssetBulkUploadCheckDto
from generated.immich.openapi_client.models.asset_bulk_upload_check_response_dto import AssetBulkUploadCheckResponseDto
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.AssetsApi(api_client)
    asset_bulk_upload_check_dto = generated.immich.openapi_client.AssetBulkUploadCheckDto() # AssetBulkUploadCheckDto | 

    try:
        # Check bulk upload
        api_response = api_instance.check_bulk_upload(asset_bulk_upload_check_dto)
        print("The response of AssetsApi->check_bulk_upload:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->check_bulk_upload: %s\n" % e)

Parameters

Name Type Description Notes
asset_bulk_upload_check_dto AssetBulkUploadCheckDto

Return type

AssetBulkUploadCheckResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • 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]

copy_asset

copy_asset(asset_copy_dto)

Copy asset

Copy asset information like albums, tags, etc. from one asset to another.

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_copy_dto import AssetCopyDto
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.AssetsApi(api_client)
    asset_copy_dto = generated.immich.openapi_client.AssetCopyDto() # AssetCopyDto | 

    try:
        # Copy asset
        api_instance.copy_asset(asset_copy_dto)
    except Exception as e:
        print("Exception when calling AssetsApi->copy_asset: %s\n" % e)

Parameters

Name Type Description Notes
asset_copy_dto AssetCopyDto

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_asset_metadata

delete_asset_metadata(id, key)

Delete asset metadata by key

Delete a specific metadata key-value pair associated with the specified asset.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Asset ID
    key = 'key_example' # str | Metadata key

    try:
        # Delete asset metadata by key
        api_instance.delete_asset_metadata(id, key)
    except Exception as e:
        print("Exception when calling AssetsApi->delete_asset_metadata: %s\n" % e)

Parameters

Name Type Description Notes
id UUID Asset ID
key str Metadata key

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_assets

delete_assets(asset_bulk_delete_dto)

Delete assets

Deletes multiple assets at the same time.

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_bulk_delete_dto import AssetBulkDeleteDto
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.AssetsApi(api_client)
    asset_bulk_delete_dto = generated.immich.openapi_client.AssetBulkDeleteDto() # AssetBulkDeleteDto | 

    try:
        # Delete assets
        api_instance.delete_assets(asset_bulk_delete_dto)
    except Exception as e:
        print("Exception when calling AssetsApi->delete_assets: %s\n" % e)

Parameters

Name Type Description Notes
asset_bulk_delete_dto AssetBulkDeleteDto

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_bulk_asset_metadata

delete_bulk_asset_metadata(asset_metadata_bulk_delete_dto)

Delete asset metadata

Delete metadata key-value pairs for multiple assets.

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_metadata_bulk_delete_dto import AssetMetadataBulkDeleteDto
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.AssetsApi(api_client)
    asset_metadata_bulk_delete_dto = generated.immich.openapi_client.AssetMetadataBulkDeleteDto() # AssetMetadataBulkDeleteDto | 

    try:
        # Delete asset metadata
        api_instance.delete_bulk_asset_metadata(asset_metadata_bulk_delete_dto)
    except Exception as e:
        print("Exception when calling AssetsApi->delete_bulk_asset_metadata: %s\n" % e)

Parameters

Name Type Description Notes
asset_metadata_bulk_delete_dto AssetMetadataBulkDeleteDto

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

download_asset

bytearray download_asset(id, edited=edited, key=key, slug=slug)

Download original asset

Downloads the original file of the specified asset.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    edited = False # bool | Return edited asset if available (optional) (default to False)
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # Download original asset
        api_response = api_instance.download_asset(id, edited=edited, key=key, slug=slug)
        print("The response of AssetsApi->download_asset:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->download_asset: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
edited bool Return edited asset if available [optional] [default to False]
key str [optional]
slug str [optional]

Return type

bytearray

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

edit_asset

AssetEditsResponseDto edit_asset(id, asset_edits_create_dto)

Apply edits to an existing asset

Apply a series of edit actions (crop, rotate, mirror) to the specified asset.

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_edits_create_dto import AssetEditsCreateDto
from generated.immich.openapi_client.models.asset_edits_response_dto import AssetEditsResponseDto
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    asset_edits_create_dto = generated.immich.openapi_client.AssetEditsCreateDto() # AssetEditsCreateDto | 

    try:
        # Apply edits to an existing asset
        api_response = api_instance.edit_asset(id, asset_edits_create_dto)
        print("The response of AssetsApi->edit_asset:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->edit_asset: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
asset_edits_create_dto AssetEditsCreateDto

Return type

AssetEditsResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • 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]

end_session

end_session(id, session_id, key=key, slug=slug)

End HLS streaming session

Releases server resources for the streaming session.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    session_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # End HLS streaming session
        api_instance.end_session(id, session_id, key=key, slug=slug)
    except Exception as e:
        print("Exception when calling AssetsApi->end_session: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
session_id UUID
key str [optional]
slug str [optional]

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_asset_edits

AssetEditsResponseDto get_asset_edits(id)

Retrieve edits for an existing asset

Retrieve a series of edit actions (crop, rotate, mirror) associated with the specified asset.

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_edits_response_dto import AssetEditsResponseDto
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 

    try:
        # Retrieve edits for an existing asset
        api_response = api_instance.get_asset_edits(id)
        print("The response of AssetsApi->get_asset_edits:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_asset_edits: %s\n" % e)

Parameters

Name Type Description Notes
id UUID

Return type

AssetEditsResponseDto

Authorization

cookie, api_key, bearer

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_asset_info

AssetResponseDto get_asset_info(id, key=key, slug=slug)

Retrieve an asset

Retrieve detailed information about a specific asset.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # Retrieve an asset
        api_response = api_instance.get_asset_info(id, key=key, slug=slug)
        print("The response of AssetsApi->get_asset_info:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_asset_info: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
key str [optional]
slug str [optional]

Return type

AssetResponseDto

Authorization

cookie, api_key, bearer

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_asset_metadata

List[AssetMetadataResponseDto] get_asset_metadata(id)

Get asset metadata

Retrieve all metadata key-value pairs associated with the specified asset.

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_metadata_response_dto import AssetMetadataResponseDto
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 

    try:
        # Get asset metadata
        api_response = api_instance.get_asset_metadata(id)
        print("The response of AssetsApi->get_asset_metadata:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_asset_metadata: %s\n" % e)

Parameters

Name Type Description Notes
id UUID

Return type

List[AssetMetadataResponseDto]

Authorization

cookie, api_key, bearer

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_asset_metadata_by_key

AssetMetadataResponseDto get_asset_metadata_by_key(id, key)

Retrieve asset metadata by key

Retrieve the value of a specific metadata key associated with the specified asset.

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_metadata_response_dto import AssetMetadataResponseDto
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Asset ID
    key = 'key_example' # str | Metadata key

    try:
        # Retrieve asset metadata by key
        api_response = api_instance.get_asset_metadata_by_key(id, key)
        print("The response of AssetsApi->get_asset_metadata_by_key:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_asset_metadata_by_key: %s\n" % e)

Parameters

Name Type Description Notes
id UUID Asset ID
key str Metadata key

Return type

AssetMetadataResponseDto

Authorization

cookie, api_key, bearer

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_asset_ocr

List[AssetOcrResponseDto] get_asset_ocr(id)

Retrieve asset OCR data

Retrieve all OCR (Optical Character Recognition) data associated with the specified asset.

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_ocr_response_dto import AssetOcrResponseDto
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 

    try:
        # Retrieve asset OCR data
        api_response = api_instance.get_asset_ocr(id)
        print("The response of AssetsApi->get_asset_ocr:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_asset_ocr: %s\n" % e)

Parameters

Name Type Description Notes
id UUID

Return type

List[AssetOcrResponseDto]

Authorization

cookie, api_key, bearer

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_asset_statistics

AssetStatsResponseDto get_asset_statistics(is_favorite=is_favorite, is_trashed=is_trashed, visibility=visibility)

Get asset statistics

Retrieve various statistics about the assets owned by the authenticated user.

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_stats_response_dto import AssetStatsResponseDto
from generated.immich.openapi_client.models.asset_visibility import AssetVisibility
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.AssetsApi(api_client)
    is_favorite = True # bool | Filter by favorite status (optional)
    is_trashed = True # bool | Filter by trash status (optional)
    visibility = generated.immich.openapi_client.AssetVisibility() # AssetVisibility |  (optional)

    try:
        # Get asset statistics
        api_response = api_instance.get_asset_statistics(is_favorite=is_favorite, is_trashed=is_trashed, visibility=visibility)
        print("The response of AssetsApi->get_asset_statistics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_asset_statistics: %s\n" % e)

Parameters

Name Type Description Notes
is_favorite bool Filter by favorite status [optional]
is_trashed bool Filter by trash status [optional]
visibility AssetVisibility [optional]

Return type

AssetStatsResponseDto

Authorization

cookie, api_key, bearer

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_main_playlist

str get_main_playlist(id, key=key, slug=slug)

Get HLS main playlist

Returns an HLS main playlist with all available variants for the asset.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # Get HLS main playlist
        api_response = api_instance.get_main_playlist(id, key=key, slug=slug)
        print("The response of AssetsApi->get_main_playlist:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_main_playlist: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
key str [optional]
slug str [optional]

Return type

str

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.apple.mpegurl

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_media_playlist

str get_media_playlist(id, session_id, variant_index, key=key, slug=slug, x_immich_hls_pos=x_immich_hls_pos)

Get HLS media playlist

Returns an HLS media playlist for one variant of the streaming session.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    session_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    variant_index = 56 # int | 
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)
    x_immich_hls_pos = 3.4 # float |  (optional)

    try:
        # Get HLS media playlist
        api_response = api_instance.get_media_playlist(id, session_id, variant_index, key=key, slug=slug, x_immich_hls_pos=x_immich_hls_pos)
        print("The response of AssetsApi->get_media_playlist:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_media_playlist: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
session_id UUID
variant_index int
key str [optional]
slug str [optional]
x_immich_hls_pos float [optional]

Return type

str

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/vnd.apple.mpegurl

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_segment

bytearray get_segment(filename, id, session_id, variant_index, key=key, slug=slug, x_immich_hls_msn=x_immich_hls_msn)

Get HLS segment or init file

Streams an HLS init segment (init.mp4) or media segment (seg_N.m4s).

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.AssetsApi(api_client)
    filename = 'filename_example' # str | 
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    session_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    variant_index = 56 # int | 
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)
    x_immich_hls_msn = 56 # int |  (optional)

    try:
        # Get HLS segment or init file
        api_response = api_instance.get_segment(filename, id, session_id, variant_index, key=key, slug=slug, x_immich_hls_msn=x_immich_hls_msn)
        print("The response of AssetsApi->get_segment:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->get_segment: %s\n" % e)

Parameters

Name Type Description Notes
filename str
id UUID
session_id UUID
variant_index int
key str [optional]
slug str [optional]
x_immich_hls_msn int [optional]

Return type

bytearray

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

play_asset_video

bytearray play_asset_video(id, key=key, slug=slug)

Play asset video

Streams the video file for the specified asset. This endpoint also supports byte range requests.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # Play asset video
        api_response = api_instance.play_asset_video(id, key=key, slug=slug)
        print("The response of AssetsApi->play_asset_video:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->play_asset_video: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
key str [optional]
slug str [optional]

Return type

bytearray

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

remove_asset_edits

remove_asset_edits(id)

Remove edits from an existing asset

Removes all edit actions (crop, rotate, mirror) associated with the specified asset.

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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 

    try:
        # Remove edits from an existing asset
        api_instance.remove_asset_edits(id)
    except Exception as e:
        print("Exception when calling AssetsApi->remove_asset_edits: %s\n" % e)

Parameters

Name Type Description Notes
id UUID

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

run_asset_jobs

run_asset_jobs(asset_jobs_dto)

Run an asset job

Run a specific job on a set of assets.

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_jobs_dto import AssetJobsDto
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.AssetsApi(api_client)
    asset_jobs_dto = generated.immich.openapi_client.AssetJobsDto() # AssetJobsDto | 

    try:
        # Run an asset job
        api_instance.run_asset_jobs(asset_jobs_dto)
    except Exception as e:
        print("Exception when calling AssetsApi->run_asset_jobs: %s\n" % e)

Parameters

Name Type Description Notes
asset_jobs_dto AssetJobsDto

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_asset

AssetResponseDto update_asset(id, update_asset_dto)

Update an asset

Update information of a specific asset.

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.models.update_asset_dto import UpdateAssetDto
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    update_asset_dto = generated.immich.openapi_client.UpdateAssetDto() # UpdateAssetDto | 

    try:
        # Update an asset
        api_response = api_instance.update_asset(id, update_asset_dto)
        print("The response of AssetsApi->update_asset:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->update_asset: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
update_asset_dto UpdateAssetDto

Return type

AssetResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • 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]

update_asset_metadata

List[AssetMetadataResponseDto] update_asset_metadata(id, asset_metadata_upsert_dto)

Update asset metadata

Update or add metadata key-value pairs for the specified asset.

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_metadata_response_dto import AssetMetadataResponseDto
from generated.immich.openapi_client.models.asset_metadata_upsert_dto import AssetMetadataUpsertDto
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    asset_metadata_upsert_dto = generated.immich.openapi_client.AssetMetadataUpsertDto() # AssetMetadataUpsertDto | 

    try:
        # Update asset metadata
        api_response = api_instance.update_asset_metadata(id, asset_metadata_upsert_dto)
        print("The response of AssetsApi->update_asset_metadata:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->update_asset_metadata: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
asset_metadata_upsert_dto AssetMetadataUpsertDto

Return type

List[AssetMetadataResponseDto]

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • 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]

update_assets

update_assets(asset_bulk_update_dto)

Update assets

Updates multiple assets at the same time.

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_bulk_update_dto import AssetBulkUpdateDto
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.AssetsApi(api_client)
    asset_bulk_update_dto = generated.immich.openapi_client.AssetBulkUpdateDto() # AssetBulkUpdateDto | 

    try:
        # Update assets
        api_instance.update_assets(asset_bulk_update_dto)
    except Exception as e:
        print("Exception when calling AssetsApi->update_assets: %s\n" % e)

Parameters

Name Type Description Notes
asset_bulk_update_dto AssetBulkUpdateDto

Return type

void (empty response body)

Authorization

cookie, api_key, bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_bulk_asset_metadata

List[AssetMetadataBulkResponseDto] update_bulk_asset_metadata(asset_metadata_bulk_upsert_dto)

Upsert asset metadata

Upsert metadata key-value pairs for multiple assets.

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_metadata_bulk_response_dto import AssetMetadataBulkResponseDto
from generated.immich.openapi_client.models.asset_metadata_bulk_upsert_dto import AssetMetadataBulkUpsertDto
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.AssetsApi(api_client)
    asset_metadata_bulk_upsert_dto = generated.immich.openapi_client.AssetMetadataBulkUpsertDto() # AssetMetadataBulkUpsertDto | 

    try:
        # Upsert asset metadata
        api_response = api_instance.update_bulk_asset_metadata(asset_metadata_bulk_upsert_dto)
        print("The response of AssetsApi->update_bulk_asset_metadata:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->update_bulk_asset_metadata: %s\n" % e)

Parameters

Name Type Description Notes
asset_metadata_bulk_upsert_dto AssetMetadataBulkUpsertDto

Return type

List[AssetMetadataBulkResponseDto]

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: application/json
  • 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]

upload_asset

AssetMediaResponseDto upload_asset(asset_data, file_created_at, file_modified_at, key=key, slug=slug, x_immich_checksum=x_immich_checksum, duration=duration, filename=filename, is_favorite=is_favorite, live_photo_video_id=live_photo_video_id, metadata=metadata, sidecar_data=sidecar_data, visibility=visibility)

Upload asset

Uploads a new asset to the server.

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_media_response_dto import AssetMediaResponseDto
from generated.immich.openapi_client.models.asset_metadata_upsert_item_dto import AssetMetadataUpsertItemDto
from generated.immich.openapi_client.models.asset_visibility import AssetVisibility
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.AssetsApi(api_client)
    asset_data = None # bytearray | Asset file data
    file_created_at = '2013-10-20T19:20:30+01:00' # datetime | File creation date
    file_modified_at = '2013-10-20T19:20:30+01:00' # datetime | File modification date
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)
    x_immich_checksum = 'x_immich_checksum_example' # str | sha1 checksum that can be used for duplicate detection before the file is uploaded (optional)
    duration = 56 # int | Duration in milliseconds (for videos) (optional)
    filename = 'filename_example' # str | Filename (optional)
    is_favorite = True # bool | Mark as favorite (optional)
    live_photo_video_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Live photo video ID (optional)
    metadata = [generated.immich.openapi_client.AssetMetadataUpsertItemDto()] # List[AssetMetadataUpsertItemDto] | Asset metadata items (optional)
    sidecar_data = None # bytearray | Sidecar file data (optional)
    visibility = generated.immich.openapi_client.AssetVisibility() # AssetVisibility |  (optional)

    try:
        # Upload asset
        api_response = api_instance.upload_asset(asset_data, file_created_at, file_modified_at, key=key, slug=slug, x_immich_checksum=x_immich_checksum, duration=duration, filename=filename, is_favorite=is_favorite, live_photo_video_id=live_photo_video_id, metadata=metadata, sidecar_data=sidecar_data, visibility=visibility)
        print("The response of AssetsApi->upload_asset:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->upload_asset: %s\n" % e)

Parameters

Name Type Description Notes
asset_data bytearray Asset file data
file_created_at datetime File creation date
file_modified_at datetime File modification date
key str [optional]
slug str [optional]
x_immich_checksum str sha1 checksum that can be used for duplicate detection before the file is uploaded [optional]
duration int Duration in milliseconds (for videos) [optional]
filename str Filename [optional]
is_favorite bool Mark as favorite [optional]
live_photo_video_id UUID Live photo video ID [optional]
metadata List[AssetMetadataUpsertItemDto] Asset metadata items [optional]
sidecar_data bytearray Sidecar file data [optional]
visibility AssetVisibility [optional]

Return type

AssetMediaResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Asset is a duplicate -
201 Asset uploaded successfully -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

view_asset

bytearray view_asset(id, edited=edited, key=key, size=size, slug=slug)

View asset thumbnail

Retrieve the thumbnail image for the specified asset. Viewing the fullsize thumbnail might redirect to downloadAsset, which requires a different permission.

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_media_size import AssetMediaSize
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.AssetsApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    edited = False # bool | Return edited asset if available (optional) (default to False)
    key = 'key_example' # str |  (optional)
    size = generated.immich.openapi_client.AssetMediaSize() # AssetMediaSize |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # View asset thumbnail
        api_response = api_instance.view_asset(id, edited=edited, key=key, size=size, slug=slug)
        print("The response of AssetsApi->view_asset:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling AssetsApi->view_asset: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
edited bool Return edited asset if available [optional] [default to False]
key str [optional]
size AssetMediaSize [optional]
slug str [optional]

Return type

bytearray

Authorization

cookie, api_key, bearer

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/octet-stream

HTTP response details

Status code Description Response headers
200 -

[Back to top] [Back to API list] [Back to Model list] [Back to README]