Skip to main content
POST

Authorizations

Authorization
string
header
required

The Tyk Dashboard API Access Credentials

Body

application/json

Sandbox evaluation request — saved resources only. Exactly one of ruleset_ids / categories must be provided (non-empty). To evaluate an API definition submitted in the request body, use POST /api/evaluations/sandbox/oas instead.

api_ids
string[]
required

APIIDs of saved APIs in the caller's org. Classic (non-OAS) APIs are rejected.

Required array length: 1 - 10 elements
ruleset_ids
string[]

Stable RulesetIDs of saved rulesets in the caller's org. Soft-deleted rulesets are rejected. Inactive rulesets are accepted — sandbox semantics are "test this ruleset", regardless of whether it's currently driving the async dispatcher.

Required array length: 1 - 20 elements
categories
string[]

Category names. Server resolves to every active, non-deleted ruleset whose categories intersect this list, scoped to the resource_type of each resolved API. Use this for the "run an entire compliance category against this API" workflow.

Required array length: 1 - 10 elements

Response

Evaluation completed. The response may include a non-empty error string when the engine returned failures for some (ruleset, api) pairs while others succeeded; successful pairs' issues are still present in issues. An empty rulesets[] indicates no rulesets matched (category resolution returned none, or all matching rulesets had a different resource_type than the APIs).

rulesets
object[]
required

Rulesets actually executed in this run. Single-ruleset callers see one entry; category-based callers see the resolved set. Each entry carries the ruleset's configured action and its per-ruleset severity counts. Empty array means no rulesets matched the request (category input with no intersection, or the only matches had a different resource_type than the APIs).

issues
object[]
required

Per-rule violations across all evaluated APIs, sorted by severity then location. Capped at MaxSandboxIssues (1000) — see truncated. Shared row schema with /api/governance/issues.

total
integer
required

Un-truncated issue count produced by the engine.

truncated
boolean
required

True when total > MaxSandboxIssues and issues was capped. FE renders a banner; CI/CD pipelines should treat this as a failure since the build is being gated against partial data.

error_count
integer
required

Run-wide count of severity-0 (error) issues, computed pre-truncation — trustworthy even when issues is capped. Count field names and severity mapping match the persisted ApiGovernanceResult summaries (tyk_governance_api_summaries).

warn_count
integer
required

Run-wide severity-1 (warn) issue count, pre-truncation.

info_count
integer
required

Run-wide severity-2 (info) issue count, pre-truncation.

hint_count
integer
required

Run-wide severity-3 (hint) issue count, pre-truncation.

evaluated_apis
integer
required

Number of APIs the engine actually applied rules against. Always 1 for /sandbox/oas.

elapsed_ms
integer<int64>
required

Wall-clock duration of engine.Evaluate, in milliseconds.

error
string

Joined error string when the engine returned failures for some (ruleset, api) pairs (per errors.Join from the mechanism story). Absent on full success. Per-pair attribution is deferred — see ticket.