> ## Documentation Index
> Fetch the complete documentation index at: https://ago.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Query App Database



## OpenAPI

````yaml /openapi-v1.json post /api/v1/apps/{name}/databases/{binding}/query
openapi: 3.1.0
info:
  title: AGO Public API
  version: 1.0.0
  description: Programmatic access to your AGO workspace.
servers:
  - url: https://{tenant_id}.api.useago.com
    description: AGO Public API v1
    variables:
      tenant_id:
        default: your-tenant-id
        description: Your AGO tenant identifier
security: []
paths:
  /api/v1/apps/{name}/databases/{binding}/query:
    post:
      tags:
        - Apps
      summary: Query App Database
      operationId: core_api_v1_controllers_apps_query_app_database
      parameters:
        - in: path
          name: name
          schema:
            title: Name
            type: string
          required: true
        - in: path
          name: binding
          schema:
            title: Binding
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppDatabaseQueryIn'
        required: true
      responses:
        '200':
          description: OK
      security:
        - ScopedAPIKeyAuth: []
components:
  schemas:
    AppDatabaseQueryIn:
      properties:
        sql:
          description: A single read-only SELECT or WITH query.
          maxLength: 102400
          minLength: 1
          title: Sql
          type: string
        params:
          description: Values for the query's positional ? placeholders.
          items:
            anyOf:
              - type: string
              - type: integer
              - type: number
              - type: 'null'
          maxItems: 100
          title: Params
          type: array
      required:
        - sql
      title: AppDatabaseQueryIn
      type: object
  securitySchemes:
    ScopedAPIKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.