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

29 KiB

generated.immich.openapi_client.SharedLinksApi

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

Method HTTP request Description
add_shared_link_assets PUT /shared-links/{id}/assets Add assets to a shared link
create_shared_link POST /shared-links Create a shared link
get_all_shared_links GET /shared-links Retrieve all shared links
get_my_shared_link GET /shared-links/me Retrieve current shared link
get_shared_link_by_id GET /shared-links/{id} Retrieve a shared link
remove_shared_link DELETE /shared-links/{id} Delete a shared link
remove_shared_link_assets DELETE /shared-links/{id}/assets Remove assets from a shared link
shared_link_login POST /shared-links/login Shared link login
update_shared_link PATCH /shared-links/{id} Update a shared link

add_shared_link_assets

List[AssetIdsResponseDto] add_shared_link_assets(id, asset_ids_dto)

Add assets to a shared link

Add assets to a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.

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_ids_dto import AssetIdsDto
from generated.immich.openapi_client.models.asset_ids_response_dto import AssetIdsResponseDto
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.SharedLinksApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    asset_ids_dto = generated.immich.openapi_client.AssetIdsDto() # AssetIdsDto | 

    try:
        # Add assets to a shared link
        api_response = api_instance.add_shared_link_assets(id, asset_ids_dto)
        print("The response of SharedLinksApi->add_shared_link_assets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SharedLinksApi->add_shared_link_assets: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
asset_ids_dto AssetIdsDto

Return type

List[AssetIdsResponseDto]

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_shared_link

SharedLinkResponseDto create_shared_link(shared_link_create_dto)

Create a shared link

Create a new shared link.

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.shared_link_create_dto import SharedLinkCreateDto
from generated.immich.openapi_client.models.shared_link_response_dto import SharedLinkResponseDto
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.SharedLinksApi(api_client)
    shared_link_create_dto = generated.immich.openapi_client.SharedLinkCreateDto() # SharedLinkCreateDto | 

    try:
        # Create a shared link
        api_response = api_instance.create_shared_link(shared_link_create_dto)
        print("The response of SharedLinksApi->create_shared_link:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SharedLinksApi->create_shared_link: %s\n" % e)

Parameters

Name Type Description Notes
shared_link_create_dto SharedLinkCreateDto

Return type

SharedLinkResponseDto

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]

get_all_shared_links

List[SharedLinkResponseDto] get_all_shared_links(album_id=album_id, id=id)

Retrieve all shared links

Retrieve a list of all shared links.

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.shared_link_response_dto import SharedLinkResponseDto
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.SharedLinksApi(api_client)
    album_id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Filter by album ID (optional)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | Filter by shared link ID (optional)

    try:
        # Retrieve all shared links
        api_response = api_instance.get_all_shared_links(album_id=album_id, id=id)
        print("The response of SharedLinksApi->get_all_shared_links:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SharedLinksApi->get_all_shared_links: %s\n" % e)

Parameters

Name Type Description Notes
album_id UUID Filter by album ID [optional]
id UUID Filter by shared link ID [optional]

Return type

List[SharedLinkResponseDto]

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_my_shared_link

SharedLinkResponseDto get_my_shared_link(key=key, slug=slug)

Retrieve current shared link

Retrieve the current shared link associated with authentication method.

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.shared_link_response_dto import SharedLinkResponseDto
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.SharedLinksApi(api_client)
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # Retrieve current shared link
        api_response = api_instance.get_my_shared_link(key=key, slug=slug)
        print("The response of SharedLinksApi->get_my_shared_link:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SharedLinksApi->get_my_shared_link: %s\n" % e)

Parameters

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

Return type

SharedLinkResponseDto

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_shared_link_by_id

SharedLinkResponseDto get_shared_link_by_id(id)

Retrieve a shared link

Retrieve a specific shared link 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.shared_link_response_dto import SharedLinkResponseDto
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.SharedLinksApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 

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

Parameters

Name Type Description Notes
id UUID

Return type

SharedLinkResponseDto

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_shared_link

remove_shared_link(id)

Delete a shared link

Delete a specific shared link 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.SharedLinksApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 

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

remove_shared_link_assets

List[AssetIdsResponseDto] remove_shared_link_assets(id, asset_ids_dto)

Remove assets from a shared link

Remove assets from a specific shared link by its ID. This endpoint is only relevant for shared link of type individual.

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_ids_dto import AssetIdsDto
from generated.immich.openapi_client.models.asset_ids_response_dto import AssetIdsResponseDto
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.SharedLinksApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    asset_ids_dto = generated.immich.openapi_client.AssetIdsDto() # AssetIdsDto | 

    try:
        # Remove assets from a shared link
        api_response = api_instance.remove_shared_link_assets(id, asset_ids_dto)
        print("The response of SharedLinksApi->remove_shared_link_assets:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SharedLinksApi->remove_shared_link_assets: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
asset_ids_dto AssetIdsDto

Return type

List[AssetIdsResponseDto]

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]

shared_link_login

SharedLinkResponseDto shared_link_login(shared_link_login_dto, key=key, slug=slug)

Shared link login

Login to a password protected shared link

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.shared_link_login_dto import SharedLinkLoginDto
from generated.immich.openapi_client.models.shared_link_response_dto import SharedLinkResponseDto
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.SharedLinksApi(api_client)
    shared_link_login_dto = generated.immich.openapi_client.SharedLinkLoginDto() # SharedLinkLoginDto | 
    key = 'key_example' # str |  (optional)
    slug = 'slug_example' # str |  (optional)

    try:
        # Shared link login
        api_response = api_instance.shared_link_login(shared_link_login_dto, key=key, slug=slug)
        print("The response of SharedLinksApi->shared_link_login:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SharedLinksApi->shared_link_login: %s\n" % e)

Parameters

Name Type Description Notes
shared_link_login_dto SharedLinkLoginDto
key str [optional]
slug str [optional]

Return type

SharedLinkResponseDto

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]

update_shared_link

SharedLinkResponseDto update_shared_link(id, shared_link_edit_dto)

Update a shared link

Update an existing shared link 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.shared_link_edit_dto import SharedLinkEditDto
from generated.immich.openapi_client.models.shared_link_response_dto import SharedLinkResponseDto
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.SharedLinksApi(api_client)
    id = UUID('38400000-8cf0-11bd-b23e-10b96e4ef00d') # UUID | 
    shared_link_edit_dto = generated.immich.openapi_client.SharedLinkEditDto() # SharedLinkEditDto | 

    try:
        # Update a shared link
        api_response = api_instance.update_shared_link(id, shared_link_edit_dto)
        print("The response of SharedLinksApi->update_shared_link:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling SharedLinksApi->update_shared_link: %s\n" % e)

Parameters

Name Type Description Notes
id UUID
shared_link_edit_dto SharedLinkEditDto

Return type

SharedLinkResponseDto

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]