CorefinityCorefinityDocs
Open the Control PanelControl Panel
Web server rules · 18 of 19

Get an Nginx test run

Answers a test run's state. Read it again until status is no longer queued or running.

GET/api/corestack/sites/{site}/nginx-rules/tests/{test}

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

testintegerRequired

The id of a test run, from a check's test.id. At least 1.

Returns

200 The test run.

Fields of the 200 answer
diagnosticsarray of objectsRequired
Fields of each item
codestringRequired

A stable code for the problem, such as root_outside_webroot.

columninteger or null
fieldstring or null

For a path app, the field, such as php.entries.1.

hookstring or null

The part of the rules it is in, such as server.

lineinteger or null
messagestringRequired
recordstring or null

For a path app, the id of the record. hook is then path_apps.

severitystringRequired

error refuses a save; anything else is a warning.

sourcestring

What found it, such as policy.

duration_msinteger or nullRequired
finished_atstring or nullRequired

Format: date-time.

idintegerRequired

At least 1.

outputstring or nullRequired

What the site's Nginx said.

reasonstring or nullRequired
started_atstring or nullRequired

Format: date-time.

statusstringRequired

passed or failed is the test's result. unavailable, timed_out and error mean the test could not be run; a save then relies on the checks after it.

queuedrunningpassedfailedunavailabletimed_outerror

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
429rate_limitedWait for the seconds in Retry-After.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl https://manage.corefinity.com/api/corestack/sites/1042/nginx-rules/tests/1 \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json"
{
  "diagnostics": [],
  "duration_ms": 4000,
  "finished_at": "2026-11-06T09:16:44Z",
  "id": 9,
  "output": "nginx: configuration file test is successful",
  "reason": null,
  "started_at": "2026-11-06T09:16:40Z",
  "status": "passed"
}
Try it
Held in this tab's memory only. Never stored or sent to us.

Use a token with only the read scope. How to make one

Was this helpful?
Open in ClaudeOpen in ChatGPT