Skip to main content
GET
https://sandbox.getcollate.io/api
/
v1
/
search
/
fieldQuery
GET /v1/search/fieldQuery
from metadata.sdk import configure, get_client

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)
client = get_client()

# Find tables with a specific column name
response = client.get("/search/fieldQuery", params={
    "fieldName": "columns.name",
    "fieldValue": "shop_id",
    "index": "table_search_index"
})

for hit in response["hits"]["hits"]:
    entity = hit["_source"]
    print(f"{entity['fullyQualifiedName']} (score: {hit['_score']})")

# Find entities with a specific tag
response = client.get("/search/fieldQuery", params={
    "fieldName": "tags.tagFQN",
    "fieldValue": "PII.Sensitive",
    "index": "table_search_index"
})

for hit in response["hits"]["hits"]:
    entity = hit["_source"]
    print(f"{entity['fullyQualifiedName']}")
{
  "took": 5,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0,
    "skipped": 0
  },
  "hits": {
    "total": {
      "value": 12,
      "relation": "eq"
    },
    "hits": [
      {
        "_index": "table_search_index",
        "_id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
        "_score": 1.8,
        "_source": {
          "id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
          "name": "dim_customer",
          "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer",
          "entityType": "table",
          "serviceType": "BigQuery",
          "description": "Customer dimension table with shop_id reference",
          "owners": [],
          "tags": [],
          "columns": [
            {
              "name": "shop_id",
              "dataType": "NUMERIC",
              "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer.shop_id"
            }
          ]
        }
      }
    ]
  }
}

Field Query

Search for entities by matching a specific field to a given value. This is useful for finding entities that have a particular column name, tag, owner, or other field-level attribute.

Query Parameters

fieldName
string
required
Field path to search. Common values: columns.name, tags.tagFQN, owners.name, service.name, database.name, databaseSchema.name.
fieldValue
string
required
Value to match against the specified field.
index
string
required
Search index to query. Options: table_search_index, topic_search_index, dashboard_search_index, pipeline_search_index, mlmodel_search_index, container_search_index, search_entity_search_index, glossary_term_search_index, tag_search_index, user_search_index, team_search_index, domain_search_index, data_product_search_index.
from
integer
default:"0"
Starting offset for pagination.
size
integer
default:"10"
Number of results to return.
GET /v1/search/fieldQuery
from metadata.sdk import configure, get_client

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)
client = get_client()

# Find tables with a specific column name
response = client.get("/search/fieldQuery", params={
    "fieldName": "columns.name",
    "fieldValue": "shop_id",
    "index": "table_search_index"
})

for hit in response["hits"]["hits"]:
    entity = hit["_source"]
    print(f"{entity['fullyQualifiedName']} (score: {hit['_score']})")

# Find entities with a specific tag
response = client.get("/search/fieldQuery", params={
    "fieldName": "tags.tagFQN",
    "fieldValue": "PII.Sensitive",
    "index": "table_search_index"
})

for hit in response["hits"]["hits"]:
    entity = hit["_source"]
    print(f"{entity['fullyQualifiedName']}")
{
  "took": 5,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "failed": 0,
    "skipped": 0
  },
  "hits": {
    "total": {
      "value": 12,
      "relation": "eq"
    },
    "hits": [
      {
        "_index": "table_search_index",
        "_id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
        "_score": 1.8,
        "_source": {
          "id": "7c2191b6-81da-4c97-83c4-1a537e54a3b0",
          "name": "dim_customer",
          "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer",
          "entityType": "table",
          "serviceType": "BigQuery",
          "description": "Customer dimension table with shop_id reference",
          "owners": [],
          "tags": [],
          "columns": [
            {
              "name": "shop_id",
              "dataType": "NUMERIC",
              "fullyQualifiedName": "sample_data.ecommerce_db.shopify.dim_customer.shop_id"
            }
          ]
        }
      }
    ]
  }
}

Returns

Returns an Elasticsearch-style response containing entities where the specified field matches the given value.

Response

took
integer
Time in milliseconds the search took to execute.
timed_out
boolean
Whether the search timed out.
hits
object
Search results container.

Common Field Paths

Field PathDescriptionApplicable Indexes
columns.nameColumn name within a tabletable_search_index
tags.tagFQNFully qualified tag name (e.g., PII.Sensitive)All indexes
owners.nameOwner usernameAll indexes
service.nameService nameAll entity indexes
database.nameDatabase nametable_search_index
databaseSchema.nameSchema nametable_search_index

Error Handling

CodeError TypeDescription
400BAD_REQUESTMissing required parameters or invalid field path
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to search entities