Practical Examples
Objectives
Imports
import requests
import jsonSetting variables
# Note, these variables need to be set according to your URL otherwise the API calls will not work.
# Example URL:
# https://probe.splx.ai/w/290/target/91/test-runs/862/probe/1815?tab=results
url = "https://api.probe.splx.ai" # URL for the EU deployment; us.api.probe.splx.ai for US
workspace_id = "290"
target_id = "91"
test_run_id = "862"
probe_run_id = "1815"Example: Export probe run test cases
Endpoints for Replicating PDF Reports
Endpoints Used for Probe Settings
Endpoints Used for Remediation Tasks & Guardrail Policy Suggestions
Example Use Case 1: Get all FAILED Test Cases for a Given Organization
1. Get all workspaces
2. Retrieve all test runs for every Target ID within a workspace
3. For each test run, retrieve all associated Probe Run IDs
4. For each probe run, retrieve all failed test cases and consolidate them into a single dataset
Example Use Case 2: Retrieving FAILED Test Cases for a Specific Benchmark Model and Probe Run
1. Retrieve all benchmark models to view their IDs and details
2. Retrieve specific benchmark test cases
3. Retrieve data for a specific probe run
4. Retrieve all failed test cases for this probe run
Last updated
Was this helpful?