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
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/search?q=data%20warehouse' -i -X GET
import requests
url = "https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/search?q=data%20warehouse"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Example response body
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
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/search?q=in%3Amatatika-limited%20' -i -X GET
import requests
url = "https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/search?q=in%3Amatatika-limited%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.
Example response body
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
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/search?q=tag%3Afantastic' -i -X GET
import requests
url = "https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/search?q=tag%3Afantastic"
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("GET", url, headers=headers)
print(response.text.encode('utf8'))
Response
200 OK
Example response body
204 No Content
No response body provided.
Search for datasets in a workspace using msearch
POST /api/workspaces/{workspace-id}/datasets/_msearch
Searches the workspace {workspace-id} for datasets using an elastic search query.
Prerequisites
- Workspace
{workspace-id}must exist
Examples
- cURL
- Python (requests)
curl -H "Authorization: Bearer $ACCESS_TOKEN" 'https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/datasets/_msearch' -i -X POST \
-H 'Content-Type: text/plain; charset=ISO-8859-1' \
-d '{"preference":"search"}
{
"query":{
"bool":{
"must":[
{
"bool":{
"must":{
"bool":{
"should":[
{
"multi_match":{
"query":"data warehouse",
"fields":[
"title"
],
"type":"cross_fields",
"operator":"and"
}
},
{
"multi_match":{
"query":"data warehouse",
"fields":[
"title"
],
"type":"phrase",
"operator":"and"
}
},
{
"multi_match":{
"query":"data warehouse",
"fields":[
"title"
],
"type":"phrase_prefix",
"operator":"and"
}
}
],
"minimum_should_match":"1"
}
}
}
}
]
}
},
"highlight":{
"pre_tags":[
"<mark>"
],
"post_tags":[
"</mark>"
],
"fields":{
"title":{
}
},
"require_field_match":false
},
"size":10,
"_source":{
"includes":[
"*"
],
"excludes":[
]
}
}'
import requests
url = "https://app.meltano.com:443/api/workspaces/6be1fd17-5421-4483-933f-b824512f825c/datasets/_msearch"
data = {"preference":"search"}
{
"query":{
"bool":{
"must":[
{
"bool":{
"must":{
"bool":{
"should":[
{
"multi_match":{
"query":"data warehouse",
"fields":[
"title"
],
"type":"cross_fields",
"operator":"and"
}
},
{
"multi_match":{
"query":"data warehouse",
"fields":[
"title"
],
"type":"phrase",
"operator":"and"
}
},
{
"multi_match":{
"query":"data warehouse",
"fields":[
"title"
],
"type":"phrase_prefix",
"operator":"and"
}
}
],
"minimum_should_match":"1"
}
}
}
}
]
}
},
"highlight":{
"pre_tags":[
"<mark>"
],
"post_tags":[
"</mark>"
],
"fields":{
"title":{
}
},
"require_field_match":false
},
"size":10,
"_source":{
"includes":[
"*"
],
"excludes":[
]
}
}
headers = {
'Authorization': ACCESS_TOKEN
}
response = requests.request("POST", url, headers=headers, data=data)
print(response.text.encode('utf8'))
Response
200 OK
Example response body
204 No Content
No response body provided.