openapi: 3.2.0 info: title: Happyrobot Public Adversarial Suites API description: Public API endpoints for Happyrobot version: 0.1.1 servers: - url: https://platform.happyrobot.ai/api/v2 security: - bearerAuth: [] tags: - name: Adversarial Suites paths: /nodes/{node_id}/adversarial-suites: get: summary: List adversarial suites for a node tags: - Adversarial Suites 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 folder_id: type: - string - 'null' name: type: string is_deleted: type: boolean adversarial_model: type: string timeout_seconds: type: number generation_prompt: type: string generation_count: type: number generation_status: type: string generation_error: type: - string - 'null' 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 - is_deleted - adversarial_model - timeout_seconds - generation_prompt - generation_count - generation_status - 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 suite for a node tags: - Adversarial Suites description: Create a suite. The generation_prompt drives AI auto-generation of individual tests. requestBody: content: application/json: schema: type: object properties: name: type: string minLength: 1 generation_prompt: type: string minLength: 1 adversarial_model: type: string timeout_seconds: type: integer maximum: 9007199254740991 generation_count: 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 - generation_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: suite: 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 folder_id: type: - string - 'null' name: type: string is_deleted: type: boolean adversarial_model: type: string timeout_seconds: type: number generation_prompt: type: string generation_count: type: number generation_status: type: string generation_error: type: - string - 'null' 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 - is_deleted - adversarial_model - timeout_seconds - generation_prompt - generation_count - generation_status - scope_mode - scoped_categories - created_by - created_at - updated_at additionalProperties: false required: - suite 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-suites/{suite_id}: get: summary: Get an adversarial suite by ID tags: - Adversarial Suites description: Returns the suite and the mermaid workflow graph if already generated. 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: suite_id required: true security: - bearerAuth: [] responses: '200': description: Default Response content: application/json: schema: type: object properties: suite: 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 folder_id: type: - string - 'null' name: type: string is_deleted: type: boolean adversarial_model: type: string timeout_seconds: type: number generation_prompt: type: string generation_count: type: number generation_status: type: string generation_error: type: - string - 'null' 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 - is_deleted - adversarial_model - timeout_seconds - generation_prompt - generation_count - generation_status - scope_mode - scoped_categories - created_by - created_at - updated_at additionalProperties: false workflow_graph_mermaid: type: - string - 'null' required: - suite 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 suite tags: - Adversarial Suites requestBody: content: application/json: schema: type: object properties: name: type: string minLength: 1 adversarial_model: type: string timeout_seconds: type: integer maximum: 9007199254740991 generation_prompt: type: string generation_count: 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: suite_id required: true security: - bearerAuth: [] responses: '200': description: Default Response content: application/json: schema: type: object properties: suite: 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 folder_id: type: - string - 'null' name: type: string is_deleted: type: boolean adversarial_model: type: string timeout_seconds: type: number generation_prompt: type: string generation_count: type: number generation_status: type: string generation_error: type: - string - 'null' 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 - is_deleted - adversarial_model - timeout_seconds - generation_prompt - generation_count - generation_status - scope_mode - scoped_categories - created_by - created_at - updated_at additionalProperties: false required: - suite 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 suite tags: - Adversarial Suites 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: suite_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: type: string message: type: string statusCode: type: integer minimum: -9007199254740991 maximum: 9007199254740991 details: {} required: - error additionalProperties: false /adversarial-suites/{suite_id}/generate: post: summary: Generate adversarial suite tests tags: - Adversarial Suites description: Auto-generate individual adversarial tests from the suite's generation_prompt using AI. requestBody: content: application/json: schema: type: object properties: version_id: 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)$ variables: type: object additionalProperties: {} 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: suite_id required: true security: - bearerAuth: [] responses: '200': description: Default Response content: application/json: schema: type: object properties: status: type: string enum: - in_progress required: - status 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-suites/{suite_id}/generate-graph: post: summary: Generate adversarial suite workflow graph tags: - Adversarial Suites description: Generate a mermaid workflow graph visualizing the test paths in this suite. requestBody: content: application/json: schema: type: object properties: version_id: 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)$ required: - version_id 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: suite_id required: true security: - bearerAuth: [] responses: '200': description: Default Response content: application/json: schema: type: object properties: status: type: string enum: - ok error: type: string required: - status 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-suites/{suite_id}/run: post: summary: Run an adversarial suite tags: - Adversarial Suites description: Execute all tests in the suite asynchronously. requestBody: content: application/json: schema: type: object properties: version_id: 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)$ required: - version_id 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: suite_id required: true security: - bearerAuth: [] responses: '202': description: Default Response content: application/json: schema: type: object properties: suite_run_id: 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)$ required: - suite_run_id 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-suites/{suite_id}/runs: get: summary: List adversarial suite runs tags: - Adversarial Suites parameters: - schema: default: 20 type: integer maximum: 100 in: query name: limit 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: suite_id required: true security: - bearerAuth: [] responses: '200': description: Default Response content: application/json: schema: type: object properties: runs: type: array items: type: object properties: id: type: string suite_id: type: string status: type: string total_tests: type: number completed_tests: type: number passed_tests: type: number failed_tests: type: number workflow_id: type: - string - 'null' version_id: type: - string - 'null' version_name: type: - string - 'null' version_number: type: - number - 'null' started_at: type: - string - 'null' completed_at: type: - string - 'null' created_at: type: string required: - id - suite_id - status - total_tests - completed_tests - passed_tests - failed_tests - started_at - completed_at - created_at additionalProperties: false required: - runs 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-suites/runs/{suite_run_id}: get: summary: Get adversarial suite run by ID tags: - Adversarial Suites description: Full status and aggregate counts for a suite run. 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: suite_run_id required: true security: - bearerAuth: [] responses: '200': description: Default Response content: application/json: schema: type: object properties: run: type: object properties: id: type: string suite_id: type: string status: type: string total_tests: type: number completed_tests: type: number passed_tests: type: number failed_tests: type: number workflow_id: type: - string - 'null' version_id: type: - string - 'null' version_name: type: - string - 'null' version_number: type: - number - 'null' started_at: type: - string - 'null' completed_at: type: - string - 'null' created_at: type: string required: - id - suite_id - status - total_tests - completed_tests - passed_tests - failed_tests - started_at - completed_at - created_at additionalProperties: false required: - run 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-suites/runs/{suite_run_id}/test-runs: get: summary: List test runs in a suite run tags: - Adversarial Suites description: All individual adversarial test results within this suite run. 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: suite_run_id required: true security: - bearerAuth: [] responses: '200': description: Default Response content: application/json: schema: type: object properties: test_runs: type: array items: type: object properties: id: type: string test_name: type: string status: type: string audit_remarks: type: array items: type: object properties: northstar_id: type: string grade: type: string enum: - passed - failed - not_applicable correction: type: string correction_reason: type: string model: type: string required: - northstar_id - grade - correction_reason - model additionalProperties: false started_at: type: - string - 'null' completed_at: type: - string - 'null' created_at: type: string required: - id - test_name - status - audit_remarks - started_at - completed_at - created_at additionalProperties: false required: - test_runs 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 components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: Opaque