All URIs are relative to http://demo.photoprism.app
Method | HTTP request | Description |
---|---|---|
api_v1_markers_post | POST /api/v1/markers | |
change_file_orientation | PUT /api/v1/photos/{uid}/files/{fileuid}/orientation | changes the orientation of a file |
delete_file | DELETE /api/v1/photos/{uid}/files/{fileuid} | removes a file from storage |
get_download | GET /api/v1/dl/{hash} | returns the raw file data |
get_file | GET /api/v1/files/{hash} | returns file details as JSON |
get_photo_download | GET /api/v1/photos/{uid}/dl | returns the primary file matching that belongs to the photo |
get_thumb | GET /api/v1/t/{thumb}/{token}/{size} | returns a thumbnail image with the requested size |
get_video | GET /api/v1/videos/{hash}/{token}/{format} | returns a video, optionally limited to a byte range for streaming |
users_uid_upload_token_post | POST /users/{uid}/upload/{token} | |
zip_create | POST /api/v1/zip | creates a zip file archive for download |
zip_download | GET /api/v1/zip/{filename} | downloads a zip file archive |
api_v1_markers_post()
import photoprism_client
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
try:
api_instance.api_v1_markers_post()
except Exception as e:
print("Exception when calling FilesApi->api_v1_markers_post: %s\n" % e)
This endpoint does not need any parameter.
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EntityPhoto change_file_orientation(uid, fileuid, file)
changes the orientation of a file
import photoprism_client
from photoprism_client.models.entity_photo import EntityPhoto
from photoprism_client.models.form_file import FormFile
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
uid = 'uid_example' # str | photo uid
fileuid = 'fileuid_example' # str | file uid
file = photoprism_client.FormFile() # FormFile | file orientation
try:
# changes the orientation of a file
api_response = api_instance.change_file_orientation(uid, fileuid, file)
print("The response of FilesApi->change_file_orientation:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->change_file_orientation: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
uid | str | photo uid | |
fileuid | str | file uid | |
file | FormFile | file orientation |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EntityPhoto delete_file(uid, fileuid)
removes a file from storage
import photoprism_client
from photoprism_client.models.entity_photo import EntityPhoto
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
uid = 'uid_example' # str | photo uid
fileuid = 'fileuid_example' # str | file uid
try:
# removes a file from storage
api_response = api_instance.delete_file(uid, fileuid)
print("The response of FilesApi->delete_file:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->delete_file: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
uid | str | photo uid | |
fileuid | str | file uid |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_download(hash)
returns the raw file data
import photoprism_client
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
hash = 'hash_example' # str | File Hash
try:
# returns the raw file data
api_response = api_instance.get_download(hash)
print("The response of FilesApi->get_download:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->get_download: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
hash | str | File Hash |
bytearray
No authorization required
- Content-Type: Not defined
- Accept: application/octet-stream
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EntityFile get_file(hash)
returns file details as JSON
import photoprism_client
from photoprism_client.models.entity_file import EntityFile
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
hash = 'hash_example' # str | hash (string) SHA-1 hash of the file
try:
# returns file details as JSON
api_response = api_instance.get_file(hash)
print("The response of FilesApi->get_file:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->get_file: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
hash | str | hash (string) SHA-1 hash of the file |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_photo_download(uid)
returns the primary file matching that belongs to the photo
import photoprism_client
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
uid = 'uid_example' # str | photo uid
try:
# returns the primary file matching that belongs to the photo
api_response = api_instance.get_photo_download(uid)
print("The response of FilesApi->get_photo_download:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->get_photo_download: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
uid | str | photo uid |
bytearray
No authorization required
- Content-Type: Not defined
- Accept: application/octet-stream
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_thumb(thumb, token, size)
returns a thumbnail image with the requested size
Fore more information see: - https://docs.photoprism.app/developer-guide/api/thumbnails/#image-endpoint-uri
import photoprism_client
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
thumb = 'thumb_example' # str | SHA1 file hash, optionally with a crop area suffixed, e.g. '-016014058037'
token = 'token_example' # str | user-specific security token provided with session or 'public' when running PhotoPrism in public mode
size = 'size_example' # str | thumbnail size
try:
# returns a thumbnail image with the requested size
api_response = api_instance.get_thumb(thumb, token, size)
print("The response of FilesApi->get_thumb:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->get_thumb: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
thumb | str | SHA1 file hash, optionally with a crop area suffixed, e.g. '-016014058037' | |
token | str | user-specific security token provided with session or 'public' when running PhotoPrism in public mode | |
size | str | thumbnail size |
bytearray
No authorization required
- Content-Type: Not defined
- Accept: image/jpeg
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray get_video(hash, token, format)
returns a video, optionally limited to a byte range for streaming
Fore more information see: - https://docs.photoprism.app/developer-guide/api/thumbnails/#video-endpoint-uri
import photoprism_client
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
hash = 'hash_example' # str | SHA1 video file hash
token = 'token_example' # str | user-specific security token provided with session
format = 'format_example' # str | video format
try:
# returns a video, optionally limited to a byte range for streaming
api_response = api_instance.get_video(hash, token, format)
print("The response of FilesApi->get_video:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->get_video: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
hash | str | SHA1 video file hash | |
token | str | user-specific security token provided with session | |
format | str | video format |
bytearray
No authorization required
- Content-Type: Not defined
- Accept: application/octet-stream
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
users_uid_upload_token_post()
import photoprism_client
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
try:
api_instance.users_uid_upload_token_post()
except Exception as e:
print("Exception when calling FilesApi->users_uid_upload_token_post: %s\n" % e)
This endpoint does not need any parameter.
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
[Back to top] [Back to API list] [Back to Model list] [Back to README]
I18nResponse zip_create(photos)
creates a zip file archive for download
import photoprism_client
from photoprism_client.models.form_selection import FormSelection
from photoprism_client.models.i18n_response import I18nResponse
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
photos = photoprism_client.FormSelection() # FormSelection | Photo Selection
try:
# creates a zip file archive for download
api_response = api_instance.zip_create(photos)
print("The response of FilesApi->zip_create:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->zip_create: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
photos | FormSelection | Photo Selection |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
bytearray zip_download(filename)
downloads a zip file archive
import photoprism_client
from photoprism_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://demo.photoprism.app
# See configuration.py for a list of all supported configuration parameters.
configuration = photoprism_client.Configuration(
host = "http://demo.photoprism.app"
)
# Enter a context with an instance of the API client
with photoprism_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = photoprism_client.FilesApi(api_client)
filename = 'filename_example' # str | zip filename
try:
# downloads a zip file archive
api_response = api_instance.zip_download(filename)
print("The response of FilesApi->zip_download:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling FilesApi->zip_download: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
filename | str | zip filename |
bytearray
No authorization required
- Content-Type: Not defined
- Accept: application/zip
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
404 | Not Found | - |
500 | Internal Server Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]