42 KiB
generated.immich.openapi_client.AlbumsApi
All URIs are relative to https://github.com/api
| Method | HTTP request | Description |
|---|---|---|
| add_assets_to_album | PUT /albums/{id}/assets | Add assets to an album |
| add_assets_to_albums | PUT /albums/assets | Add assets to albums |
| add_users_to_album | PUT /albums/{id}/users | Share album with users |
| create_album | POST /albums | Create an album |
| delete_album | DELETE /albums/{id} | Delete an album |
| get_album_info | GET /albums/{id} | Retrieve an album |
| get_album_map_markers | GET /albums/{id}/map-markers | Retrieve album map markers |
| get_album_statistics | GET /albums/statistics | Retrieve album statistics |
| get_all_albums | GET /albums | List all albums |
| remove_asset_from_album | DELETE /albums/{id}/assets | Remove assets from an album |
| remove_user_from_album | DELETE /albums/{id}/user/{userId} | Remove user from album |
| update_album_info | PATCH /albums/{id} | Update an album |
| update_album_user | PUT /albums/{id}/user/{userId} | Update user role |
add_assets_to_album
List[BulkIdResponseDto] add_assets_to_album(id, bulk_ids_dto)
Add assets to an album
Add multiple assets to a specific album 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.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.AlbumsApi(api_client)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
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 Exception as e:
print("Exception when calling AlbumsApi->add_assets_to_album: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| 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]
add_assets_to_albums
AlbumsAddAssetsResponseDto add_assets_to_albums(albums_add_assets_dto)
Add assets to albums
Send a list of asset IDs and album IDs to add each asset to each album.
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.albums_add_assets_dto import AlbumsAddAssetsDto
from generated.immich.openapi_client.models.albums_add_assets_response_dto import AlbumsAddAssetsResponseDto
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)
albums_add_assets_dto = generated.immich.openapi_client.AlbumsAddAssetsDto() # AlbumsAddAssetsDto |
try:
# Add assets to albums
api_response = api_instance.add_assets_to_albums(albums_add_assets_dto)
print("The response of AlbumsApi->add_assets_to_albums:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->add_assets_to_albums: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| albums_add_assets_dto | AlbumsAddAssetsDto |
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]
add_users_to_album
AlbumResponseDto add_users_to_album(id, add_users_dto)
Share album with users
Share an album with multiple users. Each user can be given a specific role in the album.
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.add_users_dto import AddUsersDto
from generated.immich.openapi_client.models.album_response_dto import AlbumResponseDto
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 = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
add_users_dto = generated.immich.openapi_client.AddUsersDto() # AddUsersDto |
try:
# Share album with users
api_response = api_instance.add_users_to_album(id, add_users_dto)
print("The response of AlbumsApi->add_users_to_album:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->add_users_to_album: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| add_users_dto | AddUsersDto |
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_album
AlbumResponseDto create_album(create_album_dto)
Create an album
Create a new album. The album can also be created with initial users and 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.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.models.create_album_dto import CreateAlbumDto
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)
create_album_dto = generated.immich.openapi_client.CreateAlbumDto() # CreateAlbumDto |
try:
# Create an album
api_response = api_instance.create_album(create_album_dto)
print("The response of AlbumsApi->create_album:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->create_album: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| create_album_dto | CreateAlbumDto |
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_album
delete_album(id)
Delete an album
Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.
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.AlbumsApi(api_client)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
try:
# Delete an album
api_instance.delete_album(id)
except Exception as e:
print("Exception when calling AlbumsApi->delete_album: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID |
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_album_info
AlbumResponseDto get_album_info(id, key=key, slug=slug)
Retrieve an album
Retrieve information about a specific album 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.album_response_dto import AlbumResponseDto
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 = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
key = 'key_example' # str | (optional)
slug = 'slug_example' # str | (optional)
try:
# Retrieve an album
api_response = api_instance.get_album_info(id, key=key, slug=slug)
print("The response of AlbumsApi->get_album_info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->get_album_info: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| key | str | [optional] | |
| slug | str | [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]
get_album_map_markers
List[MapMarkerResponseDto] get_album_map_markers(id, key=key, slug=slug)
Retrieve album map markers
Retrieve map marker information for a specific album 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.map_marker_response_dto import MapMarkerResponseDto
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 = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
key = 'key_example' # str | (optional)
slug = 'slug_example' # str | (optional)
try:
# Retrieve album map markers
api_response = api_instance.get_album_map_markers(id, key=key, slug=slug)
print("The response of AlbumsApi->get_album_map_markers:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->get_album_map_markers: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| key | str | [optional] | |
| slug | str | [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]
get_album_statistics
AlbumStatisticsResponseDto get_album_statistics()
Retrieve album statistics
Returns statistics about the albums available to 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.album_statistics_response_dto import AlbumStatisticsResponseDto
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)
try:
# Retrieve album statistics
api_response = api_instance.get_album_statistics()
print("The response of AlbumsApi->get_album_statistics:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->get_album_statistics: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
| Status code | Description | Response headers |
|---|---|---|
| 200 | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_all_albums
List[AlbumResponseDto] get_all_albums(asset_id=asset_id, id=id, is_owned=is_owned, is_shared=is_shared, name=name)
List all albums
Retrieve a list of albums available to 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.album_response_dto import AlbumResponseDto
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)
asset_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Filter albums containing this asset ID (ignores other parameters) (optional)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Album ID (optional)
is_owned = True # bool | Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter (optional)
is_shared = True # bool | Filter by shared status: true = only shared, false = not shared, undefined = no filter (optional)
name = 'name_example' # str | Album name (exact match) (optional)
try:
# List all albums
api_response = api_instance.get_all_albums(asset_id=asset_id, id=id, is_owned=is_owned, is_shared=is_shared, name=name)
print("The response of AlbumsApi->get_all_albums:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->get_all_albums: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| asset_id | UUID | Filter albums containing this asset ID (ignores other parameters) | [optional] |
| id | UUID | Album ID | [optional] |
| is_owned | bool | Filter by ownership: true = only owned, false = only shared-with-me, undefined = no filter | [optional] |
| is_shared | bool | Filter by shared status: true = only shared, false = not shared, undefined = no filter | [optional] |
| name | str | Album name (exact match) | [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]
remove_asset_from_album
List[BulkIdResponseDto] remove_asset_from_album(id, bulk_ids_dto)
Remove assets from an album
Remove multiple assets from a specific album 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.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.AlbumsApi(api_client)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
bulk_ids_dto = generated.immich.openapi_client.BulkIdsDto() # BulkIdsDto |
try:
# Remove assets from an album
api_response = api_instance.remove_asset_from_album(id, bulk_ids_dto)
print("The response of AlbumsApi->remove_asset_from_album:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->remove_asset_from_album: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| 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]
remove_user_from_album
remove_user_from_album(id, user_id)
Remove user from album
Remove a user from an album. Use an ID of "me" to leave a shared album.
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.AlbumsApi(api_client)
id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
user_id = 'user_id_example' # str |
try:
# Remove user from album
api_instance.remove_user_from_album(id, user_id)
except Exception as e:
print("Exception when calling AlbumsApi->remove_user_from_album: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| user_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]
update_album_info
AlbumResponseDto update_album_info(id, update_album_dto)
Update an album
Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.
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.album_response_dto import AlbumResponseDto
from generated.immich.openapi_client.models.update_album_dto import UpdateAlbumDto
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 = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
update_album_dto = generated.immich.openapi_client.UpdateAlbumDto() # UpdateAlbumDto |
try:
# Update an album
api_response = api_instance.update_album_info(id, update_album_dto)
print("The response of AlbumsApi->update_album_info:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AlbumsApi->update_album_info: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| update_album_dto | UpdateAlbumDto |
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]
update_album_user
update_album_user(id, user_id, update_album_user_dto)
Update user role
Change the role for a specific user in a specific album.
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.update_album_user_dto import UpdateAlbumUserDto
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 = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID |
user_id = 'user_id_example' # str |
update_album_user_dto = generated.immich.openapi_client.UpdateAlbumUserDto() # UpdateAlbumUserDto |
try:
# Update user role
api_instance.update_album_user(id, user_id, update_album_user_dto)
except Exception as e:
print("Exception when calling AlbumsApi->update_album_user: %s\n" % e)
Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| id | UUID | ||
| user_id | str | ||
| update_album_user_dto | UpdateAlbumUserDto |
Return type
void (empty response body)
Authorization
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]