curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "query GetConnection($id: ID!) { connection(id: $id) { id details { name connectionType } status { lastRun { status endedAt } } } }",
    "variables": {
      "id": "et-connection-id-here"
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "connection": {
      "id": "et-connection-id-here",
      "details": {
        "name": "Snowflake Jan07",
        "connectionType": "SNOWFLAKE"
      },
      "status": {
        "lastRun": {
          "status": "JOB_RUN_STATUS_SUCCESS",
          "endedAt": "2025-07-21T21:45:54.931+00:00"
        }
      }
    }
  }
}

Overview

Retrieve detailed information about a specific data source connection, including its last job run and last successful job run.

Signature

connection(id: ID!): Connection!
This query can only be executed by an administrator or a data administrator of the specific connection ID.

Arguments

id
ID!
required
The unique identifier of the connection to retrieve.

Response

Returns a Connection object containing connection details and status information. See Connection schema.

Usage Example

query GetConnectionRefreshStatus($id: ID!) {
  connection(id: $id) {
    id
    status {
      lastRun {
        status
        startedAt
        endedAt
        conciseErrorMessage
      }
      lastSuccessfulRun {
        status
        endedAt
      }
    }
  }
}
curl -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer your_api_key" \
  -d '{
    "query": "query GetConnection($id: ID!) { connection(id: $id) { id details { name connectionType } status { lastRun { status endedAt } } } }",
    "variables": {
      "id": "et-connection-id-here"
    }
  }' \
  https://{ACCOUNT}.askwisdom.ai/graphql
{
  "data": {
    "connection": {
      "id": "et-connection-id-here",
      "details": {
        "name": "Snowflake Jan07",
        "connectionType": "SNOWFLAKE"
      },
      "status": {
        "lastRun": {
          "status": "JOB_RUN_STATUS_SUCCESS",
          "endedAt": "2025-07-21T21:45:54.931+00:00"
        }
      }
    }
  }
}

Additional Resources