Skip to content

List the files in a directory

To list files in a directory, the directory ID or the path of the file must be provided.

  • API CALL:
GET {base URL}/api/directories/{id}/files

—OR—

GET {base URL}/api/directories/files?path={file_path}
  • HEADER:

    • Accept: application/json

    This may be automatically added by your development tool. Postman and curl add this header to all requests.

    • Value: Bearer {bearer token}

    Include Trimble Identity v3 OAuth bearer token for your application.

Example response
{
  "count": 1,
  "files": [
      {
          "created_at": "2020-04-09T20:47:11.542Z",
          "fileset": false,
          "id": "43bd3f72-739e-4870-a02a-6f66bd158d37",
          "malware_status": "UNSCANNED",
          "md5": null,
          "metadata": {},
          "multipart": false,
          "path": "6d808b3f832c42289161a144136d15dd:/auto/16af92c6-b9bd-4505-8d38-a46ca358835f",
          "region_preferences": [
              "us1"
          ],
          "regions": [],
          "restricted_access": true,
          "size": null,
          "status": "UPLOADABLE",
          "upload": {
              "type": "SINGLEPART",
              "url": "https://do-us1.dev.dataocean.trimblecloud.com/s/43bd3f72-739e-4870-a02a-6f66bd158d37.1?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kby11czEuZGV2LmRhdGFvY2Vhbi50cmltYmxlY2xvdWQuY29tL3MvNDNiZDNmNzItNzM5ZS00ODcwLWEwMmEtNmY2NmJkMTU4ZDM3LjEiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1ODY5NzAzNDN9fX1dfQ__&Signature=HwxfQ~DlzrApJNDobpVHnt8XZ8LmoNF~Fz1JiQbYQFJJ2gbQvu7ZcUbXE5u6MtWideHD5cegbtynjEaOu9ASgsBnpoK7nx4-5YZzVyYLElPGPtc1a3p2kLBDsee~Yv2I~k05Ns8ZcCnBHnUh1Q0tJkVVCBqOSKLPNC75g3nK3xueGEau4TCqHp~JrFkAFYeGVS1ErydP1K2XaqNHwXBxd~DRNwCKSFUyFPpBWQioPGcv17nECIa4nulXPs30tDh9RxsVBDChYqLGt9tdHEzMlpegaY9KhevKMK7KbKbJYbwml~zLSVa7ZxNfZmYM2HzqKHoZWcCI9XGR7n8UYV8D-w__&Key-Pair-Id=APKAIYKC33CPV5K7WAPQ"
          },
          "version": 1
      }
  ]
}

Reference Materials

Data Ocean API definition