AnomalyArmor Contracts API

The contracts API from AnomalyArmor — 10 operation(s) for contracts.

Operations 10

POST /api/public/contracts/validate Public Validate Contract #
GET /api/v1/contracts/{asset_public_id}/export Export Contract #
POST /api/v1/contracts/export-jobs Submit Bulk Export Job #
GET /api/v1/contracts/export-jobs/{job_id} Get Bulk Export Job Status #
GET /api/v1/contracts/export-jobs/{job_id}/download Download Bulk Export Zip #
POST /api/v1/contracts/validate Validate Contract #
POST /api/v1/contracts/{asset_public_id}/plan Plan Contract #
POST /api/v1/contracts/{asset_public_id}/apply Apply Contract #
POST /api/v1/contracts/apply-jobs Submit Bulk Apply Job #
GET /api/v1/contracts/apply-jobs/{job_id} Get Bulk Apply Job Status #

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-contracts-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-contracts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Anomalyarmor Ai Contracts API
  version: 1.0.0
  contact:
    name: AnomalyArmor Support
    url: https://anomalyarmor.ai/support
  license:
    name: Proprietary
  description: 'Operations tagged contracts 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: Contracts
paths:
  /api/public/contracts/validate:
    post:
      tags:
      - Contracts
      summary: Public Validate Contract
      description: Unauthenticated ODCS YAML validation for the marketing funnel.
      operationId: public_validate_contract_api_public_contracts_validate_post
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardResponse'
    servers:
    - url: http://localhost:8000
      description: Development server
    - url: https://api.anomalyarmor.ai
      description: Production server
  /api/v1/contracts/{asset_public_id}/export:
    get:
      tags:
      - Contracts
      summary: Export Contract
      description: Export a single asset's config as ODCS v3.1.0 YAML.
      operationId: export_contract_api_v1_contracts__asset_public_id__export_get
      parameters:
      - name: asset_public_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Public Id
      - name: mode
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/ExportMode'
          description: Portability mode. `extended` (default) preserves AA-specific config under customProperties.anomalyarmor. `odcs-pure` strips those extensions for maximum interop with other ODCS tools.
          default: extended
        description: Portability mode. `extended` (default) preserves AA-specific config under customProperties.anomalyarmor. `odcs-pure` strips those extensions for maximum interop with other ODCS tools.
      - name: include
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated domain names to include (e.g. `freshness,validity`). Unknown names return 400.
          title: Include
        description: Comma-separated domain names to include (e.g. `freshness,validity`). Unknown names return 400.
      - name: exclude
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated domain names to exclude. Applied after `include`.
          title: Exclude
        description: Comma-separated domain names to exclude. Applied after `include`.
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
        '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/contracts/export-jobs:
    post:
      tags:
      - Contracts
      summary: Submit Bulk Export Job
      description: 'Create a bulk-export job. Returns `{"job_id": ""}`.


        Scope `asset` is rejected here: single-asset exports use the sync

        endpoint and carrying that path through a job would add latency for

        no benefit.'
      operationId: submit_bulk_export_job_api_v1_contracts_export_jobs_post
      parameters:
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkExportJobRequest'
      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/contracts/export-jobs/{job_id}:
    get:
      tags:
      - Contracts
      summary: Get Bulk Export Job Status
      description: 'Return the job''s status + progress. The zip bytes are NOT included

        here; clients fetch them from the `/download` sub-route once status

        is `completed`. Keeping the status payload small means pollers don''t

        transfer megabytes of artifact on every check.'
      operationId: get_bulk_export_job_status_api_v1_contracts_export_jobs__job_id__get
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Job 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/contracts/export-jobs/{job_id}/download:
    get:
      tags:
      - Contracts
      summary: Download Bulk Export Zip
      description: 'Stream the zip artifact for a completed job.


        Fails with 404 on unknown job, 409 on incomplete jobs (so clients

        can distinguish "still running" from "doesn''t exist"). The zip is

        base64-encoded inside result_data today; decode and return the

        raw bytes with `application/zip`.'
      operationId: download_bulk_export_zip_api_v1_contracts_export_jobs__job_id__download_get
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Job Id
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      responses:
        '200':
          description: Successful Response
        '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/contracts/validate:
    post:
      tags:
      - Contracts
      summary: Validate Contract
      description: 'Validate an ODCS v3.1.0 YAML document without applying it.


        Accepts the YAML as the raw request body so the CLI can pipe

        `cat contract.yaml | curl --data-binary @-` without JSON-escaping.'
      operationId: validate_contract_api_v1_contracts_validate_post
      parameters:
      - 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/contracts/{asset_public_id}/plan:
    post:
      tags:
      - Contracts
      summary: Plan Contract
      description: 'Plan an import: parse YAML + diff against current asset state.


        Does not mutate anything. The request body is raw YAML (same

        content-type flexibility as `/validate`). Returns per-domain

        DomainDiff objects plus a count summary.'
      operationId: plan_contract_api_v1_contracts__asset_public_id__plan_post
      parameters:
      - name: asset_public_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Public Id
      - name: mode
        in: query
        required: false
        schema:
          $ref: '#/components/schemas/ExportMode'
          description: Portability mode. Matches the mode the existing state is compared against. Default `extended` preserves AA-specific fields; `odcs-pure` compares only ODCS-native config.
          default: extended
        description: Portability mode. Matches the mode the existing state is compared against. Default `extended` preserves AA-specific fields; `odcs-pure` compares only ODCS-native config.
      - name: include
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated domains to include in the diff.
          title: Include
        description: Comma-separated domains to include in the diff.
      - name: exclude
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated domains to exclude.
          title: Exclude
        description: Comma-separated domains to exclude.
      - 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/contracts/{asset_public_id}/apply:
    post:
      tags:
      - Contracts
      summary: Apply Contract
      description: 'Apply an ODCS YAML to an asset''s live config.


        Request body is raw YAML. Validation failures short-circuit before

        any DB touch; on success, the orchestrator opens a single

        transaction spanning every selected domain''s import step.'
      operationId: apply_contract_api_v1_contracts__asset_public_id__apply_post
      parameters:
      - name: asset_public_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Asset Public Id
      - name: prune
        in: query
        required: false
        schema:
          type: boolean
          description: When true, existing state missing from the incoming YAML is deleted. Default false keeps the apply warn-only.
          default: false
          title: Prune
        description: When true, existing state missing from the incoming YAML is deleted. Default false keeps the apply warn-only.
      - name: include
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated domains to apply (others skipped).
          title: Include
        description: Comma-separated domains to apply (others skipped).
      - name: exclude
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          description: Comma-separated domains to skip.
          title: Exclude
        description: Comma-separated domains to skip.
      - 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/contracts/apply-jobs:
    post:
      tags:
      - Contracts
      summary: Submit Bulk Apply Job
      description: 'Create a bulk-apply job. Returns `{"job_id": ""}`.


        The job runs `orchestrator.apply()` per asset inside a single

        process so resource usage scales with batch size; callers chunk

        large batches (>~500 assets) into separate jobs.'
      operationId: submit_bulk_apply_job_api_v1_contracts_apply_jobs_post
      parameters:
      - name: Authorization
        in: header
        required: false
        schema:
          type: string
          title: Authorization
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkApplyJobRequest'
      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/contracts/apply-jobs/{job_id}:
    get:
      tags:
      - Contracts
      summary: Get Bulk Apply Job Status
      description: 'Return the job''s status + per-asset results summary.


        The handler writes a compact list of per-asset entries into

        `result_data`: each carries `asset_public_id`, `applied` (domain →

        added/modified/removed counts), `unsupported_domains`, and an

        optional `error` for failed assets. A UI can render "Applied 42 of

        50" plus a per-asset expandable detail directly from this payload.'
      operationId: get_bulk_apply_job_status_api_v1_contracts_apply_jobs__job_id__get
      parameters:
      - name: job_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Job 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
