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

27 KiB

generated.immich.openapi_client.MemoriesApi

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

Method HTTP request Description
add_memory_assets PUT /memories/{id}/assets Add assets to a memory
create_memory POST /memories Create a memory
delete_memory DELETE /memories/{id} Delete a memory
get_memory GET /memories/{id} Retrieve a memory
memories_statistics GET /memories/statistics Retrieve memories statistics
remove_memory_assets DELETE /memories/{id}/assets Remove assets from a memory
search_memories GET /memories Retrieve memories
update_memory PUT /memories/{id} Update a memory

add_memory_assets

List[BulkIdResponseDto] add_memory_assets(id, bulk_ids_dto)

Add assets to a memory

Add a list of asset IDs to a specific memory.

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.bulk_id_response_dto import BulkIdResponseDto
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
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.MemoriesApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto | 

    try:
        # Add assets to a memory
        api_response = api_instance.add_memory_assets(id, bulk_ids_dto)
        print("The response of MemoriesApi->add_memory_assets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MemoriesApi->add_memory_assets: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
bulk_ids_dto BulkIdsDto

Return type

List[BulkIdResponseDto]

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]

create_memory

MemoryResponseDto create_memory(memory_create_dto)

Create a memory

Create a new memory by providing a name, description, and a list of asset IDs to include in the memory.

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.memory_create_dto import MemoryCreateDto
from generated.immich.openapi_client.models.memory_response_dto import MemoryResponseDto
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.MemoriesApi(api_client)
    memory_create_dto = generated.immich.openapi_client.MemoryCreateDto() # MemoryCreateDto | 

    try:
        # Create a memory
        api_response = api_instance.create_memory(memory_create_dto)
        print("The response of MemoriesApi->create_memory:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MemoriesApi->create_memory: %s\n" % e)

Parameters

Name Type Description Notes
memory_create_dto MemoryCreateDto

Return type

MemoryResponseDto

Authorization

cookie, api_key, bearer

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 -

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

delete_memory

delete_memory(id)

Delete a memory

Delete a specific memory by its ID.

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

    try:
        # Delete a memory
        api_instance.delete_memory(id)
    except Exception as e:
        print("Exception when calling MemoriesApi->delete_memory: %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]

get_memory

MemoryResponseDto get_memory(id)

Retrieve a memory

Retrieve a specific memory by its ID.

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

    try:
        # Retrieve a memory
        api_response = api_instance.get_memory(id)
        print("The response of MemoriesApi->get_memory:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MemoriesApi->get_memory: %s\n" % e)

Parameters

Name Type Description Notes
id UUID

Return type

MemoryResponseDto

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]

memories_statistics

MemoryStatisticsResponseDto memories_statistics(var_for=var_for, is_saved=is_saved, is_trashed=is_trashed, order=order, size=size, type=type)

Retrieve memories statistics

Retrieve statistics about memories, such as total count and other relevant metrics.

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.memory_search_order import MemorySearchOrder
from generated.immich.openapi_client.models.memory_statistics_response_dto import MemoryStatisticsResponseDto
from generated.immich.openapi_client.models.memory_type import MemoryType
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.MemoriesApi(api_client)
    var_for = '2024-01-01T00:00Z' # datetime | Filter by date (optional)
    is_saved = True # bool | Filter by saved status (optional)
    is_trashed = True # bool | Include trashed memories (optional)
    order = generated.immich.openapi_client.MemorySearchOrder() # MemorySearchOrder |  (optional)
    size = 56 # int | Number of memories to return (optional)
    type = generated.immich.openapi_client.MemoryType() # MemoryType |  (optional)

    try:
        # Retrieve memories statistics
        api_response = api_instance.memories_statistics(var_for=var_for, is_saved=is_saved, is_trashed=is_trashed, order=order, size=size, type=type)
        print("The response of MemoriesApi->memories_statistics:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MemoriesApi->memories_statistics: %s\n" % e)

Parameters

Name Type Description Notes
var_for datetime Filter by date [optional]
is_saved bool Filter by saved status [optional]
is_trashed bool Include trashed memories [optional]
order MemorySearchOrder [optional]
size int Number of memories to return [optional]
type MemoryType [optional]

Return type

MemoryStatisticsResponseDto

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]

remove_memory_assets

List[BulkIdResponseDto] remove_memory_assets(id, bulk_ids_dto)

Remove assets from a memory

Remove a list of asset IDs from a specific memory.

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.bulk_id_response_dto import BulkIdResponseDto
from generated.immich.openapi_client.models.bulk_ids_dto import BulkIdsDto
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.MemoriesApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto | 

    try:
        # Remove assets from a memory
        api_response = api_instance.remove_memory_assets(id, bulk_ids_dto)
        print("The response of MemoriesApi->remove_memory_assets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MemoriesApi->remove_memory_assets: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
bulk_ids_dto BulkIdsDto

Return type

List[BulkIdResponseDto]

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]

search_memories

List[MemoryResponseDto] search_memories(var_for=var_for, is_saved=is_saved, is_trashed=is_trashed, order=order, size=size, type=type)

Retrieve memories

Retrieve a list of memories. Memories are sorted descending by creation date by default, although they can also be sorted in ascending order, or randomly.

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.memory_response_dto import MemoryResponseDto
from generated.immich.openapi_client.models.memory_search_order import MemorySearchOrder
from generated.immich.openapi_client.models.memory_type import MemoryType
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.MemoriesApi(api_client)
    var_for = '2024-01-01T00:00Z' # datetime | Filter by date (optional)
    is_saved = True # bool | Filter by saved status (optional)
    is_trashed = True # bool | Include trashed memories (optional)
    order = generated.immich.openapi_client.MemorySearchOrder() # MemorySearchOrder |  (optional)
    size = 56 # int | Number of memories to return (optional)
    type = generated.immich.openapi_client.MemoryType() # MemoryType |  (optional)

    try:
        # Retrieve memories
        api_response = api_instance.search_memories(var_for=var_for, is_saved=is_saved, is_trashed=is_trashed, order=order, size=size, type=type)
        print("The response of MemoriesApi->search_memories:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MemoriesApi->search_memories: %s\n" % e)

Parameters

Name Type Description Notes
var_for datetime Filter by date [optional]
is_saved bool Filter by saved status [optional]
is_trashed bool Include trashed memories [optional]
order MemorySearchOrder [optional]
size int Number of memories to return [optional]
type MemoryType [optional]

Return type

List[MemoryResponseDto]

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]

update_memory

MemoryResponseDto update_memory(id, memory_update_dto)

Update a memory

Update an existing memory by its ID.

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.memory_response_dto import MemoryResponseDto
from generated.immich.openapi_client.models.memory_update_dto import MemoryUpdateDto
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.MemoriesApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    memory_update_dto = generated.immich.openapi_client.MemoryUpdateDto() # MemoryUpdateDto | 

    try:
        # Update a memory
        api_response = api_instance.update_memory(id, memory_update_dto)
        print("The response of MemoriesApi->update_memory:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling MemoriesApi->update_memory: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
memory_update_dto MemoryUpdateDto

Return type

MemoryResponseDto

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]