Link Search Menu Expand Document

Search

Datasets can be searched for within their containing workspace. Searches can filter datasets by arbitrary text, channel name, or tag name.

See here for more information on constructing a search filter query.


Requests


Search for datasets in a workspace by free text

GET

/api/workspaces/{workspaces-id}/search?q={free-text}

Searches the workspace {workspace-id} for datasets by the free text {free-text}.

Prerequisites

  • Workspace {workspace-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=data%20warehouse' -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/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=data%20warehouse"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

{
  "_embedded" : {
    "datasets" : [ {
      "id" : "3052fd7c-538f-4859-9646-cb0731f483af",
      "published" : "2022-06-30T15:24:41.259729",
      "alias" : "analytics-tables",
      "workspaceId" : "7c4baa20-ef71-49d9-95fc-c6afd97c4770",
      "source" : "no-picture",
      "title" : "What tables are in our #fantastic data warehouse?",
      "description" : "# Overview\nThis example is a standalone data set with no visualisation.\n\n## What tables are in my data warehouse\nOur query in this dataset selects all the tables in the same schema we have configured the workspace to use.\n```SHOW TABLES```\n\n## Notes\nThe query is database specific.  The postgres query is\n\n```SELECT * FROM pg_tables where schemaname = 'pcgmnoy'```",
      "visualisation" : "{\"google-chart\": {\"chartType\": \"Table\", \"options\": {\"title\": \"Tables\"}}}",
      "metadata" : "  {    \"name\":\"table_model\",    \"label\":\"Analytics Tables\",    \"related_table\":{      \"columns\":[        {          \"name\":\"schemaname\",          \"label\":\"Schema Name\"        }      ]    }  }",
      "query" : "SELECT schemaname \"table_model.schemaname\",tablename \"table_model.tablename\",tableowner \"table_model.tableowner\"FROM pg_tables where schemaname = 'pcgmnoy'",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-06-30T15:24:41.259727",
      "score" : 20.479294,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/data",
          "type" : "GET"
        },
        "channel" : {
          "href" : "https://catalog.matatika.com/api/channels/b4cc5f01-7a54-487b-bfe1-82690035a1a0",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/messages"
        }
      },
      "_embedded" : {
        "channel" : {
          "name" : "no-picture",
          "description" : "No picture",
          "picture" : "https://s.gravatar.com/avatar/8f4ad8fa0793181b761d030196e62053?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsu.png"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=data%20warehouse&page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

204 No Content

No response body provided.


Search for datasets in a workspace by channel name

GET

/api/workspaces/{workspaces-id}/search?q=in:{channel-name}

Searches the workspace {workspace-id} for datasets by the channel {channel-name}.

Prerequisites

  • Workspace {workspace-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=in%3Ano-picture%20' -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/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=in%3Ano-picture%20"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

Dataset collection with HAL links.

{
  "_embedded" : {
    "datasets" : [ {
      "id" : "3052fd7c-538f-4859-9646-cb0731f483af",
      "published" : "2022-06-30T15:24:41.259729",
      "alias" : "analytics-tables",
      "workspaceId" : "7c4baa20-ef71-49d9-95fc-c6afd97c4770",
      "source" : "no-picture",
      "title" : "What tables are in our #fantastic data warehouse?",
      "description" : "# Overview\nThis example is a standalone data set with no visualisation.\n\n## What tables are in my data warehouse\nOur query in this dataset selects all the tables in the same schema we have configured the workspace to use.\n```SHOW TABLES```\n\n## Notes\nThe query is database specific.  The postgres query is\n\n```SELECT * FROM pg_tables where schemaname = 'pcgmnoy'```",
      "visualisation" : "{\"google-chart\": {\"chartType\": \"Table\", \"options\": {\"title\": \"Tables\"}}}",
      "metadata" : "  {    \"name\":\"table_model\",    \"label\":\"Analytics Tables\",    \"related_table\":{      \"columns\":[        {          \"name\":\"schemaname\",          \"label\":\"Schema Name\"        }      ]    }  }",
      "query" : "SELECT schemaname \"table_model.schemaname\",tablename \"table_model.tablename\",tableowner \"table_model.tableowner\"FROM pg_tables where schemaname = 'pcgmnoy'",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-06-30T15:24:41.259727",
      "score" : 9.3605175,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/data",
          "type" : "GET"
        },
        "channel" : {
          "href" : "https://catalog.matatika.com/api/channels/5cb63623-03cd-491e-a95d-7ecc2630113b",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/messages"
        }
      },
      "_embedded" : {
        "channel" : {
          "name" : "no-picture",
          "description" : "No picture",
          "picture" : "https://s.gravatar.com/avatar/8f4ad8fa0793181b761d030196e62053?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsu.png"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=in%3Ano-picture%20&page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

204 No Content

No response body provided.


Search for datasets in a workspace by tag name

GET

/api/workspaces/{workspace-id}/search?q=tag:{tag-name}

Searches the workspace {workspace-id} for datasets by the tag {tag-name}.

Prerequisites

  • Workspace {workspace-id} must exist

Request

Example Snippets

  • cURL
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://catalog.matatika.com/api/workspaces/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=tag%3Afantastic' -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/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=tag%3Afantastic"

headers = {
  'Authorization': ACCESS_TOKEN
}

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

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

Response

200 OK

{
  "_embedded" : {
    "datasets" : [ {
      "id" : "3052fd7c-538f-4859-9646-cb0731f483af",
      "published" : "2022-06-30T15:24:41.259729",
      "alias" : "analytics-tables",
      "workspaceId" : "7c4baa20-ef71-49d9-95fc-c6afd97c4770",
      "source" : "no-picture",
      "title" : "What tables are in our #fantastic data warehouse?",
      "description" : "# Overview\nThis example is a standalone data set with no visualisation.\n\n## What tables are in my data warehouse\nOur query in this dataset selects all the tables in the same schema we have configured the workspace to use.\n```SHOW TABLES```\n\n## Notes\nThe query is database specific.  The postgres query is\n\n```SELECT * FROM pg_tables where schemaname = 'pcgmnoy'```",
      "visualisation" : "{\"google-chart\": {\"chartType\": \"Table\", \"options\": {\"title\": \"Tables\"}}}",
      "metadata" : "  {    \"name\":\"table_model\",    \"label\":\"Analytics Tables\",    \"related_table\":{      \"columns\":[        {          \"name\":\"schemaname\",          \"label\":\"Schema Name\"        }      ]    }  }",
      "query" : "SELECT schemaname \"table_model.schemaname\",tablename \"table_model.tablename\",tableowner \"table_model.tableowner\"FROM pg_tables where schemaname = 'pcgmnoy'",
      "likeCount" : 0,
      "likedByProfiles" : [ ],
      "commentCount" : 0,
      "viewCount" : 0,
      "created" : "2022-06-30T15:24:41.259727",
      "score" : 9.3605175,
      "_links" : {
        "self" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af"
        },
        "delete dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af",
          "type" : "DELETE"
        },
        "edit dataset" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af",
          "type" : "PATCH"
        },
        "data" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/data",
          "type" : "GET"
        },
        "channel" : {
          "href" : "https://catalog.matatika.com/api/channels/28949434-9f96-406d-9b7c-8241d82d06b6",
          "type" : "GET"
        },
        "new comment" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/comments",
          "type" : "POST"
        },
        "add like" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/like",
          "type" : "PUT"
        },
        "add view" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/view",
          "type" : "PUT"
        },
        "new alert" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/alerts"
        },
        "add subscription" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/subscriptions"
        },
        "new message" : {
          "href" : "https://catalog.matatika.com/api/datasets/3052fd7c-538f-4859-9646-cb0731f483af/messages"
        }
      },
      "_embedded" : {
        "channel" : {
          "name" : "no-picture",
          "description" : "No picture",
          "picture" : "https://s.gravatar.com/avatar/8f4ad8fa0793181b761d030196e62053?s=480&r=pg&d=https%3A%2F%2Fcdn.auth0.com%2Favatars%2Fsu.png"
        }
      }
    } ]
  },
  "_links" : {
    "self" : {
      "href" : "https://catalog.matatika.com/api/workspaces/7c4baa20-ef71-49d9-95fc-c6afd97c4770/search?q=tag%3Afantastic&page=0&size=20"
    }
  },
  "page" : {
    "size" : 20,
    "totalElements" : 1,
    "totalPages" : 1,
    "number" : 0
  }
}

204 No Content

No response body provided.