PUT
/
api
/
trpc
/
test-runs.update

Path Parameters

test_run_id
string
required

The unique identifier of the test run to update

Request Body

0
object
required

Response

id
string

The unique identifier of the test run

status
string

Updated status of the test run

updated_at
string

ISO 8601 timestamp of when the test run was updated

configuration
object

Updated test run configuration

variables
object

Updated environment variables

Example Request

curl -X PUT https://api.tryiris.dev/api/trpc/test-runs.update \
  -H "Authorization: Bearer ${API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "0": {
      "json": {
        "data": {
          "status": "paused",
          "configuration": {
            "timeout": 600,
            "retry_count": 3
          },
          "variables": {
            "DEBUG_MODE": "true"
          }
        }
      }
    }
  }'

Example Response

{
  "id": "run_2f3e4d5c6b",
  "status": "paused",
  "created_at": "2024-01-20T14:00:00Z",
  "updated_at": "2024-01-20T14:15:00Z",
  "configuration": {
    "timeout": 600,
    "retry_count": 3,
    "parallel_steps": true,
    "screenshot_on_failure": true,
    "video_recording": true
  },
  "variables": {
    "USER_EMAIL": "test@example.com",
    "PRODUCT_SKU": "DEMO-123",
    "DEBUG_MODE": "true"
  }
}

Error Responses

400 Bad Request
object

Invalid request body or parameters

{
  "error": "invalid_request",
  "message": "Invalid status transition"
}
404 Not Found
object

Test run not found

{
  "error": "not_found",
  "message": "Test run not found"
}
401 Unauthorized
object

Missing or invalid API key

{
  "error": "unauthorized",
  "message": "Invalid API key provided"
}
409 Conflict
object

Invalid state transition

{
  "error": "conflict",
  "message": "Cannot pause a completed test run"
}