Happyrobot Adversarial Tests API

The Adversarial Tests API from Happyrobot — 8 operation(s) for adversarial tests.

Operations 11

GET /nodes/{node_id}/adversarial-tests List adversarial tests for a node
POST /nodes/{node_id}/adversarial-tests Create an adversarial test for a node
POST /nodes/{node_id}/adversarial-tests/folders Create an adversarial folder for an agent node
GET /adversarial-tests/{test_id} Get an adversarial test by ID
PATCH /adversarial-tests/{test_id} Update an adversarial test
DELETE /adversarial-tests/{test_id} Delete an adversarial test
POST /adversarial-tests/{test_id}/run Run an adversarial test
GET /adversarial-tests/{test_id}/runs List adversarial test runs
GET /adversarial-tests/runs/{run_id} Get adversarial test run by ID
GET /adversarial-tests/runs/{run_id}/messages Get adversarial test run messages
GET /adversarial-tests/{test_id}/effective-scope Get the resolved audit scope for an adversarial test

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/happyrobot-adversarial-tests-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

happyrobot-adversarial-tests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Happyrobot Public Adversarial Tests API
  description: Public API endpoints for Happyrobot
  version: 0.1.1
servers:
- url: https://platform.happyrobot.ai/api/v2
security:
- bearerAuth: []
tags:
- name: Adversarial Tests
paths:
  /nodes/{node_id}/adversarial-tests:
    get:
      summary: List adversarial tests for a node
      tags:
      - Adversarial Tests
      parameters:
      - schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        in: query
        name: version_id
        required: false
      - schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        in: path
        name: node_id
        required: true
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        org_id:
                          type: string
                        workflow_id:
                          type: string
                        agent_node_id:
                          type: string
                        agent_node_persistent_id:
                          type: string
                        suite_id:
                          type:
                          - string
                          - 'null'
                        folder_id:
                          type:
                          - string
                          - 'null'
                        name:
                          type: string
                        description:
                          type:
                          - string
                          - 'null'
                        is_deleted:
                          type: boolean
                        adversarial_prompt:
                          type: string
                        adversarial_model:
                          type: string
                        variables:
                          type: object
                          additionalProperties: {}
                        template_variables:
                          type:
                          - array
                          - 'null'
                          items:
                            type: object
                            additionalProperties: {}
                        graph_path:
                          type:
                          - array
                          - 'null'
                          items:
                            type: string
                        timeout_seconds:
                          type: number
                        scope_mode:
                          type: string
                          enum:
                          - all
                          - by_category
                        scoped_categories:
                          type:
                          - array
                          - 'null'
                          items:
                            type: string
                            enum:
                            - notes
                            - style
                            - contradiction
                            - tool
                            - sequential
                        created_by:
                          type:
                          - string
                          - 'null'
                        created_at:
                          type: string
                        updated_at:
                          type: string
                      required:
                      - id
                      - org_id
                      - workflow_id
                      - agent_node_id
                      - agent_node_persistent_id
                      - name
                      - description
                      - is_deleted
                      - adversarial_prompt
                      - adversarial_model
                      - variables
                      - timeout_seconds
                      - scope_mode
                      - scoped_categories
                      - created_by
                      - created_at
                      - updated_at
                      additionalProperties: false
                  folders:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        name:
                          type: string
                      required:
                      - id
                      - name
                      additionalProperties: false
                required:
                - data
                - folders
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
    post:
      summary: Create an adversarial test for a node
      tags:
      - Adversarial Tests
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                adversarial_prompt:
                  type: string
                  minLength: 1
                description:
                  type: string
                adversarial_model:
                  type: string
                variables:
                  type: object
                  additionalProperties: {}
                timeout_seconds:
                  type: integer
                  maximum: 9007199254740991
                scope_mode:
                  type: string
                  enum:
                  - all
                  - by_category
                scoped_categories:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    enum:
                    - notes
                    - style
                    - tool
                    - sequential
              required:
              - name
              - adversarial_prompt
        required: true
      parameters:
      - schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        in: path
        name: node_id
        required: true
      security:
      - bearerAuth: []
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  test:
                    type: object
                    properties:
                      id:
                        type: string
                      org_id:
                        type: string
                      workflow_id:
                        type: string
                      agent_node_id:
                        type: string
                      agent_node_persistent_id:
                        type: string
                      suite_id:
                        type:
                        - string
                        - 'null'
                      folder_id:
                        type:
                        - string
                        - 'null'
                      name:
                        type: string
                      description:
                        type:
                        - string
                        - 'null'
                      is_deleted:
                        type: boolean
                      adversarial_prompt:
                        type: string
                      adversarial_model:
                        type: string
                      variables:
                        type: object
                        additionalProperties: {}
                      template_variables:
                        type:
                        - array
                        - 'null'
                        items:
                          type: object
                          additionalProperties: {}
                      graph_path:
                        type:
                        - array
                        - 'null'
                        items:
                          type: string
                      timeout_seconds:
                        type: number
                      scope_mode:
                        type: string
                        enum:
                        - all
                        - by_category
                      scoped_categories:
                        type:
                        - array
                        - 'null'
                        items:
                          type: string
                          enum:
                          - notes
                          - style
                          - contradiction
                          - tool
                          - sequential
                      created_by:
                        type:
                        - string
                        - 'null'
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                    - id
                    - org_id
                    - workflow_id
                    - agent_node_id
                    - agent_node_persistent_id
                    - name
                    - description
                    - is_deleted
                    - adversarial_prompt
                    - adversarial_model
                    - variables
                    - timeout_seconds
                    - scope_mode
                    - scoped_categories
                    - created_by
                    - created_at
                    - updated_at
                    additionalProperties: false
                required:
                - test
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
  /nodes/{node_id}/adversarial-tests/folders:
    post:
      summary: Create an adversarial folder for an agent node
      tags:
      - Adversarial Tests
      description: Create a folder for organizing this agent node's adversarial tests and suites. File them into it via folder_id on update.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
              required:
              - name
        required: true
      parameters:
      - schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        in: path
        name: node_id
        required: true
      security:
      - bearerAuth: []
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  folder:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                    required:
                    - id
                    - name
                    additionalProperties: false
                required:
                - folder
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
  /adversarial-tests/{test_id}:
    get:
      summary: Get an adversarial test by ID
      tags:
      - Adversarial Tests
      parameters:
      - schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        in: path
        name: test_id
        required: true
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  test:
                    type: object
                    properties:
                      id:
                        type: string
                      org_id:
                        type: string
                      workflow_id:
                        type: string
                      agent_node_id:
                        type: string
                      agent_node_persistent_id:
                        type: string
                      suite_id:
                        type:
                        - string
                        - 'null'
                      folder_id:
                        type:
                        - string
                        - 'null'
                      name:
                        type: string
                      description:
                        type:
                        - string
                        - 'null'
                      is_deleted:
                        type: boolean
                      adversarial_prompt:
                        type: string
                      adversarial_model:
                        type: string
                      variables:
                        type: object
                        additionalProperties: {}
                      template_variables:
                        type:
                        - array
                        - 'null'
                        items:
                          type: object
                          additionalProperties: {}
                      graph_path:
                        type:
                        - array
                        - 'null'
                        items:
                          type: string
                      timeout_seconds:
                        type: number
                      scope_mode:
                        type: string
                        enum:
                        - all
                        - by_category
                      scoped_categories:
                        type:
                        - array
                        - 'null'
                        items:
                          type: string
                          enum:
                          - notes
                          - style
                          - contradiction
                          - tool
                          - sequential
                      created_by:
                        type:
                        - string
                        - 'null'
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                    - id
                    - org_id
                    - workflow_id
                    - agent_node_id
                    - agent_node_persistent_id
                    - name
                    - description
                    - is_deleted
                    - adversarial_prompt
                    - adversarial_model
                    - variables
                    - timeout_seconds
                    - scope_mode
                    - scoped_categories
                    - created_by
                    - created_at
                    - updated_at
                    additionalProperties: false
                required:
                - test
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
    patch:
      summary: Update an adversarial test
      tags:
      - Adversarial Tests
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                description:
                  type: string
                adversarial_prompt:
                  type: string
                adversarial_model:
                  type: string
                variables:
                  type: object
                  additionalProperties: {}
                timeout_seconds:
                  type: integer
                  maximum: 9007199254740991
                scope_mode:
                  type: string
                  enum:
                  - all
                  - by_category
                scoped_categories:
                  minItems: 1
                  type: array
                  items:
                    type: string
                    enum:
                    - notes
                    - style
                    - tool
                    - sequential
                folder_id:
                  type:
                  - string
                  - 'null'
                  format: uuid
                  pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
      parameters:
      - schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        in: path
        name: test_id
        required: true
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  test:
                    type: object
                    properties:
                      id:
                        type: string
                      org_id:
                        type: string
                      workflow_id:
                        type: string
                      agent_node_id:
                        type: string
                      agent_node_persistent_id:
                        type: string
                      suite_id:
                        type:
                        - string
                        - 'null'
                      folder_id:
                        type:
                        - string
                        - 'null'
                      name:
                        type: string
                      description:
                        type:
                        - string
                        - 'null'
                      is_deleted:
                        type: boolean
                      adversarial_prompt:
                        type: string
                      adversarial_model:
                        type: string
                      variables:
                        type: object
                        additionalProperties: {}
                      template_variables:
                        type:
                        - array
                        - 'null'
                        items:
                          type: object
                          additionalProperties: {}
                      graph_path:
                        type:
                        - array
                        - 'null'
                        items:
                          type: string
                      timeout_seconds:
                        type: number
                      scope_mode:
                        type: string
                        enum:
                        - all
                        - by_category
                      scoped_categories:
                        type:
                        - array
                        - 'null'
                        items:
                          type: string
                          enum:
                          - notes
                          - style
                          - contradiction
                          - tool
                          - sequential
                      created_by:
                        type:
                        - string
                        - 'null'
                      created_at:
                        type: string
                      updated_at:
                        type: string
                    required:
                    - id
                    - org_id
                    - workflow_id
                    - agent_node_id
                    - agent_node_persistent_id
                    - name
                    - description
                    - is_deleted
                    - adversarial_prompt
                    - adversarial_model
                    - variables
                    - timeout_seconds
                    - scope_mode
                    - scoped_categories
                    - created_by
                    - created_at
                    - updated_at
                    additionalProperties: false
                required:
                - test
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
    delete:
      summary: Delete an adversarial test
      tags:
      - Adversarial Tests
      parameters:
      - schema:
          type: string
          format: uuid
          pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
        in: path
        name: test_id
        required: true
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    type: boolean
                    enum:
                    - true
                required:
                - ok
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  statusCode:
                    type: integer
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                  details: {}
                required:
                - error
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    t

# --- truncated at 32 KB (53 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/happyrobot/refs/heads/main/openapi/happyrobot-adversarial-tests-api-openapi.yml