Folders
Folders are used to help you organize your spaces. Folders can only be created in either the home space or other spaces. Folders are of entityType: folder.
Folder Object{
"entityType": "folder",
"id": "ffbe8c1d-1db7-48d1-9c58-f452838fedc0",
"path": [
"@user@dremio.com",
"test-folder"
],
"tag": "b79b70f4-d4a7-4fb5-bfbb-dc00b1b29801",
"children": [
{
"id": "1fdcf5c3-5c95-4e50-a7a3-d0aa58056c99",
"path": [
"@user@dremio.com",
"test-folder",
"view-zip-codes"
],
"tag": "a535d578-7921-4e56-b8c9-ada85d445fe6",
"type": "DATASET",
"datasetType": "VIRTUAL",
"createdAt": "2021-12-01T17:33:07.786Z"
},
{
"id": "f1ec2376-882e-406f-b37d-c97e8804b662",
"path": [
"@user@dremio.com",
"test-folder",
"test-sub-folder"
],
"tag": "eb3c936d-e476-4bfd-9738-1619e9da4c32",
"type": "CONTAINER",
"containerType": "FOLDER"
},
{
"id": "f460cfd7-8c8d-4295-ae3e-99dcc9162500",
"path": [
"@user@dremio.com",
"test-folder",
"SF-weather"
],
"tag": "75428c7f-7e69-473e-5312-7e5543eb9fda",
"type": "DATASET",
"datasetType": "PROMOTED",
"createdAt": "1970-01-01T00:00:00.000Z"
}
],
"accessControlList": {
"users": [
{
"id": "63022041-783d-557e-8ead-271f5ea25812",
"permissions": [
"SELECT",
"ALTER"
]
}
]
},
"owner": {
"ownerId": "a430ed7f-7142-4e1f-ba7d-94173afdc9a3",
"ownerType": "USER"
}
}
Folder Attributes
entityType
String
Specifies the type of container. For folders, the type is FOLDER.
id
String (UUID)
The UUID that is generated to identify a folder.
path
[String]
The path for a folder. @user@dremio.com identifies a folder in the home space.
Example "@user@dremio.com", "reporting", "test-folder"
tag
String
Identifies the instance of the folder. Dremio Cloud changes this tag whenever a change is made to the folder. Immutable by the user.
Example
676e73e0-8b51-44d0-972d-ef80c29ac0c6
Object
List of items inside a folder.
Object
The list of permissions that can be set for a folder.
Object
Information about the space's owner. The owner object does not appear if the folder is owned by Dremio's system user.
children
id
String
The UUID that is generated to identify the object.
path
query
[String]
Identifies the path to the object.
tag
String
Identifies the instance of the object. Dremio Cloud changes this tag whenever a change is made to the object. Immutable by the user.
Example
eb3a759b-e289-4bfd-9718-1619b9db4c02
type
query
String
The type of the object. For folders, the type is CONTAINER. For datasets, the type is DATASET.
Enum
CONTAINER
,
DATASET
datasetType
query
String
If the object type is a dataset, the dataset type is identified.
Enum
VIRTUAL
,
PROMOTED
containerType
query
String
If the object type is a folder. the container type is FOLDER.
createdAt
[String]
The date and time that the object was created.
accessControlList
Object
The users that can access a folder. Applicable only to the home space.
owner
ownerId
String (UUID)
Unique identifier for the space's owner.
Example
a430ed7f-7142-4e1f-ba7d-94173afdc9a3
ownerType
String
Type of owner.
Enum
USER
,
ROLE
Example
USER
users
id
String
The user ID contained in the accessControlList. Applicable only to the home space.
permissions
[String]
The permissions that the user has to a folder.
Enum
SELECT
,
ALTER
Adding a Folder
Add a folder under a space.
Adding a FolderPOST /v0/projects/{project-id}/catalog
Parameters
project-id
path
String (UUID)
The UUID for the project that you want to add a folder for.
entityType
query
String
The type of catalog object. For folders, the type is FOLDER.
path
query
[String]
Identifies the path where you want to add a folder. Includes the name of the new folder as the last item in the list.
curl -X POST 'https://api.dremio.cloud/v0/projects/02d36975-73eb-47ed-9bb5-de73060380f6/catalog' \
-H 'Authorization: Bearer <personal access token>' \
-H 'Content-Type: application/json' \
-d '{
"entityType": "folder",
"path": ["reporting", "new-folder"]
}'
{
"entityType": "folder",
"id": "ffbe8c1d-1db7-48d1-9c58-f452838fedc0",
"path": ["reporting","new-folder"],
"tag": "b79b70f4-d4a7-4fb5-bfbb-dc00b1b29801",
"accessControlList":{},
"permissions":[],
"owner": {
"ownerId": "a430ed7f-7142-4e1f-ba7d-94173afdc9a3",
"ownerType": "USER"
}
}
Responses
200
Folder created successfully
400
Bad input parameter
401
Unauthorized access
Retrieving a Folder
Get the folder metadata by providing the folder ID.
Retrieving a FolderGET /v0/projects/{project-id}/catalog/{id}
Parameters
project-id
path
String (UUID)
The UUID for the project that contains the folder.
id
path
String (UUID)
The UUID for the folder that you want to retrieve.
curl -X GET 'https://api.dremio.cloud/v0/projects/02d36975-73eb-47ed-9bb5-de73060380f6/catalog/ffbe8c1d-1db7-48d1-9c58-f452838fedc0' \
-H 'Authorization: Bearer <personal access token>' \
-H 'Content-Type: application/json'
{
"entityType": "folder",
"id": "ffbe8c1d-1db7-48d1-9c58-f452838fedc0",
"path": ["reporting","test-folder"],
"tag": "b79b70f4-d4a7-4fb5-bfbb-dc00b1b29801",
"accessControlList":{},
"permissions":[],
"owner": {
"ownerId": "a430ed7f-7142-4e1f-ba7d-94173afdc9a3",
"ownerType": "USER"
}
}
Responses
200
Folder returned successfully
400
Bad input parameter
401
Unauthorized access
404
Not found
Deleting a Folder
Delete a folder.
Deleting a FolderDELETE /v0/projects/{project-id}/catalog/{id}
Parameters
project-id
path
String (UUID)
The UUID for the project that contains the folder.
id
path
String (UUID)
The UUID for the folder that you want to delete.
curl -X DELETE 'https://api.dremio.cloud/v0/projects/02d36975-73eb-47ed-9bb5-de73060380f6/catalog/21a74cb1-3fcf-48c6-8f69-94c257ec3da3' \
-H 'Authorization: Bearer <personal access token>' \
-H 'Content-Type: application/json'
No response
Responses
204
No content
400
Bad input parameter
401
Unauthorized access
404
Not found