Files
immich-to-cloud-exporter/generated/immich/openapi_client_README.md
T

42 KiB

generated.immich.openapi-client

Immich API

The generated.immich.openapi_client package is automatically generated by the OpenAPI Generator project:

  • API version: 3.0.1
  • Package version: 1.0.0
  • Generator version: 7.9.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.7+

Installation & Usage

This python library package is generated without supporting files like setup.py or requirements files

To be able to use it, you will need these dependencies in your own package that uses this library:

  • urllib3 >= 1.25.3, < 3.0.0
  • python-dateutil >= 2.8.2
  • pydantic >= 2
  • typing-extensions >= 4.7.1

Getting Started

In your own code, to use this library to connect and interact with generated.immich.openapi-client, you can run the following:


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.AlbumsApi(api_client)
    id = 'id_example' # str | 
    bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto | 

    try:
        # Add assets to an album
        api_response = api_instance.add_assets_to_album(id, bulk_ids_dto)
        print("The response of AlbumsApi->add_assets_to_album:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AlbumsApi->add_assets_to_album: %s\n" % e)

Documentation for API Endpoints

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

Class Method HTTP request Description
AlbumsApi add_assets_to_album PUT /albums/{id}/assets Add assets to an album
AlbumsApi add_assets_to_albums PUT /albums/assets Add assets to albums
AlbumsApi add_users_to_album PUT /albums/{id}/users Share album with users
AlbumsApi create_album POST /albums Create an album
AlbumsApi delete_album DELETE /albums/{id} Delete an album
AlbumsApi get_album_info GET /albums/{id} Retrieve an album
AlbumsApi get_album_map_markers GET /albums/{id}/map-markers Retrieve album map markers
AlbumsApi get_album_statistics GET /albums/statistics Retrieve album statistics
AlbumsApi get_all_albums GET /albums List all albums
AlbumsApi remove_asset_from_album DELETE /albums/{id}/assets Remove assets from an album
AlbumsApi remove_user_from_album DELETE /albums/{id}/user/{userId} Remove user from album
AlbumsApi update_album_info PATCH /albums/{id} Update an album
AlbumsApi update_album_user PUT /albums/{id}/user/{userId} Update user role
AssetsApi check_bulk_upload POST /assets/bulk-upload-check Check bulk upload
AssetsApi copy_asset PUT /assets/copy Copy asset
AssetsApi delete_asset_metadata DELETE /assets/{id}/metadata/{key} Delete asset metadata by key
AssetsApi delete_assets DELETE /assets Delete assets
AssetsApi delete_bulk_asset_metadata DELETE /assets/metadata Delete asset metadata
AssetsApi download_asset GET /assets/{id}/original Download original asset
AssetsApi edit_asset PUT /assets/{id}/edits Apply edits to an existing asset
AssetsApi end_session DELETE /assets/{id}/video/stream/{sessionId} End HLS streaming session
AssetsApi get_asset_edits GET /assets/{id}/edits Retrieve edits for an existing asset
AssetsApi get_asset_info GET /assets/{id} Retrieve an asset
AssetsApi get_asset_metadata GET /assets/{id}/metadata Get asset metadata
AssetsApi get_asset_metadata_by_key GET /assets/{id}/metadata/{key} Retrieve asset metadata by key
AssetsApi get_asset_ocr GET /assets/{id}/ocr Retrieve asset OCR data
AssetsApi get_asset_statistics GET /assets/statistics Get asset statistics
AssetsApi get_main_playlist GET /assets/{id}/video/stream/main.m3u8 Get HLS main playlist
AssetsApi get_media_playlist GET /assets/{id}/video/stream/{sessionId}/{variantIndex}/playlist.m3u8 Get HLS media playlist
AssetsApi get_segment GET /assets/{id}/video/stream/{sessionId}/{variantIndex}/{filename} Get HLS segment or init file
AssetsApi play_asset_video GET /assets/{id}/video/playback Play asset video
AssetsApi remove_asset_edits DELETE /assets/{id}/edits Remove edits from an existing asset
AssetsApi run_asset_jobs POST /assets/jobs Run an asset job
AssetsApi update_asset PUT /assets/{id} Update an asset
AssetsApi update_asset_metadata PUT /assets/{id}/metadata Update asset metadata
AssetsApi update_assets PUT /assets Update assets
AssetsApi update_bulk_asset_metadata PUT /assets/metadata Upsert asset metadata
AssetsApi upload_asset POST /assets Upload asset
AssetsApi view_asset GET /assets/{id}/thumbnail View asset thumbnail
SearchApi get_assets_by_city GET /search/cities Retrieve assets by city
SearchApi get_explore_data GET /search/explore Retrieve explore data
SearchApi get_search_suggestions GET /search/suggestions Retrieve search suggestions
SearchApi search_asset_statistics POST /search/statistics Search asset statistics
SearchApi search_assets POST /search/metadata Search assets by metadata
SearchApi search_large_assets POST /search/large-assets Search large assets
SearchApi search_person GET /search/person Search people
SearchApi search_places GET /search/places Search places
SearchApi search_random POST /search/random Search random assets
SearchApi search_smart POST /search/smart Smart asset search

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

bearer

  • Type: Bearer authentication (JWT)

  • Type: API key
  • API key parameter name: immich_access_token
  • Location:

api_key

  • Type: API key
  • API key parameter name: x-api-key
  • Location: HTTP header

Author