Stay organized with collections
Save and categorize content based on your preferences.
Lists all images/all videos/all images and videos in the camera. It might take
several requests to list all files. This command was added in API level 2.
If a camera doesn’t support the requested parameters, the camera must return the
maximum capability available for the hardware. For example, a rare case might be
the request: {entryCount: 500, maxSize: 2000}. Instead of throwing an error,
the response should be based on the maximum capability supported by the camera,
such as: {entryCount: 100, maxSize: 200}. Please throw errors for all other
cases; for example, when the request is, {entryCount: 500, maxSize: -500}, it
should throw the error invalidParameterValue since maxSize is negative.
Parameters
fileType: Type of the files to be listed, should be any of
the three: “image”, ”video”, ”all”.
startPosition: (Optional) The position of the first file to
be returned in the list. If omitted, start position is 0, which represents
the first file. If it is larger than the position of the last file, return a
normal response with empty entries in results instead of an error response.
entryCount: Desired number of entries to return. If it is
more than the number of remaining files, just return a normal response with
the actual files remaining instead of an error response.
maxThumbSize: Maximum size of thumbnail images;
max(thumbnail_width, thumbnail_height). It is set to null when the client
wants to omit thumbnail images from the result.
Results
entries: A list of image properties. Each entry should contain the following fields
except for latitude and longitude, which are optional:
name: Name of the file.
fileUrl: Absolute URL of the file, which can be used to download from the camera directly.
size: Size in bytes of the file.
dateTimeZone: Date, time, and time zone for the file, in the format:
YYYY:MM:DD HH:MM:SS+(-)HH:MM. Use 24-hour format for the time. Date and
time are separated by one blank character. Time zone is offset from UTC time. Please note this
represents the ending of the capture for videos.
lat: (Optional) Latitude of the location at the time of file capture.
lng: (Optional) Longitude of the location at the time of file capture.
width: Width of the image or each video frame.
height: Height of the image or each video frame.
thumbnail: Base64 encoded string for thumbnail image of the file (when maxThumbSize != null).
isProcessed: A boolean value indicating if the file is
processed (e.g. stitched) or it is only a preview. This should be true by
default unless delayProcessing is set to true. If a processed image exists,
the corresponding preview image shouldn’t be listed even if it exists,
otherwise, list the preview image.
previewUrl: Default to empty string if delayProcessing
is not supported or when isProcessed equals false or when preview image
was never generated as an intermediate result, otherwise, it is the URL of
the preview image corresponding to the final image. This is used to build
the correspondence between the preview image and the final image.
totalEntries: Total number of entries of fileType in
storage, e.g. if fileType is "image", it is the total number of images in
storage.
Errors
missingParameter: Any required parameter is not specified;
for example, entryCount is not specified.
invalidParameterName: The input parameter name is
unrecognized.
invalidParameterValue: The input parameter name is recognized,
but its value is invalid; for example, the entryCount is negative
or its data type is incorrect.
[null,null,["Last updated 2024-10-09 UTC."],[[["\u003cp\u003eLists all images, videos, or both from the camera's storage, sorted by capture time in descending order.\u003c/p\u003e\n"],["\u003cp\u003eAllows retrieval of a specific number of files, starting from a designated position, with optional thumbnail generation.\u003c/p\u003e\n"],["\u003cp\u003eReturns file details like name, URL, size, capture timestamp, dimensions, and processing status.\u003c/p\u003e\n"],["\u003cp\u003eIncludes error handling for missing or invalid parameters, prioritizing maximum camera capabilities over throwing errors when possible.\u003c/p\u003e\n"],["\u003cp\u003eRequires API level 2 or higher for compatibility.\u003c/p\u003e\n"]]],["This command retrieves a list of files (images, videos, or both) from a camera's storage, sorted by capture time (newest first). Key actions involve specifying `fileType`, optional `startPosition`, desired `entryCount`, and `maxThumbSize`. The camera returns a list of `entries`, each with file details like name, URL, size, and capture time. Errors occur for invalid parameters, with the camera returning maximum supported capabilities for specific cases. Total entries are also provided.\n"],null,["# camera.listFiles\n\nLists all images/all videos/all images and videos in the camera. It might take\nseveral requests to list all files. **This command was added in API level 2.**\n| **Note:** File list *MUST* be sorted by capture time, newest first.\n\n\u003cbr /\u003e\n\nIf a camera doesn't support the requested parameters, the camera must return the\nmaximum capability available for the hardware. For example, a rare case might be\nthe request: `{entryCount: 500, maxSize: 2000}`. Instead of throwing an error,\nthe response should be based on the maximum capability supported by the camera,\nsuch as: `{entryCount: 100, maxSize: 200}`. Please throw errors for all other\ncases; for example, when the request is, `{entryCount: 500, maxSize: -500}`, it\nshould throw the error `invalidParameterValue` since `maxSize` is negative.\n\nParameters\n----------\n\n- **fileType:** Type of the files to be listed, should be any of the three: \"image\", \"video\", \"all\".\n- **startPosition:** (Optional) The position of the first file to be returned in the list. If omitted, start position is 0, which represents the first file. If it is larger than the position of the last file, return a normal response with empty entries in results instead of an error response.\n- **entryCount:** Desired number of entries to return. If it is more than the number of remaining files, just return a normal response with the actual files remaining instead of an error response.\n- **maxThumbSize:** Maximum size of thumbnail images; max(thumbnail_width, thumbnail_height). It is set to `null` when the client wants to omit thumbnail images from the result.\n\nResults\n-------\n\n- **entries:** A list of image properties. Each entry should contain the following fields except for latitude and longitude, which are optional:\n - **name:** Name of the file.\n - **fileUrl:** Absolute URL of the file, which can be used to download from the camera directly.\n - **size:** Size in bytes of the file.\n - **dateTimeZone:** Date, time, and time zone for the file, in the format: `YYYY:MM:DD HH:MM:SS+(-)HH:MM`. Use 24-hour format for the time. Date and time are separated by one blank character. Time zone is offset from UTC time. **Please note this\n represents the ending of the capture for videos.**\n - **lat:** (Optional) Latitude of the location at the time of file capture.\n - **lng:** (Optional) Longitude of the location at the time of file capture.\n - **width:** Width of the image or each video frame.\n - **height:** Height of the image or each video frame.\n - **thumbnail:** Base64 encoded string for thumbnail image of the file (when `maxThumbSize != null`).\n - **isProcessed:** A boolean value indicating if the file is processed (e.g. stitched) or it is only a preview. This should be true by default unless `delayProcessing` is set to true. If a processed image exists, the corresponding preview image shouldn't be listed even if it exists, otherwise, list the preview image.\n - **previewUrl:** Default to empty string if `delayProcessing` is not supported or when `isProcessed` equals false or when preview image was never generated as an intermediate result, otherwise, it is the URL of the preview image corresponding to the final image. This is used to build the correspondence between the preview image and the final image.\n- **totalEntries:** Total number of entries of `fileType` in storage, e.g. if fileType is \"image\", it is the total number of images in storage.\n\nErrors\n------\n\n- **missingParameter:** Any required parameter is not specified; for example, `entryCount` is not specified.\n- **invalidParameterName:** The input parameter name is unrecognized.\n- **invalidParameterValue:** The input parameter name is recognized, but its value is invalid; for example, the `entryCount` is negative or its data type is incorrect.\n\n| Command I/O ----------- ||\n|----------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Command Input** | ```text { \"parameters\": { \"entryCount\": 50, \"maxThumbSize\": 100 } } ``` |\n| **Command Output** | ```text { \"results\": { \"entries\": [ { \"name\": \"abc\", \"fileUrl\": \"file URL\", \"size\": file size, # of bytes, \"dateTimeZone\": \"2014:12:27 08:00:00+08:00\", \"lat\": 50.5324, \"lng\": -120.2332, \"width\": 2000, \"height\": 1000, \"thumbnail\": \"ENCODEDSTRING\", \"isProcessed\": true, \"previewUrl\": \"\" } ... { ... } ], \"totalEntries\": 250 } } ``` |\n| **Command Output (Error)** | ```text { \"error\": { \"code\": \"invalidParameterValue\", \"message\": \"Parameter entryCount is negative.\" } } ``` |"]]