Spaces
A space is a directory in which views are saved. Spaces provide a way to group datasets by common themes such as a project, purpose, department, or geographic region. This API allows you to add, delete, and list spaces. The space name cannot be modified after creation.
Space Object{
"id": "c6d1f114-e3f5-459c-a935-a78dbf7a4ba4",
"path": [
"reporting"
],
"tag": "676e73e0-8b51-44d0-972d-ef80c29ac0c6",
"type": "CONTAINER",
"containerType": "SPACE",
"stats": {
"datasetCount": 0,
"datasetCountBounded": false
},
"createdAt": "2021-05-22T20:09:40.923Z",
"owner": {
"ownerId": "a430ed7f-7142-4e1f-ba7d-94173afdc9a3",
"ownerType": "USER"
},
"permissions": [
"READ",
"WRITE",
"ALTER_REFLECTION",
"SELECT",
"ALTER",
"VIEW_REFLECTION",
"MODIFY",
"MANAGE_GRANTS",
"CREATE_TABLE",
"DROP",
"EXTERNAL_QUERY",
"ALL"
]
}
Space Attributes
name
String
The user-defined name for a space.
Example
reporting
entityType / containerType
String
Specifies the type of catalog entity. For spaces, the type is space.
id
String (UUID)
The UUID that is generated to identify a space.
Example
c6d1f114-e3f5-459c-a935-a78dbf7a4ba4
tag
String
Identifies the instance of the space. Dremio Cloud changes this tag whenever a change is made to the space. Immutable by the user.
Example
676e73e0-8b51-44d0-972d-ef80c29ac0c6
createdAt
String
The date and time that the space was created.
Example
2021-05-22T20:09:40.923Z
accessControlList
Object
The list of permissions that can be set for a space.
Object
Information about the space's owner. The owner object does not appear if the space is owned by Dremio's system user.
permissions
[String]
The permissions that the user has to a space.
path
[String]
The path for a space. Use the user-defined name for the space.
Example "reporting"
type
String
Indicates the category for the type. For spaces, the category type is CONTAINER. Immutable.
Object
Dataset statistics for a space.
stats
datasetCount
integer
The number of datasets in a space.
Example 12
datasetCountBounded
boolean
True if the dataset count has bounds, otherwise is false.
Example false
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
Adding a Space
Add a space.
Adding a SpacePOST /v0/projects/{project-id}/catalog
Parameters
project-id
path
string (UUID)
The ID of the project that you want to add a space for.
entityType
query
String
Specifies the type of catalog entity. In this case, use space .
name
query
String
The user-defined name for the space.
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": "space", "name": "reporting"}'
{
"entityType": "space",
"id": "c6d1f114-e3f5-459c-a935-a78dbf7a4ba4",
"name": "reporting",
"tag": "676e73e0-8b51-44d0-972d-ef80c29ac0c6",
"createdAt": "2021-05-22T20:09:40.923Z",
"accessControlList": {},
"permissions": [],
"owner": {
"ownerId": "a430ed7f-7142-4e1f-ba7d-94173afdc9a3",
"ownerType": "USER"
}
}
Responses
200
Space created successfully
400
Bad input parameter
401
Unauthorized access
404
Not found
Retrieving a Space
Get the space metadata (privileges) for an existing space by providing the space ID that was returned on creation of the space.
Retrieving a SpaceGET /v0/projects/{project-id}/catalog/{id}
Parameters
project-id
path
string (UUID)
The ID of the project that you want to get a space for.
id
path
string (UUID)
The ID of the space for which you want to retrieve metadata.
curl -X GET 'https://api.dremio.cloud/v0/projects/02d36975-73eb-47ed-9bb5-de73060380f6/catalog/c6d1f114-e3f5-459c-a935-a78dbf7a4ba4' \
-H 'Authorization: Bearer <personal access token>' \
-H 'Content-Type: application/json'
{
"entityType": "space",
"id": "c6d1f114-e3f5-459c-a935-a78dbf7a4ba4",
"name": "reporting",
"tag": "676e73e0-8b51-44d0-972d-ef80c29ac0c6",
"createdAt": "2021-05-22T20:09:40.923Z",
"accessControlList": {},
"permissions": [],
"owner": {
"ownerId": "a430ed7f-7142-4e1f-ba7d-94173afdc9a3",
"ownerType": "USER"
}
}
Responses
200
Space metadata returned successfully
400
Bad input parameter
401
Unauthorized access
404
Not found
Deleting a Space
Delete a space by providing the space ID that was returned on creation of the space.
Deleting a SpaceDELETE /v0/projects/{project-id}/catalog/{id}
Parameters
project-id
path
string (UUID)
The ID of the project that contains the space that you want to delete.
id
path
string (UUID)
The ID of the space that you want to delete.
curl -X DELETE 'https://api.dremio.cloud/v0/projects/02d36975-73eb-47ed-9bb5-de73060380f6/catalog/c6d1f114-e3f5-459c-a935-a78dbf7a4ba4' \
-H 'Authorization: Bearer <personal access token>' \
-H 'Content-Type: application/json'
No response