On this page

    File

    Use the Catalog API to retrieve information about files.

    File Object
    {
      "entityType": "file",
      "id": "dremio:/Samples/samples.dremio.com/SF weather 2018-2019.csv",
      "path": [
        "Samples",
        "samples.dremio.com",
        "SF weather 2018-2019.csv"
      ]
    }
    

    File Attributes

    entityType

    String

    Type of the catalog object. For files, the entityType is file.

    Example file


    id

    String

    Unique identifier of the file. For files, the ID is the text path of the file within Dremio.

    Example dremio:/Samples/samples.dremio.com/SF weather 2018-2019.csv


    path

    [String]

    Path of the file within Dremio, expressed as an array. The path consists of the source or space, followed by any folder and subfolders, followed by the target file itself as the last item in the array.

    Example [ "Samples", "samples.dremio.com", "SF weather 2018-2019.csv" ]

    Retrieving a File by Path

    Retrieve information about a file by specifying its path.

    Method and URL
    GET /api/v3/catalog/by-path/{path}
    

    Parameters

    path

    path

    String

    Path of the file that you want to retrieve, with a forward slash to separate each level of nesting. URI-encode the path to replace special characters with their UTF-8 equivalents, such as %3A for a colon and %20 for a space.

    Example Samples/samples.dremio.com/SF%20weather%202018-2019.csv


    Example Request
    curl -X GET 'https://{hostname}/api/v3/catalog/by-path/Samples/samples.dremio.com/SF%20weather%2018-2019.csv' \
    --header 'Authorization: _dremio{tokenstring}' \
    --header 'Content-Type: application/json'
    
    Example Response
    {
      "entityType": "file",
      "id": "dremio:/Samples/samples.dremio.com/SF weather 2018-2019.csv",
      "path": [
        "Samples",
        "samples.dremio.com",
        "SF weather 2018-2019.csv"
      ]
    }
    

    Response Status Codes

    200

    OK

    401

    Unauthorized

    404

    Not Found

    405

    Method Not Allowed

    500

    Internal Server Error