Link Search Menu Expand Document

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 Type Format Description
id String Version 4 UUID The tag ID
name String   The tag name
usage Integer Unsigned Number of times the tag is used within the workspace
{
  "id" : "0e9ffc40-d207-448d-a269-7ae6fba5bb49",
  "name" : "fantastic",
  "usage" : 1,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/tags/0e9ffc40-d207-448d-a269-7ae6fba5bb49"
    },
    "search" : {
      "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/search?q=tag:fantastic"
    }
  }
}

Requests

See Also


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

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/tags' -i -X GET \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/json'
  • Python (requests)
import requests

url = "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/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" : "0e9ffc40-d207-448d-a269-7ae6fba5bb49",
      "name" : "fantastic",
      "usage" : 1,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/tags/0e9ffc40-d207-448d-a269-7ae6fba5bb49"
        },
        "search" : {
          "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/search?q=tag:fantastic"
        }
      }
    }, {
      "id" : "34b26443-d859-41b4-88d8-c2a0ce3d07e2",
      "name" : "postgres",
      "usage" : 1,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/tags/34b26443-d859-41b4-88d8-c2a0ce3d07e2"
        },
        "search" : {
          "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/search?q=tag:postgres"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/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

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/tags/0e9ffc40-d207-448d-a269-7ae6fba5bb49' -i -X GET \
    -H 'Accept: application/json, application/javascript, text/javascript, text/json' \
    -H 'Content-Type: application/json'
  • Python (requests)
import requests

url = "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/tags/0e9ffc40-d207-448d-a269-7ae6fba5bb49"

headers = {
  'Authorization': ACCESS_TOKEN
}

response = requests.request("GET", url, headers=headers)

print(response.text.encode('utf8'))

Response

200 OK

Tag with HAL links.

{
  "id" : "0e9ffc40-d207-448d-a269-7ae6fba5bb49",
  "name" : "fantastic",
  "usage" : 1,
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/tags/0e9ffc40-d207-448d-a269-7ae6fba5bb49"
    },
    "search" : {
      "href" : "https://catalog.matatika.com/api/workspaces/38f825db-30a9-4e63-b3d8-360bd9121df7/search?q=tag:fantastic"
    }
  }
}