import json
import os
from parable_types_web_api import SearchAvailableDataInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = SearchAvailableDataInput.model_validate(
json.loads("{\"query\":\"example\"}"),
)
result = sdk.provider_pool.search_available_data(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.SearchAvailableDataInput
if err := json.Unmarshal([]byte(`{"query":"example"}`), &input); err != nil {
return err
}
result, err := sdk.ProviderPoolNamespace.SearchAvailableData(ctx, input){
"data": {
"limit": 0,
"matches": [
{
"kind": "table",
"matchedBy": "<string>",
"pool": "<string>",
"qualifiedName": "<string>",
"score": 123,
"tableRef": "<string>",
"columnName": "<string>",
"dataType": "<string>",
"description": "<string>",
"provider": "<string>",
"rowCount": 0
}
],
"offset": 0,
"providers": [
{
"scope": "<string>",
"tableCount": 0
}
],
"nextCursor": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Too Many Requests{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Gateway TimeoutSearch available data
Searches the Provider Pools for the tables, columns and fields that hold the data a question needs. 1. query is plain text. 2. scope narrows by name before ranking: providers.jiracloud is one Provider, providers.jiracloud.issues.* the columns of one table. 3. kind keeps tables or columns. 4. limit and offset page through at most 500 ranked results. Results rank by keyword; matchedBy says whether meaning also matched. 5. An empty query (or *) lists instead of searching. With no scope, providers holds every Provider the caller may query and its table count. With one Provider as scope, such as providers.jiracloud, matches holds its tables by name with their descriptions and row counts, limit a page (100 by default, at most 40,000 characters), and nextCursor, sent back as cursor, reads the next page. A listing covers the providers Pool, as a search does. The search reads names and descriptions, never rows.
import json
import os
from parable_types_web_api import SearchAvailableDataInput
from parable_web_api_sdk import ClientConfig, WebApiSDK
sdk = WebApiSDK(
ClientConfig(
base_url=os.environ["PARABLE_API_URL"],
auth_token=os.environ["PARABLE_API_TOKEN"],
default_headers={"X-Tenant": os.environ["PARABLE_WORKSPACE"]},
)
)
input_data = SearchAvailableDataInput.model_validate(
json.loads("{\"query\":\"example\"}"),
)
result = sdk.provider_pool.search_available_data(input_data)sdk, err := webapisdk.New(webapisdk.SDKConfig{
BaseURL: os.Getenv("PARABLE_API_URL"),
Auth: &webapisdk.AuthConfig{Token: os.Getenv("PARABLE_API_TOKEN")},
RequestInterceptor: func(ctx context.Context, req *http.Request) error {
req.Header.Set("X-Tenant", os.Getenv("PARABLE_WORKSPACE"))
return nil
},
})
if err != nil {
return err
}
var input webapitypes.SearchAvailableDataInput
if err := json.Unmarshal([]byte(`{"query":"example"}`), &input); err != nil {
return err
}
result, err := sdk.ProviderPoolNamespace.SearchAvailableData(ctx, input){
"data": {
"limit": 0,
"matches": [
{
"kind": "table",
"matchedBy": "<string>",
"pool": "<string>",
"qualifiedName": "<string>",
"score": 123,
"tableRef": "<string>",
"columnName": "<string>",
"dataType": "<string>",
"description": "<string>",
"provider": "<string>",
"rowCount": 0
}
],
"offset": 0,
"providers": [
{
"scope": "<string>",
"tableCount": 0
}
],
"nextCursor": "<string>"
},
"meta": {
"requestId": "<string>",
"totalCount": 123
},
"links": {
"first": "<string>",
"last": "<string>",
"next": "<string>",
"prev": "<string>"
}
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Too Many Requests{
"detail": "<string>",
"status": 400,
"title": "Bad Request",
"type": "about:blank",
"code": "WA-VL-001",
"details": "<unknown>",
"errors": "<unknown>",
"requestId": "<string>"
}Gateway TimeoutAccess
An MCP token or a Parable token can call this operation. See Authentication for the kinds of token. Your roles must granttenant.data.query.providers.
Errors
HTTP 400: The scope is not a dotted name that starts with providers or workspace, or the scope and kind can never match together. A listing was sent a column kind, an offset, a scope other than one Provider by name, or another listing’s cursor; a search was sent a cursor. The message says what to change. A scope in a Pool the caller may not query is not an error: the search finds nothing. Start the scope with providers, such as providers.jiracloud or providers.*.issues, or leave scope and kind out. A workspace scope finds nothing through this operation. Page a listing with nextCursor, and a search with offset.HTTP 403: The caller may not query data in this Workspace. Ask a Workspace Administrator for the Provider Pools Reader role. A different query does not help.HTTP 429: Too many queries were running, so the statement did not start (QL-IN-008), or the caller sent more than 120 of these requests in a minute. Nothing ran. Wait a moment, or for the seconds in the Retry-After header when it is set, then send the same request again.HTTP 503: The statement stopped for lack of memory (QL-IN-009), a service it needs did not answer, such as the model service behind semantic ranking or a SQL AI function (QL-IN-010), or a worker that ran part of it stopped (QL-IN-012). The code says which. Try again shortly. For QL-IN-009, read fewer columns or rows, or aggregate.HTTP 504: The statement ran past its time budget (a QL-TO code) or did not finish in 30 seconds. Narrow the scope or the statement, then send it again.
Authorizations
Headers
Body
A search of the data the caller may query, by the words a table's or a column's name and description would use, or, with an empty query, a listing of the tables they may query.
A pattern over names that narrows the search before ranking, one dotted
segment at a time: providers.jiracloud is one Provider,
providers.jiracloud.issues.* the columns of one table, providers.*.issues
the tables named issues in every Provider. Null searches every Pool the
caller may query. A listing takes no scope, to list the Providers, or one
Provider by name, to list its tables.
500