View a Catalog Wikis and Tags
This API retrieves Wikis and Tags.
Syntax
Method and URLGET /catalog/{id}/collaboration
Operation | URI |
---|---|
Retrieves tags for a catalog entity. | GET /api/v3/catalog/{id}/collaboration/tag |
Retrieves wiki content for a catalog entity. | GET /api/v3/catalog/{id}/collaboration/wiki |
Response Output
Tags
Tag output{
tags: String[] - the tags for the entity,
version: String
}
Wikis
Wiki output{
text: String,
version: String
}
Response Codes
Tags
400
- called on a catalog entity that can’t have tags (only source/space/dataset)403
- user does not have READ access to the entity404
- catalog entity not found or no tags defined for catalog
Wikis
403
- user does not have READ access to the entity404
- catalog entity not found or no wiki content set
Example: Get information about a dataset
The following example retrieves the catalog ID for the local_fs/my_data.csv
dataset
by using the GET /catalog/by-path
API.
These IDs are then used to retrieve and update tags/wiki content associated with the dataset.
Curl
Example requestcurl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: _dremioaj0a7eakllnorhjrcuvocha2fh" \
http://localhost:9047/api/v3/catalog/by-path/local_fs/my_data.csv
Response
Example response{
"entityType":"dataset",
"id":"7c9788ba-ead3-441f-940d-aa1a9396e87c",
"type":"PHYSICAL_DATASET",
"path":[
"local_fs",
"my_data.csv"
],
"createdAt":"2018-12-17T16:01:46.006Z",
"tag":"127",
"format":{
"type":"Text",
"ctime":0,
"isFolder":false,
"location":"/Users/molly/docs/my_data.csv",
...
}
}
Example: Get Tags
The following example retrieves the Tags for /local_fs/my_data.csv using the catalog ID, 7c9788ba-ead3-441f-940d-aa1a9396e87c
.
Curl
Example requestcurl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: _dremioaj0a7eakllnorhjrcuvocha2fh" \
http://localhost:9047/api/v3/catalog/7c9788ba-ead3-441f-940d-aa1a9396e87c/collaboration/tag
Response
Example response{"tags":["tag","anothertag","thirdtag"],"version":11}
Example: Get Wiki content
The following example retrieves Wiki content for /local_fs/my_data.csv
using the catalog ID, 7c9788ba-ead3-441f-940d-aa1a9396e87c.
Curl
Example requestcurl -X GET \
-H "Content-Type: application/json" \
-H "Authorization: _dremioaj0a7eakllnorhjrcuvocha2fh" \
http://localhost:9047/api/v3/catalog/7c9788ba-ead3-441f-940d-aa1a9396e87c/collaboration/wiki
Response
Example response{
"text": "Here is some wiki content, describing the dataset.",
"version": 3,
}