Photos
This API is partially documented or under construction.
Overview​
Interface for Synology Photos API.
Provides methods to interact with Photos features such as retrieving user info, folders, albums, sharing, and items.
Parameters​
ip_address : str The IP address or hostname of the Synology NAS. port : str The port number to connect to. username : str The username for authentication. password : str The password for authentication. secure : bool, optional Whether to use HTTPS. Default is False. cert_verify : bool, optional Whether to verify SSL certificates. Default is False. dsm_version : int, optional DSM version. Default is 7. debug : bool, optional Enable debug output. Default is True. otp_code : str, optional One-time password for 2FA, if required. device_id : str, optional Device ID for the session. device_name : str, optional Device name for the session.
Methods​
get_userinfo
​
Retrieve user information for the current session.
Internal API​
SYNO.Foto.UserInfo
Returns​
Any
The user information data.
get_folder
​
Retrieve information about a specific folder.
Internal API​
SYNO.Foto.Browse.Folder
Parameters​
folder_id int
The ID of the folder. Default is 0.
Returns​
dict[str, object] or str
The folder information or an error message.
list_folders
​
List folders in Personal Space.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
folder_id int
The parent folder ID. Default is 0.
limit int
Maximum number of folders to return. Default is 1000.
offset int
Number of folders to skip. Default is 0.
additional str or list of str
Additional fields to include.
Returns​
dict[str, object] or str
The list of folders or an error message.
list_teams_folders
​
List folders in Team Space.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
folder_id int
The parent folder ID. Default is 0.
limit int
Maximum number of folders to return. Default is 2000.
offset int
Number of folders to skip. Default is 0.
additional str or list of str
Additional fields to include.
Returns​
dict[str, object] or str
The list of team folders or an error message.
count_folders
​
Count folders in Personal Space.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
folder_id int
The parent folder ID. Default is 0.
Returns​
dict[str, object] or str
The count of folders or an error message.
count_team_folders
​
Count folders in Team Space.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
folder_id int
The parent folder ID. Default is 0.
Returns​
dict[str, object] or str
The count of team folders or an error message.
lookup_folder
​
Lookup a folder by path in Personal Space.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
path str
The folder path.
Returns​
dict[str, object] or str
The folder information or None if not found.
lookup_team_folder
​
Lookup a folder by path in Team Space.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
path str
The folder path.
Returns​
dict[str, object] or str
The folder information or None if not found.
get_album
​
Retrieve information about a specific album.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
album_id str
The album ID.
additional str or list of str
Additional fields to include.
Returns​
dict[str, object] or str
The album information or an error message.
list_albums
​
List albums.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
offset int
Number of albums to skip. Default is 0.
limit int
Maximum number of albums to return. Default is 100.
Returns​
dict[str, object] or str
The list of albums or an error message.
suggest_condition
​
Suggest album conditions based on a keyword.
Internal API​
SYNO.Foto.Browse.ConditionAlbum
Parameters​
keyword str
The keyword to suggest conditions for.
condition list of str
List of conditions to use. Default is ['general_tag'].
user_id str
User ID to use. If None, uses the current user.
Returns​
dict[str, object] or str
The suggested conditions or an error message.
create_album
​
Create a new album with the specified condition.
Internal API​
SYNO.Foto.Browse.ConditionAlbum
Parameters​
name str
The name of the album.
condition list of str
The condition for the album.
Returns​
dict[str, object] or str
The API response for album creation.
delete_album
​
Delete an album by ID.
Internal API​
SYNO.Foto.Browse.Album
Parameters​
album_id str
The album ID.
Returns​
dict[str, object] or str
The API response for album deletion.
set_album_condition
​
Set the condition for an album.
Internal API​
SYNO.Foto.Browse.ConditionAlbum
Parameters​
folder_id int
The folder ID.
condition list of str
The condition to set.
Returns​
dict[str, object] or str
The API response for setting the condition.
share_album
​
Share an album with specified permissions.
Internal API​
SYNO.Foto.Sharing.Misc
Parameters​
album_id str
The album ID.
permission str or list of str
Permissions to set.
enabled bool
Whether sharing is enabled. Default is True.
expiration int or str
Expiration time for the share. Default is 0.
Returns​
Any
The API response for sharing the album.
share_team_folder
​
Share a team folder with specified permissions.
Internal API​
SYNO.Foto.Sharing.Misc
Parameters​
folder_id int
The folder ID.
permission str
Permissions to set.
enabled bool
Whether sharing is enabled. Default is True.
expiration int or str
Expiration time for the share. Default is 0.
Returns​
Any
The API response for sharing the team folder.
list_shareable_users_and_groups
​
List users and groups that can be shared with.
Internal API​
SYNO.Foto.Sharing.Misc
Parameters​
team_space_sharable_list bool
Whether to include team space sharable list. Default is False.
Returns​
dict[str, object] or str
The list of users and groups or an error message.
list_item_in_folders
​
List all items in all folders in Personal Space.
Internal API​
SYNO.Foto.Browse.Item
Parameters​
offset int
Specify how many shared folders are skipped before beginning to return listed shared folders.
limit int
Number of shared folders requested. Set to 0
to list all shared folders.
folder_id int
ID of folder.
sort_by str
Possible values: 'filename', 'filesize', 'takentime', 'item_type'.
sort_direction str
Possible values: 'asc' or 'desc'. Defaults to: 'desc'.
type str
Possible values: 'photo', 'video', 'live'.
passphrase str
Passphrase for a shared album.
additional list
Additional fields to include.
Possible values:
["thumbnail","resolution", "orientation", "video_convert", "video_meta", "provider_user_id", "exif", "tag", "description", "gps", "geocoding_id", "address", "person"]
.
Returns​
dict[str, object] or str
The list of items or an error message.
list_search_filters
​
List available search filters.
Internal API​
SYNO.Foto.Search.Filter
Returns​
dict[str, object] or str
The list of search filters or an error message.
get_guest_settings
​
Retrieve guest settings for Photos.
Internal API​
SYNO.Foto.Setting.Guest
Returns​
dict[str, object] or str
The guest settings or an error message.