CorefinityCorefinityDocs
Open the Control PanelControl Panel
Performance audits · 8 of 14

Create GTmetrix reports

Starts one GTmetrix test for each environment and page of the audit, in the background: read the audit's GTmetrix reports until generation.status is completed or failed. Each test uses GTmetrix credits, so send the number it starts as confirm_count: any other number is refused with the right number in the message. When some tests were not started, the next generation at the same location starts only those.

POST/api/performance-audits/{audit}/gtmetrix-reports

Path parameters

auditintegerRequired

The id of an audit. Digits only. At least 1.

Body

confirm_countintegerRequired

The number of tests this starts. At least 1.

location_idstringRequired

The id of one of GTmetrix's locations, as the GTmetrix locations list answers it. Up to 64 characters.

Returns

202 The generation is queued. Poll the operation until it finishes.

Fields of the 202 answer
audit_idintegerRequired

At least 1.

errorstring or nullRequired

On a failed generation: how many tests were not started.

failuresarray of objectsRequired

Each test GTmetrix refused.

Fields of each item
errorstringRequired
namestringRequired
finished_atstring or nullRequired

Format: date-time.

idstringRequired
location_idstringRequired
reportsarray of objectsRequired
Fields of each item
namestringRequired
test_idstringRequired
requested_atstring or nullRequired

Format: date-time.

resumedbooleanRequired

Whether it starts only the tests the last generation at this location did not start.

startedintegerRequired

How many GTmetrix has started. At least 0.

statusstringRequired
queuedrunningcompletedfailed
testsintegerRequired

The tests of the generation. At least 0.

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403scope_requiredUse a token with the scope named in scope.
404noneCheck the id. You see only what your account can reach.
409conflictThe action conflicts with the object's present state. Read the message.
409nothing_to_runThe audit has no domains or pages to test. Add them to the audit first.
409run_in_progressThe audit is running. Wait for it to finish.
409too_largeThe upload is larger than the limit for one file.
422confirm_mismatchSend the confirmation exactly as the field named in field asks for it.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
502upstream_unavailableA service the action depends on did not answer. Try again later.
503temporarily_unavailableThe Control Panel could not answer just now. Nothing was started; try again shortly.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/performance-audits/5210/gtmetrix-reports \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "confirm_count": 4,
    "location_id": "2"
  }'
{
  "audit_id": 5210,
  "error": null,
  "failures": [],
  "finished_at": null,
  "id": "0d9c1a4e-6f1b-4f5e-9b8a-2d7c3e4f5a6b",
  "location_id": "2",
  "reports": [],
  "requested_at": "2026-11-03T12:30:00+00:00",
  "resumed": false,
  "started": 0,
  "status": "queued",
  "tests": 4
}
Try it

Try it is off for this endpointIt can add to your bill. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT