Update API Test
update_api_testReplace the entire configuration of an existing API test (identified by apiTestId) with the supplied values — a full overwrite, not a partial patch, so pass every field you want to keep. Same parameters and request variables as create_api_test. Does not touch notification destinations; change those with set_api_test_destinations. If the change affects how the probe behaves (target, credential, assertions or timeout), the updated test is run once before it is saved, the same way create_api_test does; a failing trial run leaves the existing test unchanged and returns an error that says what failed. Changing only the name, interval, retries, failure threshold or enabled flag saves without a trial run. Returns the updated API test and its state. The target URL must be reachable from the public internet; private, loopback and cloud-internal addresses are refused.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Human-readable name for the API test | |
| type | Yes | API test type: 'HTTP' or 'MCP' | |
| mcpUrl | No | MCP only: the MCP server URL to probe | |
| enabled | Yes | Whether the API test is enabled (scheduled) or paused | |
| httpUrl | No | HTTP only: the http(s) URL to probe. Supports {{uuid}}, {{now}}, {{date}}, {{timestamp}}, {{timestampMs}}, {{timestampNs}}, {{randomInt}} and {{traceId}} variables, resolved once per run; write \{{ for a literal {{. | |
| mcpTier | No | MCP only: assertion tier — HANDSHAKE, TOOLS_LIST or TOOL_CALL | |
| retries | Yes | Retries per run before recording a failure (0-5) | |
| httpBody | No | HTTP only: request body | |
| toolName | No | MCP TOOL_CALL tier: name of the tool to invoke | |
| apiTestId | Yes | Id of the API test to update (from list_api_tests or get_api_test) | |
| httpMethod | No | HTTP only: request method — GET, POST, PUT, PATCH, DELETE or HEAD | |
| httpHeaders | No | HTTP only: request headers, as a name->value map | |
| expectedTools | No | MCP TOOLS_LIST tier: tool names the server must advertise | |
| statusPattern | No | HTTP only: status matcher — '200', '2xx' or '20x' | |
| headerMatchers | No | HTTP only: response headers that must match, as a name->value map | |
| timeoutSeconds | Yes | Per-run timeout in seconds, 1-30 | |
| intervalSeconds | Yes | How often to run the API test, in seconds (minimum 30) | |
| mcpCredentialId | No | MCP only: id of a stored credential | |
| failureThreshold | Yes | Consecutive failing runs before the API test flips to DOWN (1-10) | |
| httpCredentialId | No | HTTP only: id of a stored credential; omit for unauthenticated | |
| maxLatencyMillis | No | HTTP only: fail if slower than this many milliseconds | |
| toolArgumentsJson | No | MCP TOOL_CALL tier: JSON object of tool arguments. Supports {{uuid}}, {{now}}, {{date}}, {{timestamp}}, {{timestampMs}}, {{timestampNs}}, {{randomInt}} and {{traceId}} variables, resolved once per run; write \{{ for a literal {{. | |
| bodyValidationTier | No | HTTP only: body validation tier — NONE, VALID_JSON, JSON_CONTAINS (sample fields must be present with the same types, extra fields allowed), JSON_SHAPE (exact field set) or EXACT_MATCH | |
| mcpMaxLatencyMillis | No | MCP only: fail if slower than this many milliseconds | |
| mcpProtocolRevision | No | MCP only: protocol revision policy — ANY (the default when omitted), NEWEST_SUPPORTED, or a dated revision: 2024-11-05, 2025-03-26, 2025-06-18, 2025-11-25, 2026-07-28. ANY checks that the endpoint answers as an MCP server and records whatever revision it speaks, without asserting it; at the HANDSHAKE tier, a server that answers 401 or 403 when the test has no credential counts as up. NEWEST_SUPPORTED runs against the newest protocol revision the server speaks and moves with it when the server changes. A dated revision pins the test to it and the test fails if the server stops accepting it. Get the server's revisions from detect_mcp_protocol. | |
| bodyValidationSample | No | HTTP only: sample body for JSON_CONTAINS/JSON_SHAPE/EXACT_MATCH tiers | |
| mcpResultValidationTier | No | MCP TOOL_CALL tier: result validation tier — NONE, VALID_JSON, JSON_CONTAINS, JSON_SHAPE or EXACT_MATCH | |
| mcpResultValidationSample | No | MCP TOOL_CALL tier: sample result for JSON_CONTAINS/JSON_SHAPE/EXACT_MATCH |