Adobe Experience Cloud Queries API

Operations for the Query Service

OpenAPI Specification

adobe-experience-cloud-queries-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Adobe Experience Cloud Adobe Analytics 2.0 Activities Queries API
  description: The Adobe Analytics 2.0 API provides programmatic access to Adobe Analytics reporting, management, and configuration capabilities. It enables developers to retrieve report data, manage report suites, configure calculated metrics, segments, and dimensions, and administer users and permissions within Adobe Analytics. The API uses OAuth 2.0 authentication via Adobe I/O and returns JSON responses.
  version: 2.0.0
  contact:
    name: Adobe Developer
    url: https://developer.adobe.com/analytics-apis/docs/2.0/
  license:
    name: Proprietary
    url: https://www.adobe.com/legal/terms.html
servers:
- url: https://analytics.adobe.io
  description: Adobe Analytics Production API
security:
- bearerAuth: []
- apiKey: []
tags:
- name: Queries
  description: Operations for the Query Service
paths:
  /data/foundation/query/queries:
    get:
      operationId: listQueries
      summary: Adobe Experience Platform Adobe Experience Cloud List Queries
      description: Returns a paginated list of queries that have been submitted to the Query Service, including their SQL statements, status, and execution metadata.
      tags:
      - Queries
      parameters:
      - $ref: '#/components/parameters/sandboxHeader'
      - name: limit
        in: query
        schema:
          type: integer
          default: 20
      responses:
        '200':
          description: A list of queries.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueryList'
              examples:
                listQueries200Example:
                  summary: Default listQueries 200 response
                  x-microcks-default: true
                  value:
                    queries:
                    - example
                    _page:
                      totalCount: 1
        '401':
          description: Authentication credentials are missing or invalid.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    post:
      operationId: createQuery
      summary: Adobe Experience Platform Adobe Experience Cloud Submit a Query
      description: Submits a new SQL query to the Query Service for execution against datasets in the Data Lake. Returns a query ID that can be used to poll for results.
      tags:
      - Queries
      parameters:
      - $ref: '#/components/parameters/sandboxHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - dbName
              - sql
              properties:
                dbName:
                  type: string
                  description: The database name (sandbox name).
                sql:
                  type: string
                  description: The SQL query to execute.
                name:
                  type: string
                  description: Optional name for the query.
            examples:
              createQueryRequestExample:
                summary: Default createQuery request
                x-microcks-default: true
                value:
                  dbName: Example Name
                  sql: example
                  name: Example Name
      responses:
        '202':
          description: Query submitted for execution.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Query'
              examples:
                createQuery202Example:
                  summary: Default createQuery 202 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    dbName: Example Name
                    sql: example
                    name: Example Name
                    state: SUBMITTED
                    created: '2025-03-15T14:30:00Z'
                    updated: '2025-03-15T14:30:00Z'
                    rowCount: 1
        '400':
          description: Invalid SQL syntax.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /data/foundation/query/queries/{queryId}:
    get:
      operationId: getQuery
      summary: Adobe Experience Platform Adobe Experience Cloud Get Query Status
      description: Retrieves the status, execution metadata, and results reference for a previously submitted query.
      tags:
      - Queries
      parameters:
      - $ref: '#/components/parameters/sandboxHeader'
      - name: queryId
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Query status returned successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Query'
              examples:
                getQuery200Example:
                  summary: Default getQuery 200 response
                  x-microcks-default: true
                  value:
                    id: abc123
                    dbName: Example Name
                    sql: example
                    name: Example Name
                    state: SUBMITTED
                    created: '2025-03-15T14:30:00Z'
                    updated: '2025-03-15T14:30:00Z'
                    rowCount: 1
        '404':
          description: Query not found.
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    Query:
      type: object
      properties:
        id:
          type: string
        dbName:
          type: string
        sql:
          type: string
        name:
          type: string
        state:
          type: string
          enum:
          - SUBMITTED
          - IN_PROGRESS
          - SUCCESS
          - FAILED
        created:
          type: string
          format: date-time
        updated:
          type: string
          format: date-time
        rowCount:
          type: integer
    QueryList:
      type: object
      properties:
        queries:
          type: array
          items:
            $ref: '#/components/schemas/Query'
        _page:
          type: object
          properties:
            totalCount:
              type: integer
  parameters:
    sandboxHeader:
      name: x-sandbox-name
      in: header
      required: true
      description: The name of the sandbox to operate in.
      schema:
        type: string
        default: prod
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth 2.0 access token obtained via Adobe I/O.
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Adobe I/O client API key.