AnomalyArmor Custom Sql API

The custom_sql API from AnomalyArmor — 5 operation(s) for custom_sql.

Operations 8

POST /api/v1/assets/{asset_id}/custom-sql-monitors/test Test Custom SQL Query #
POST /api/v1/assets/{asset_id}/custom-sql-monitors Create Custom SQL Monitor #
GET /api/v1/assets/{asset_id}/custom-sql-monitors List Custom SQL Monitors #
GET /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid} Get Custom SQL Monitor Detail #
PATCH /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid} Update Custom SQL Monitor #
DELETE /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid} Delete Custom SQL Monitor #
POST /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid}/run Run Custom SQL Monitor Now #
GET /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid}/results Get Custom SQL Monitor Results #

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/anomalyarmor-ai:anomalyarmor-ai-custom-sql-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

anomalyarmor-ai-custom-sql-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Anomalyarmor Ai Custom Sql API
  version: 1.0.0
  contact:
    name: AnomalyArmor Support
    url: https://anomalyarmor.ai/support
  license:
    name: Proprietary
  description: 'Operations tagged custom_sql across 3 of this provider''s published API definitions: anomalyarmor.ai-openapi.json, app.anomalyarmor.ai-openapi.json, docs.anomalyarmor.ai-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: http://localhost:8000
  description: Development server
- url: https://api.anomalyarmor.ai
  description: Production server
tags:
- name: custom_sql
paths:
  /api/v1/assets/{asset_id}/custom-sql-monitors/test:
    post:
      tags:
      - custom_sql
      summary: Test Custom SQL Query
      description: 'Execute a custom SQL query without creating a monitor.


        Runs the query with a timeout and returns the numeric result value,

        or an error message if the query fails. Does not persist anything.'
      operationId: test_query_api_v1_assets__asset_id__custom_sql_monitors_test_post
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TestCustomSqlRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: http://localhost:8000
      description: Development server
    - url: https://api.anomalyarmor.ai
      description: Production server
  /api/v1/assets/{asset_id}/custom-sql-monitors:
    post:
      tags:
      - custom_sql
      summary: Create Custom SQL Monitor
      description: Create a new custom SQL monitor for an asset.
      operationId: create_monitor_api_v1_assets__asset_id__custom_sql_monitors_post
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomSqlMonitorRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - custom_sql
      summary: List Custom SQL Monitors
      description: List all custom SQL monitors for an asset.
      operationId: list_monitors_api_v1_assets__asset_id__custom_sql_monitors_get
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: http://localhost:8000
      description: Development server
    - url: https://api.anomalyarmor.ai
      description: Production server
  /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid}:
    get:
      tags:
      - custom_sql
      summary: Get Custom SQL Monitor Detail
      description: Get details of a specific custom SQL monitor.
      operationId: get_monitor_api_v1_assets__asset_id__custom_sql_monitors__monitor_uuid__get
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: monitor_uuid
        in: path
        required: true
        schema:
          type: string
          title: Monitor Uuid
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - custom_sql
      summary: Update Custom SQL Monitor
      description: Update an existing custom SQL monitor.
      operationId: update_monitor_api_v1_assets__asset_id__custom_sql_monitors__monitor_uuid__patch
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: monitor_uuid
        in: path
        required: true
        schema:
          type: string
          title: Monitor Uuid
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomSqlMonitorRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - custom_sql
      summary: Delete Custom SQL Monitor
      description: Delete a custom SQL monitor (soft delete).
      operationId: delete_monitor_api_v1_assets__asset_id__custom_sql_monitors__monitor_uuid__delete
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: monitor_uuid
        in: path
        required: true
        schema:
          type: string
          title: Monitor Uuid
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: http://localhost:8000
      description: Development server
    - url: https://api.anomalyarmor.ai
      description: Production server
  /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid}/run:
    post:
      tags:
      - custom_sql
      summary: Run Custom SQL Monitor Now
      description: 'Execute a custom SQL monitor immediately and return the result.


        Runs inline (synchronous within request) with the monitor''s configured

        timeout. Does NOT queue a background job.'
      operationId: run_monitor_api_v1_assets__asset_id__custom_sql_monitors__monitor_uuid__run_post
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: monitor_uuid
        in: path
        required: true
        schema:
          type: string
          title: Monitor Uuid
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: http://localhost:8000
      description: Development server
    - url: https://api.anomalyarmor.ai
      description: Production server
  /api/v1/assets/{asset_id}/custom-sql-monitors/{monitor_uuid}/results:
    get:
      tags:
      - custom_sql
      summary: Get Custom SQL Monitor Results
      description: Get historical results for a custom SQL monitor.
      operationId: get_monitor_results_api_v1_assets__asset_id__custom_sql_monitors__monitor_uuid__results_get
      parameters:
      - name: asset_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Id
      - name: monitor_uuid
        in: path
        required: true
        schema:
          type: string
          title: Monitor Uuid
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 200
          minimum: 1
          default: 50
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Offset
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    servers:
    - url: http://localhost:8000
      description: Development server
    - url: https://api.anomalyarmor.ai
      description: Production server
components:
  schemas:
    TestCustomSqlRequest:
      properties:
        sql_query:
          type: string
          minLength: 1
          title: Sql Query
          description: SELECT query that returns a single numeric value
        timeout_seconds:
          type: integer
          maximum: 300.0
          minimum: 1.0
          title: Timeout Seconds
          description: Query execution timeout in seconds
          default: 30
      type: object
      required:
      - sql_query
      title: TestCustomSqlRequest
      description: Request to test a custom SQL query without creating a monitor.
    CreateCustomSqlMonitorRequest:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
          description: Human-readable name for this monitor
          example: Zero-Dollar Orders
        description:
          anyOf:
          - type: string
            maxLength: 1000
          - type: 'null'
          title: Description
          description: Optional description of what this monitor checks
        sql_query:
          type: string
          minLength: 1
          title: Sql Query
          description: SELECT query that returns a single numeric value
          example: SELECT COUNT(*) FROM orders WHERE total_amount = 0
        table_path:
          type: string
          maxLength: 500
          minLength: 1
          title: Table Path
          description: Primary table being monitored (for asset association)
          example: public.orders
        upper_bound:
          anyOf:
          - type: number
          - type: 'null'
          title: Upper Bound
          description: Alert if value exceeds this threshold
          example: 10.0
        lower_bound:
          anyOf:
          - type: number
          - type: 'null'
          title: Lower Bound
          description: Alert if value drops below this threshold
          example: 0.0
        check_interval:
          type: string
          pattern: ^(hourly|daily|weekly|monthly|\d+[mhd]|@[a-z_]+|\S+\s+\S+\s+\S+\s+\S+\s+\S+)$
          title: Check Interval
          description: How often to run (hourly, daily, weekly, or cron expression)
          example: daily
        timeout_seconds:
          type: integer
          maximum: 300.0
          minimum: 1.0
          title: Timeout Seconds
          description: Query execution timeout in seconds
          default: 60
        enabled:
          type: boolean
          title: Enabled
          description: Whether the monitor should be active immediately
          default: true
      type: object
      required:
      - name
      - sql_query
      - table_path
      - check_interval
      title: CreateCustomSqlMonitorRequest
      description: Request to create a custom SQL monitor.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    StandardResponse:
      properties:
        success:
          type: boolean
          title: Success
        data:
          anyOf:
          - {}
          - type: 'null'
          title: Data
        message:
          anyOf:
          - type: string
          - type: 'null'
          title: Message
        error:
          anyOf:
          - type: string
          - type: 'null'
          title: Error
        meta:
          anyOf:
          - additionalProperties: true
            type: object
          - type: 'null'
          title: Meta
      type: object
      required:
      - success
      title: StandardResponse
      description: Standard API response wrapper.
    UpdateCustomSqlMonitorRequest:
      properties:
        name:
          anyOf:
          - type: string
            maxLength: 255
            minLength: 1
          - type: 'null'
          title: Name
        description:
          anyOf:
          - type: string
          - type: 'null'
          title: Description
        sql_query:
          anyOf:
          - type: string
            minLength: 1
          - type: 'null'
          title: Sql Query
        upper_bound:
          anyOf:
          - type: number
          - type: 'null'
          title: Upper Bound
        lower_bound:
          anyOf:
          - type: number
          - type: 'null'
          title: Lower Bound
        check_interval:
          anyOf:
          - type: string
            pattern: ^(hourly|daily|weekly|monthly|\d+[mhd]|@[a-z_]+|\S+\s+\S+\s+\S+\s+\S+\s+\S+)$
          - type: 'null'
          title: Check Interval
        timeout_seconds:
          anyOf:
          - type: integer
            maximum: 300.0
            minimum: 1.0
          - type: 'null'
          title: Timeout Seconds
        enabled:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Enabled
      type: object
      title: UpdateCustomSqlMonitorRequest
      description: Request to update a custom SQL monitor. All fields optional.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
x-refined-from:
- anomalyarmor.ai-openapi.json
- app.anomalyarmor.ai-openapi.json
- docs.anomalyarmor.ai-openapi.json