Oracle Database Performance API

SQL performance analysis, execution plans, and active session history

Operations 8

GET /database/performance/sql_statements/ Oracle Database Get all SQL statements #
GET /database/performance/top_sql_statements/ Oracle Database Get top SQL by CPU usage #
GET /database/performance/sql_statements/{sql_id}/ Oracle Database Get SQL statement statistics #
GET /database/performance/sql_statements/{sql_id}/text Oracle Database Get SQL statement text #
GET /database/performance/sql_statements/{sql_id}/plan Oracle Database Get SQL execution plan #
GET /database/performance/sql_statements/{sql_id}/history Oracle Database Get SQL statement history #
GET /database/performance/active_sessions_history/ Oracle Database Get active sessions history #
GET /database/performance/active_sessions_history_waits/ Oracle Database Get active session history waits #

Documentation

Specifications

Schemas & Data

Other Resources

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/oracle-database-performance-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 form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

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

OpenAPI Specification

oracle-database-performance-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Oracle Database Oracle REST Data Services (ORDS) Performance API
  description: RESTful API for Oracle Database management, monitoring, and data access through Oracle REST Data Services. Provides 300+ endpoints across 17 categories including database administration, performance monitoring, Data Guard management, Data Pump operations, pluggable database lifecycle, APEX management, RDF graph operations, and transactional event queues.
  version: 25.4.0
  contact:
    name: Oracle Support
    url: https://support.oracle.com
    email: support@oracle.com
  license:
    name: Oracle Technology Network License
    url: https://www.oracle.com/downloads/licenses/standard-license.html
  termsOfService: https://www.oracle.com/legal/terms.html
servers:
- url: https://{host}:{port}/ords
  description: ORDS Server
  variables:
    host:
      default: localhost
      description: ORDS server hostname
    port:
      default: '8443'
      description: ORDS server port
security:
- oauth2: []
- basicAuth: []
tags:
- name: Performance
  description: SQL performance analysis, execution plans, and active session history
paths:
  /database/performance/sql_statements/:
    get:
      operationId: getSQLStatements
      summary: Oracle Database Get all SQL statements
      description: Returns performance statistics for all SQL statements in the shared pool.
      tags:
      - Performance
      parameters:
      - $ref: '#/components/parameters/limitParam'
      - $ref: '#/components/parameters/offsetParam'
      responses:
        '200':
          description: SQL statements retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SQLStatementList'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /database/performance/top_sql_statements/:
    get:
      operationId: getTopSQLStatements
      summary: Oracle Database Get top SQL by CPU usage
      description: Returns the top SQL statements ranked by CPU consumption.
      tags:
      - Performance
      responses:
        '200':
          description: Top SQL statements retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SQLStatementList'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /database/performance/sql_statements/{sql_id}/:
    get:
      operationId: getSQLStatementStats
      summary: Oracle Database Get SQL statement statistics
      description: Returns detailed statistics for a specific SQL statement.
      tags:
      - Performance
      parameters:
      - name: sql_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: SQL statistics retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SQLStatementDetail'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /database/performance/sql_statements/{sql_id}/text:
    get:
      operationId: getSQLStatementText
      summary: Oracle Database Get SQL statement text
      description: Returns the full SQL text for a specific statement.
      tags:
      - Performance
      parameters:
      - name: sql_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: SQL text retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SQLText'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /database/performance/sql_statements/{sql_id}/plan:
    get:
      operationId: getSQLExecutionPlan
      summary: Oracle Database Get SQL execution plan
      description: Returns the execution plan for a specific SQL statement.
      tags:
      - Performance
      parameters:
      - name: sql_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Execution plan retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecutionPlan'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /database/performance/sql_statements/{sql_id}/history:
    get:
      operationId: getSQLHistory
      summary: Oracle Database Get SQL statement history
      description: Returns historical performance data for a specific SQL statement.
      tags:
      - Performance
      parameters:
      - name: sql_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: SQL history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SQLHistoryList'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
  /database/performance/active_sessions_history/:
    get:
      operationId: getActiveSessionsHistory
      summary: Oracle Database Get active sessions history
      description: Returns the active session history (ASH) data.
      tags:
      - Performance
      responses:
        '200':
          description: Active sessions history retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveSessionHistoryList'
        '401':
          $ref: '#/components/responses/Unauthorized'
  /database/performance/active_sessions_history_waits/:
    get:
      operationId: getActiveSessionsHistoryWaits
      summary: Oracle Database Get active session history waits
      description: Returns wait event data from the active session history.
      tags:
      - Performance
      responses:
        '200':
          description: Wait data retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ActiveSessionWaitList'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  schemas:
    ActiveSessionHistoryList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              sample_time:
                type: string
                format: date-time
              session_id:
                type: integer
              sql_id:
                type: string
              event:
                type: string
              wait_class:
                type: string
    Error:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
        type:
          type: string
    PaginatedResponse:
      type: object
      properties:
        items:
          type: array
          items: {}
        hasMore:
          type: boolean
        limit:
          type: integer
        offset:
          type: integer
        count:
          type: integer
        links:
          type: array
          items:
            $ref: '#/components/schemas/Link'
    ActiveSessionWaitList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              event:
                type: string
              wait_class:
                type: string
              total_waits:
                type: integer
              average_wait_ms:
                type: number
    SQLStatementDetail:
      type: object
      properties:
        sql_id:
          type: string
        sql_text:
          type: string
        executions:
          type: integer
          format: int64
        cpu_time:
          type: integer
          format: int64
        elapsed_time:
          type: integer
          format: int64
        buffer_gets:
          type: integer
          format: int64
        disk_reads:
          type: integer
          format: int64
        rows_processed:
          type: integer
          format: int64
    Link:
      type: object
      properties:
        rel:
          type: string
        href:
          type: string
          format: uri
    SQLText:
      type: object
      properties:
        sql_id:
          type: string
        sql_fulltext:
          type: string
    ExecutionPlan:
      type: object
      properties:
        sql_id:
          type: string
        plan_hash_value:
          type: integer
          format: int64
        steps:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              operation:
                type: string
              options:
                type: string
              object_name:
                type: string
              cost:
                type: integer
              cardinality:
                type: integer
    SQLStatementList:
      allOf:
      - $ref: '#/components/schemas/PaginatedResponse'
      - type: object
        properties:
          items:
            type: array
            items:
              $ref: '#/components/schemas/SQLStatementDetail'
    SQLHistoryList:
      type: object
      properties:
        items:
          type: array
          items:
            type: object
            properties:
              sql_id:
                type: string
              snap_id:
                type: integer
              executions_delta:
                type: integer
              cpu_time_delta:
                type: integer
                format: int64
              elapsed_time_delta:
                type: integer
                format: int64
  parameters:
    limitParam:
      name: limit
      in: query
      description: Maximum number of items to return
      schema:
        type: integer
        minimum: 1
        default: 25
    offsetParam:
      name: offset
      in: query
      description: Number of items to skip before returning results
      schema:
        type: integer
        minimum: 0
        default: 0
  responses:
    NotFound:
      description: The specified resource was not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication required or credentials invalid
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: /ords/{schema}/oauth/token
          scopes: {}
        authorizationCode:
          authorizationUrl: /ords/{schema}/oauth/auth
          tokenUrl: /ords/{schema}/oauth/token
          scopes: {}
    basicAuth:
      type: http
      scheme: basic
externalDocs:
  description: ORDS REST API Documentation
  url: https://docs.oracle.com/en/database/oracle/oracle-rest-data-services/25.4/orrst/