21 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 | |
| create_memory | POST /memories | |
| delete_memory | DELETE /memories/{id} | |
| get_memory | GET /memories/{id} | |
| remove_memory_assets | DELETE /memories/{id}/assets | |
| search_memories | GET /memories | |
| update_memory | PUT /memories/{id} |
add_memory_assets
List[BulkIdResponseDto] add_memory_assets(id, bulk_ids_dto)
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 = 'id_example' # str |
bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto |
try:
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 | str | ||
| bulk_ids_dto | BulkIdsDto |
Return type
Authorization
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)
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:
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
Authorization
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)
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 = 'id_example' # str |
try:
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 | str |
Return type
void (empty response body)
Authorization
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)
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 = 'id_example' # str |
try:
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 | str |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_memory_assets
List[BulkIdResponseDto] remove_memory_assets(id, bulk_ids_dto)
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 = 'id_example' # str |
bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto |
try:
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 | str | ||
| bulk_ids_dto | BulkIdsDto |
Return type
Authorization
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, type=type)
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_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 = '2013-10-20T19:20:30+01:00' # datetime | (optional)
is_saved = True # bool | (optional)
is_trashed = True # bool | (optional)
type = generated.immich.openapi_client.MemoryType() # MemoryType | (optional)
try:
api_response = api_instance.search_memories(var_for=var_for, is_saved=is_saved, is_trashed=is_trashed, 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 | [optional] | |
| is_saved | bool | [optional] | |
| is_trashed | bool | [optional] | |
| type | MemoryType | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_memory
MemoryResponseDto update_memory(id, memory_update_dto)
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 = 'id_example' # str |
memory_update_dto = generated.immich.openapi_client.MemoryUpdateDto() # MemoryUpdateDto |
try:
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 | str | ||
| memory_update_dto | MemoryUpdateDto |
Return type
Authorization
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]