List files in dataset

List files in dataset

List all files and directories in specified prefix.

POSThttps://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/dataset/{dataset}/files
Path parameters
organizationId*integer

Organization ID

dataset*string

Dataset name

Body
prefix*string

S3 prefix

continuationTokenstring

Only one S3 page (1000 items typically) is returned. Pass in the continuationToken on the next request to receive the next page.

onlyFetchFoldersboolean

If set, then no files will be returned

Response

OK

Body
success*boolean

Whether the operation succeeded

errorstring

Optional error description (set if 'success' was false)

files*array of PortalFile (object)
continuationTokenstring
Request
const response = await fetch('https://studio.edgeimpulse.com/v1/api/organizations/{organizationId}/dataset/{dataset}/files', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "prefix": "text"
    }),
});
const data = await response.json();
Response
{
  "success": false,
  "error": "text",
  "files": [
    {
      "name": "text",
      "addedDate": "2019-07-21T17:32:28Z",
      "size": 0,
      "ETag": "text",
      "path": "text",
      "type": "folder"
    }
  ],
  "continuationToken": "text"
}

Last updated