curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation RefreshConnection($id: ID!) { connectionRefresh(id: $id) }",
    "variables": {
      "id": "et-connection-id-here"
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "connectionRefresh": true
  }
}

Overview

The connectionRefresh mutation triggers an asynchronous job that refreshes the metadata for a data warehouse connection. Specifically, it refreshes the list of databases, tables, and columns for the given connection. This operation starts a background job and returns immediately without waiting for completion. The refresh process will discover new tables, updated schemas, and column changes in your data warehouse.

Signature

connectionRefresh(id: ID!): Boolean!
This mutation can only be executed by an administrator or a data administrator of the specific connection ID.
The refresh cannot be triggered when a connection is already in QUEUED or RUNNING status. Wait for the current sync to complete before starting a new one.

Arguments

id
ID!
required
The unique identifier of the connection to refresh

Response

The response returns a Boolean indicating whether the refresh job was successfully triggered:
  • true - Refresh job was successfully started
On failure, the mutation throws a GraphQL error rather than returning false.

Usage Example

To refresh a connection’s metadata, provide the connection ID to the mutation. Here’s an example of how this mutation could be used:
mutation RefreshConnection($id: ID!) {
  connectionRefresh(id: $id)
}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "mutation RefreshConnection($id: ID!) { connectionRefresh(id: $id) }",
    "variables": {
      "id": "et-connection-id-here"
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "connectionRefresh": true
  }
}