components:
  schemas:
    BulkExportScope:
      type: string
      enum:
      - asset
      - assets
      - warehouse
      - all
      title: BulkExportScope
      description: 'Asset-selection scope. Matches the wire names from TECH-976.


        `ASSET` is listed for completeness so the job handler can reject it

        with a clear error, pointing callers at the sync single-asset endpoint.


        `ASSETS` takes an explicit list of asset public ids; it is the scope

        the UI picks when the user checks rows in the asset list.'
    BulkExportJobRequest:
      properties:
        scope:
          $ref: '#/components/schemas/BulkExportScope'
        scope_name:
          anyOf:
          - type: string
          - type: 'null'
          title: Scope Name
        asset_public_ids:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Asset Public Ids
        mode:
          type: string
          title: Mode
          default: extended
        include:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Include
        exclude:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Exclude
      type: object
      required:
      - scope
      title: BulkExportJobRequest
      description: 'Request body for POST /contracts/export-jobs.


        `scope_name` is required when `scope == warehouse`.

        `asset_public_ids` is required (non-empty) when `scope == assets`.

        `mode` defaults to `extended`; `include` / `exclude` filter the

        per-asset orchestrator exactly like the single-asset endpoint.'
    BulkApplyJobRequest:
      properties:
        asset_public_ids:
          items:
            type: string
          type: array
          minItems: 1
          title: Asset Public Ids
        yaml_body:
          type: string
          minLength: 1
          title: Yaml Body
        prune:
          type: boolean
          title: Prune
          default: false
        include:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Include
        exclude:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Exclude
      type: object
      required:
      - asset_public_ids
      - yaml_body
      title: BulkApplyJobRequest
      description: 'Request body for POST /contracts/apply-jobs.


        `asset_public_ids` is required (non-empty); the job applies the

        same contract to each. `yaml_body` is the raw ODCS document;

        parsing happens in the job so a retry re-validates on every run.

        `prune`/`include`/`exclude` mirror the single-asset apply

        endpoint''s query params.'
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ExportMode:
      type: string
      enum:
      - extended
      - odcs-pure
      title: ExportMode
      description: 'Portability mode for exports.


        Values match the CLI `--mode` flag and the REST `mode` query parameter

        exactly, so string round-trips via FastAPI''s query parser work without

        custom coercion.'
    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.
    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