Skip to Content
Tools

Test an HTTP tool

Permissiontools:testRetriesIdempotency-Key requiredAuthentication
POST
/tools/{id}/test

Executes the stored tool request exactly once with the parameter values you supply.

This is a real outbound call and may cause upstream side effects.

Secrets

Decrypted only for execution, masked in the echoed request, and redacted from captured response headers and body. DNS and redirects are checked against the public-network policy.

Reading the result

Upstream HTTP statuses are returned inside a 200 test result — a 404 from your API is a result, not a failed test. Transport failures use stable error_code values in that same result.

Reuse the same Idempotency-Key to replay the recorded result without executing the upstream request again.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Request Body

application/json
  1. body
params*

Dynamic tool arguments keyed by declared parameter name. Required arguments must be present; unknown names and type mismatches return 422 before any outbound request is made.

Propertiesproperties <= 100
system?

Optional test-only values for a scope normally populated by a live call. These overrides are never persisted.

Propertiesproperties <= 100
slots?

Optional test-only values for a scope normally populated by a live call. These overrides are never persisted.

Propertiesproperties <= 100
vars?

Optional test-only values for a scope normally populated by a live call. These overrides are never persisted.

Propertiesproperties <= 100

Response Body

The upstream response or a sanitized transport failure. An upstream 4xx or 5xx remains a successful test operation and appears in response.status.

application/json
  1. response

Exactly one of response or error/error_code is present.

request*

Secret-masked representation of the outbound request. The URL can contain supplied test parameter values but never plaintext secret values.

response?
error?string

Sanitized human-readable transport failure. Absent when an HTTP response was received.

error_code?string
Value in"invalid_rendered_request""upstream_timeout""upstream_unreachable""upstream_response_read_failed"
retryable*boolean
latency_ms*integer
Range0 <= value
Example Request
curl -X POST 'https://api.kejue.co/v1/tools/497f6eca-6276-4993-bfeb-53cbbbba6f08/test' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "params": {    "property1": "string",    "property2": "string"  }}'
Example Response
{  "request": {    "method": "GET",    "url": "string",    "headers": {      "property1": "string",      "property2": "string"    },    "body": "string"  },  "response": {    "status": 100,    "headers": {      "property1": "string",      "property2": "string"    },    "body": "string",    "body_truncated": true  },  "error": "string",  "error_code": "invalid_rendered_request",  "retryable": true,  "latency_ms": 0}