Halo Connect SQL Passthrough API

Send SQL queries to practices as immediate, async or registered queries. **Immediate queries** are small, time-sensitive queries that return a result in seconds. Response size is limited to 8MB. **Async queries** are queued for execution and results can be retrieved later. The workflow is: 1. **Submit async query** – Creates a query and returns a `queryId` on success. 2. **Get query status** – Check query status. When complete, includes pagination details. 3. **Get query result page** – Retrieve result pages using the pagination info from the status response. **Registered Queries** are also supported. See the [Registered Queries](#tag/Registered-Queries) section for more information.

Operations 10

POST /desktop/sites/{siteId}/queries/immediate Execute immediate query #
POST /desktop/sites/{siteId}/queries/async Submit async query #
GET /desktop/sites/{siteId}/queries/{queryId} Get query status #
GET /desktop/sites/{siteId}/queries/{queryId}/results/{pageNumber} Get query result page #
POST /integrator/sites/{siteId}/queries/immediate Execute immediate query #
POST /integrator/sites/{siteId}/queries/async Submit async query #
GET /integrator/sites/{siteId}/queries/{queryId} Get query status #
POST /integrator/sites/{siteId}/queries/status Get batch query status #
GET /integrator/sites/{siteId}/queries/{queryId}/results/{pageNumber} Get query result page #
GET /integrator/sites/{siteId}/queries/{queryId}/results/{pageNumber}/stream Stream result page #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/halo-connect-sql-passthrough-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

halo-connect-sql-passthrough-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Halo Connect SQL Passthrough API
  version: 26.619.10213
  license:
    name: Copyright © Halo Connect 2023
    url: http://haloconnect.io
  x-logo:
    url: https://20496383.fs1.hubspotusercontent-na1.net/hubfs/20496383/halo_logo%20(1).png
    altText: Halo Connect Logo
  description: 'Operations tagged SQL Passthrough across 2 of this provider''s published API definitions: halo-connect-desktop-openapi.json, halo-connect-integrator-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.haloconnect.io
  description: Production
- url: https://api.stage.haloconnect.io
  description: Stage
tags:
- name: SQL Passthrough
  description: "Send SQL queries to practices as immediate, async or registered queries.\n\n**Immediate queries** are small, time-sensitive queries that return a result in seconds. Response size is limited to 8MB.\n\n**Async queries** are queued for execution and results can be retrieved later. The workflow is:\n\n  1. **Submit async query** – Creates a query and returns a `queryId` on success.\n  2. **Get query status** – Check query status. When complete, includes pagination details.\n  3. **Get query result page** – Retrieve result pages using the pagination info from the status response.\n\n**Registered Queries** are also supported. See the [Registered Queries](#tag/Registered-Queries) section for more information.\n"
paths:
  /desktop/sites/{siteId}/queries/immediate:
    post:
      tags:
      - SQL Passthrough
      summary: Execute immediate query
      description: 'Send an immediate query to a site and receive the result in the response.


        Query status can also be retrieved using the **Get query status** endpoint.

        '
      operationId: createImmediateQuery
      parameters:
      - name: siteId
        in: path
        description: Halo GUID of the site.
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Immediate query executed.
          content:
            application/json:
              schema:
                allOf:
                - type: object
                  required:
                  - id
                  - integratorId
                  - siteId
                  - mode
                  - status
                  - maxTimeInQueue
                  - commandSize
                  - createdAt
                  - updatedAt
                  - requestSize
                  properties:
                    id:
                      type: string
                      format: uuid
                      description: Unique identifier of the entity.
                    integratorId:
                      type: string
                      format: uuid
                      description: Id of the Integrator that created the query.
                    siteId:
                      type: string
                      format: uuid
                      description: Halo GUID of the site.
                    mode:
                      type: string
                      enum:
                      - immediate
                    maxTimeInQueue:
                      type: integer
                      format: milli-seconds
                      example: 15000
                      minimum: 0
                      maximum: 60000
                      default: 30000
                    commandSize:
                      type: integer
                      example: 98
                    requestSize:
                      type: integer
                      example: 98
                    createdAt:
                      type: string
                      format: date-time
                    updatedAt:
                      type: string
                      format: date-time
                - type: object
                  properties:
                    status:
                      type: string
                      enum:
                      - successful
                    statusTiming:
                      allOf:
                      - type: object
                        description: The server time (UTC) at which a query entered and exited the various states.
                        properties:
                          initialising:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                            required:
                            - startTime
                          executing:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                          downloading:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                          uploading:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                        required:
                        - initialising
                        - executing
                    metrics:
                      type: object
                      required:
                      - sqlExecutionDuration
                      properties:
                        sqlExecutionDuration:
                          type: integer
                          example: 1000
                          description: The number of milli-seconds from when Halo Link Service sends a query to the database until it gets a response.
                    result:
                      oneOf:
                      - type: object
                        required:
                        - rows
                        - size
                        - data
                        properties:
                          rows:
                            type: integer
                            example: 30
                          size:
                            type: integer
                            example: 25
                          data:
                            type: string
                            format: base64
                            description: Result data that is base64 encoded returned from the executed query.
                            example: e2lk...
                          parameters:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  example: '@siteid'
                                  description: The name of the parameter.
                                direction:
                                  description: A value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.
                                  type: string
                                  enum:
                                  - output
                                  - input
                                  - inputOutput
                                  - returnValue
                                type:
                                  description: Specifies SQL Server-specific data type of a field, property.
                                  type: string
                                  enum:
                                  - BigInt
                                  - Binary
                                  - Bit
                                  - Char
                                  - String
                                  - Date
                                  - DateTime
                                  - DateTime2
                                  - DateTimeOffset
                                  - Decimal
                                  - Float
                                  - Image
                                  - Int
                                  - Money
                                  - NChar
                                  - NText
                                  - NVarChar
                                  - Real
                                  - SmallDateTime
                                  - SmallInt
                                  - SmallMoney
                                  - Structured
                                  - Text
                                  - Time
                                  - Timestamp
                                  - TinyInt
                                  - Udt
                                  - UniqueIdentifier
                                  - VarBinary
                                  - VarChar
                                  - Variant
                                  - Xml
                                value:
                                  description: Gets or sets the value of the parameter.
                                  type:
                                  - string
                                  - 'null'
                                  format: base64 (output)
                                  example: '66'
                                size:
                                  description: The maximum size, in bytes, of the data within the column.
                                  type: integer
                                  example: 43
                      - type: object
                        required:
                        - rowsAffected
                        - size
                        properties:
                          rowsAffected:
                            type: integer
                            example: 30
                          size:
                            type: integer
                            example: 25
                          parameters:
                            type: array
                            items:
                              type: object
                              properties:
                                name:
                                  type: string
                                  example: '@siteid'
                                  description: The name of the parameter.
                                direction:
                                  description: A value that indicates whether the parameter is input-only, output-only, bidirectional, or a stored procedure return value parameter.
                                  type: string
                                  enum:
                                  - output
                                  - input
                                  - inputOutput
                                  - returnValue
                                type:
                                  description: Specifies SQL Server-specific data type of a field, property.
                                  type: string
                                  enum:
                                  - BigInt
                                  - Binary
                                  - Bit
                                  - Char
                                  - String
                                  - Date
                                  - DateTime
                                  - DateTime2
                                  - DateTimeOffset
                                  - Decimal
                                  - Float
                                  - Image
                                  - Int
                                  - Money
                                  - NChar
                                  - NText
                                  - NVarChar
                                  - Real
                                  - SmallDateTime
                                  - SmallInt
                                  - SmallMoney
                                  - Structured
                                  - Text
                                  - Time
                                  - Timestamp
                                  - TinyInt
                                  - Udt
                                  - UniqueIdentifier
                                  - VarBinary
                                  - VarChar
                                  - Variant
                                  - Xml
                                value:
                                  description: Gets or sets the value of the parameter.
                                  type:
                                  - string
                                  - 'null'
                                  format: base64 (output)
                                  example: '66'
                                size:
                                  description: The maximum size, in bytes, of the data within the column.
                                  type: integer
                                  example: 43
                    resultSize:
                      type: integer
                      example: 98
                    completedAt:
                      type: string
                      format: date-time
                  required:
                  - statusTiming
                  - metrics
                  - result
                  - completedAt
        '400':
          description: Bad Request - Invalid request path, parameter or body.
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    error:
                      type: object
                      properties:
                        status:
                          type: integer
                          format: httpStatus
                        statusText:
                          type: string
                          format: httpStatusPhrase
                        message:
                          type: string
                - allOf:
                  - type: object
                    required:
                    - id
                    - integratorId
                    - siteId
                    - mode
                    - status
                    - maxTimeInQueue
                    - commandSize
                    - createdAt
                    - updatedAt
                    - requestSize
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the entity.
                      integratorId:
                        type: string
                        format: uuid
                        description: Id of the Integrator that created the query.
                      siteId:
                        type: string
                        format: uuid
                        description: Halo GUID of the site.
                      mode:
                        type: string
                        enum:
                        - immediate
                      maxTimeInQueue:
                        type: integer
                        format: milli-seconds
                        example: 15000
                        minimum: 0
                        maximum: 60000
                        default: 30000
                      commandSize:
                        type: integer
                        example: 98
                      requestSize:
                        type: integer
                        example: 98
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                        - executionFailed
                      statusTiming:
                        example:
                          statusTiming:
                            initialising:
                              startTime: '2019-08-24T14:15:22.847Z'
                            executing:
                              startTime: '2019-08-24T14:15:22.847Z'
                        type: object
                        description: The server time (UTC) at which a query entered and exited the various states.
                        properties:
                          initialising:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                            required:
                            - startTime
                          queued:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                          executing:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                          uploading:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                        required:
                        - initialising
                      errorCode:
                        deprecated: true
                        type: integer
                      errorMessage:
                        deprecated: true
                        type: string
                      errorDetails:
                        type: object
                        properties:
                          errorType:
                            type: string
                            enum:
                            - http
                            - mssql
                            - fbsql
                            - haloLink
                          errorCode:
                            type: integer
                          errorMessage:
                            type: string
                      completedAt:
                        type: string
                        format: date-time
        '401':
          description: Unauthorized request.
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    error:
                      type: object
                      properties:
                        status:
                          type: integer
                          format: httpStatus
                        statusText:
                          type: string
                          format: httpStatusPhrase
                        message:
                          type: string
                - allOf:
                  - type: object
                    required:
                    - id
                    - integratorId
                    - siteId
                    - mode
                    - status
                    - maxTimeInQueue
                    - commandSize
                    - createdAt
                    - updatedAt
                    - requestSize
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the entity.
                      integratorId:
                        type: string
                        format: uuid
                        description: Id of the Integrator that created the query.
                      siteId:
                        type: string
                        format: uuid
                        description: Halo GUID of the site.
                      mode:
                        type: string
                        enum:
                        - immediate
                      maxTimeInQueue:
                        type: integer
                        format: milli-seconds
                        example: 15000
                        minimum: 0
                        maximum: 60000
                        default: 30000
                      commandSize:
                        type: integer
                        example: 98
                      requestSize:
                        type: integer
                        example: 98
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                        - executionFailed
                      statusTiming:
                        example:
                          statusTiming:
                            initialising:
                              startTime: '2019-08-24T14:15:22.847Z'
                            executing:
                              startTime: '2019-08-24T14:15:22.847Z'
                        type: object
                        description: The server time (UTC) at which a query entered and exited the various states.
                        properties:
                          initialising:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                            required:
                            - startTime
                          queued:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                          executing:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                          uploading:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                        required:
                        - initialising
                      errorCode:
                        deprecated: true
                        type: integer
                      errorMessage:
                        deprecated: true
                        type: string
                      errorDetails:
                        type: object
                        properties:
                          errorType:
                            type: string
                            enum:
                            - http
                            - mssql
                            - fbsql
                            - haloLink
                          errorCode:
                            type: integer
                          errorMessage:
                            type: string
                      completedAt:
                        type: string
                        format: date-time
        '403':
          description: Access to resource is forbidden.
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    error:
                      type: object
                      properties:
                        status:
                          type: integer
                          format: httpStatus
                        statusText:
                          type: string
                          format: httpStatusPhrase
                        message:
                          type: string
                - allOf:
                  - type: object
                    required:
                    - id
                    - integratorId
                    - siteId
                    - mode
                    - status
                    - maxTimeInQueue
                    - commandSize
                    - createdAt
                    - updatedAt
                    - requestSize
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the entity.
                      integratorId:
                        type: string
                        format: uuid
                        description: Id of the Integrator that created the query.
                      siteId:
                        type: string
                        format: uuid
                        description: Halo GUID of the site.
                      mode:
                        type: string
                        enum:
                        - immediate
                      maxTimeInQueue:
                        type: integer
                        format: milli-seconds
                        example: 15000
                        minimum: 0
                        maximum: 60000
                        default: 30000
                      commandSize:
                        type: integer
                        example: 98
                      requestSize:
                        type: integer
                        example: 98
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                  - type: object
                    properties:
                      status:
                        type: string
                        enum:
                        - executionFailed
                      statusTiming:
                        example:
                          statusTiming:
                            initialising:
                              startTime: '2019-08-24T14:15:22.847Z'
                            executing:
                              startTime: '2019-08-24T14:15:22.847Z'
                        type: object
                        description: The server time (UTC) at which a query entered and exited the various states.
                        properties:
                          initialising:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                            required:
                            - startTime
                          queued:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                          executing:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                          uploading:
                            properties:
                              startTime:
                                type: string
                                format: date-time
                              endTime:
                                type: string
                                format: date-time
                        required:
                        - initialising
                      errorCode:
                        deprecated: true
                        type: integer
                      errorMessage:
                        deprecated: true
                        type: string
                      errorDetails:
                        type: object
                        properties:
                          errorType:
                            type: string
                            enum:
                            - http
                            - mssql
                            - fbsql
                            - haloLink
                          errorCode:
                            type: integer
                          errorMessage:
                            type: string
                      completedAt:
                        type: string
                        format: date-time
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    error:
                      type: object
                      properties:
                        status:
                          type: integer
                          format: httpStatus
                        statusText:
                          type: string
                          format: httpStatusPhrase
                        message:
                          type: string
                - allOf:
                  - type: object
                    required:
                    - id
                    - integratorId
                    - siteId
                    - mode
                    - status
                    - maxTimeInQueue
                    - commandSize
                    - createdAt
                    - updatedAt
                    - requestSize
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Unique identifier of the entity.
                      integratorId:
                        type: string
                        format: uuid
                        description: Id of the Integrator that created the query.
                      siteId:
                        type: string
                        format: uuid
                        description: Halo GUID of the site.
                      mode:
                        type: string
                        enum:
                        - immediate
                      maxTimeInQueue:
                        type: integer
                        format: milli-seconds
                        example: 15000
                        minimum: 0
                        maximum: 60000
                        default: 30000
                      commandSize:
                        type: integer
                        example: 98
                      requestSize:
                        type: integer
                        example: 98
                      createdAt:
                        type: string
                        format: date-time
                      updatedAt:
                        type: string
                        format: date-time
                  - type:

# --- truncated at 32 KB (186 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/halo-connect/refs/heads/main/openapi/halo-connect-sql-passthrough-api-openapi.yml