Tags
Tags are hash-prefixed keywords or phrases that appear in the title, description, or comments of a dataset. Tags can be used to index datasets by their contained tags with a search, which allows for topical dataset categorisation.
Objects
Tag
| Path | JSON Type | Format | Description |
|---|---|---|---|
id | string | Version 4 UUID | The tag ID |
name | string | The tag name | |
usage | number | Unsigned integer | Number of times the tag is used within the workspace |
{
"id" : "047650a7-21e6-4654-9ef8-5ceaa22cf330",
"name" : "fantastic",
"usage" : 1,
"_links" : {
"self" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags/047650a7-21e6-4654-9ef8-5ceaa22cf330"
},
"search" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/search?q=tag%3Afantastic"
}
}
}
Requests
View all tags in a workspace
GET /api/workspaces/{workspace-id}/tags
Returns all tags in the workspace {workspace-id}.
Prerequisites
- Workspace
{workspace-id}must exist
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://staging.meltano.com:443/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags' -i -X GET
import requests
url = "https://staging.meltano.com:443/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Tag collection with HAL links.
{
"_embedded" : {
"tags" : [ {
"id" : "047650a7-21e6-4654-9ef8-5ceaa22cf330",
"name" : "fantastic",
"usage" : 1,
"_links" : {
"self" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags/047650a7-21e6-4654-9ef8-5ceaa22cf330"
},
"search" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/search?q=tag%3Afantastic"
}
}
}, {
"id" : "3550e50b-d0e0-4194-9971-8feef202b728",
"name" : "postgres",
"usage" : 1,
"_links" : {
"self" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags/3550e50b-d0e0-4194-9971-8feef202b728"
},
"search" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/search?q=tag%3Apostgres"
}
}
} ]
},
"_links" : {
"self" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags"
}
}
}
View all tags in the news for a workspace
GET /api/workspaces/{workspace-id}/news/tags
Returns all tags in the news for the workspace {workspace-id}.
Prerequisites
- Workspace
{workspace-id}must exist
Response
200 OK
Tag collection with HAL links.
View a tag in a workspace
GET /api/workspaces/{workspace-id}/tags/{tag-id}
Returns the tag {tag-id} in the workspace {workspace-id}.
Prerequisites
- Workspace
{workspace-id}must exist - Tag
{tag-id}must exist
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://staging.meltano.com:443/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags/047650a7-21e6-4654-9ef8-5ceaa22cf330' -i -X GET
import requests
url = "https://staging.meltano.com:443/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags/047650a7-21e6-4654-9ef8-5ceaa22cf330"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Tag with HAL links.
{
"id" : "047650a7-21e6-4654-9ef8-5ceaa22cf330",
"name" : "fantastic",
"usage" : 1,
"_links" : {
"self" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/tags/047650a7-21e6-4654-9ef8-5ceaa22cf330"
},
"search" : {
"href" : "https://staging.meltano.com/api/workspaces/9c12dda4-4f70-4e3f-9576-24bc6cf0816e/search?q=tag%3Afantastic"
}
}
}