LogoLogo
SplxAISign up for free
  • Home
  • Platform
    • Target
      • Add Target
        • Connection Setup
        • Target Configuration
      • Connections
        • Anthropic
        • Azure ML
        • Azure OpenAI
        • Bedrock
        • Dify AI
        • Gemini
        • Glean
        • Hugging Face
        • Mistral
        • OpenAI
        • OpenAI Assistant
        • REST API
        • Slack
        • Microsoft Teams
        • WhatsApp
        • Databricks
      • Target Settings
    • Probe Settings
    • Test Run
      • Test Run View
      • Test Run History
      • Test Run Report
      • Test Run Scheduler
    • Probe Run
      • Probe Run View
      • Test Case Details
      • Test Case Parametrization
      • Mitigation Strategy
      • Tracking an Issue
    • Overview Page
    • Prompt Hardening
    • Model Benchmarks
    • User & Organization Settings
  • Platform API
    • Authentication
    • API Reference
      • Test Run
      • Probe Run
    • CI/CD with API
  • Updates
    • Product Updates
      • December 2024
      • November 2024
      • October 2024
      • September 2024
  • Links
    • Blog
    • GitHub
    • Community Slack
Powered by GitBook
On this page
Export as PDF
  1. Platform API
  2. API Reference

Test Run

PreviousAPI ReferenceNextProbe Run

Last updated 2 months ago

Get Test Run Status

get

Get Test Run execution status. Learn more about Test Run statuses on the Test Run documentation page.

Path parameters
idinteger · int32Required

Test Run id.

Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
get
GET /api/v2/test-run/{id}/status HTTP/1.1
Host: 
Accept: */*
{
  "testRunId": 1,
  "executionDate": "2025-06-22T00:33:01.127Z",
  "status": "text",
  "probeRuns": [
    {
      "probeName": "Jailbreak",
      "probeRunId": 123,
      "probeId": 15,
      "totalCount": 125,
      "errorCount": 0,
      "passedCount": 110,
      "failedCount": 15,
      "status": "FINISHED"
    }
  ]
}

Test Run Execution PDF eport

get

Generate a PDF report for a completed Test Run. Visit the Test Run Report documentation page for more information about the report.

Authorizations
Path parameters
idinteger · int32Required

Test Run id.

Responses
200
OK
Responsestring · binaryExample: Binary PDF data
400
Bad Request
401
Unauthorized
403
Forbidden
500
Internal Server Error
get
GET /api/v2/test-run/{id}/report HTTP/1.1
Host: 
X-Api-Key: YOUR_API_KEY
Accept: */*
Binary PDF data
  • POSTTrigger Test Run
  • GETCancel Test Run
  • GETGet Test Run Status
  • GETTest Run Execution PDF eport

Cancel Test Run

get

Cancel ongoing Test Run execution.

Authorizations
Path parameters
testRunIdinteger · int32Required

Test Run id.

Responses
200
OK
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
get
GET /api/v2/test-run/{testRunId}/cancel HTTP/1.1
Host: 
X-Api-Key: YOUR_API_KEY
Accept: */*

No content

Trigger Test Run

post

Trigger a new test run for a specified target with a predefined set of probes configured via the SplxAI Platform UI.To learn more about Test Runs and see a visual reference, visit the Test Run documentation page.

Authorizations
Body

Request payload to trigger the execution of a Test Run.

targetIdinteger · int32Required

The id of the Target for which the Test Run will be triggered.

probeIdsinteger · int32[] | nullableRequired

The ids of the Probes that will be used in a test run.

namestringRequired

Name of the Test Run.

Responses
200
OK
application/json
400
Bad Request
application/json
401
Unauthorized
application/json
403
Forbidden
application/json
500
Internal Server Error
application/json
post
POST /api/v2/test-run/trigger HTTP/1.1
Host: 
X-Api-Key: YOUR_API_KEY
Content-Type: application/json-patch+json
Accept: */*
Content-Length: 58

{
  "targetId": 1,
  "probeIds": [
    1,
    2,
    3
  ],
  "name": "SplXAI Test Run"
}
{
  "testRunId": 1
}