Run a sandbox evaluation for one submitted OAS definition.
Synchronously evaluate one OpenAPI/Tyk OAS API definition submitted as content — either the raw file as the request body (--data-binary @openapi.yaml) or a {"content": "..."} JSON envelope. The definition is treated as a transient inline API: no import, no persistence. Used by CI/CD pipelines (API token) and the UI draft-OAS flow (session + CSRF).
Shape detection is deterministic: a JSON body whose top-level object has a content key is an envelope (no valid OpenAPI document has one); everything else is a raw document. The envelope’s content string is parsed as JSON first, then YAML.
Ruleset selection is explicit and bounded: ruleset_ids, else categories, else 400. Categories are never derived from the submitted file — OAS documents carry no category linkage (for OAS APIs, categories live on the Dashboard-stored API envelope, not in the definition). There is no “run all active rulesets” fallback — CI behavior must not change because an unrelated ruleset became active.
Query Parameters
Body
- Option 1
- Option 2
Envelope transport for POST /api/evaluations/sandbox/oas. Carries the API definition as a string and nothing else — evaluation metadata (ruleset_ids, categories, api_id, api_name) stays in query params. Extra fields are rejected with 400.
Response
Evaluation completed. evaluated_apis is always 1 on this endpoint. The response may include a non-empty error string for partial engine failures. CI gates must inspect the body — truncated == true, a present error, or blocking-severity issues all arrive with HTTP 200.
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).