List GTmetrix test locations
Answers the locations GTmetrix can test from, for generating an audit's GTmetrix reports.
GET/ api/ performance-audits/ gtmetrix-locations
Returns
200 The locations.
Fields of the 200 answer
itemsarray of objectsRequired
Fields of each item
idstringRequired
namestringRequired
If it is refused
| Status | Reason | What to do |
|---|---|---|
401 | none | Send a valid token as Authorization: Bearer <token>. |
403 | forbidden | The person is not allowed to do this. |
403 | scope_required | Use a token with the scope named in scope. |
429 | rate_limited | Wait for the seconds in Retry-After. |
502 | upstream_unavailable | A service the action depends on did not answer. Try again later. |
503 | temporarily_unavailable | The 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 https://manage.corefinity.com/api/performance-audits/gtmetrix-locations \
-H "Authorization: Bearer $COREFINITY_TOKEN" \
-H "Accept: application/json"use Illuminate\Support\Facades\Http;
$response = Http::withToken(env('COREFINITY_TOKEN'))
->acceptJson()
->get('https://manage.corefinity.com/api/performance-audits/gtmetrix-locations');
$data = $response->json();const res = await fetch('https://manage.corefinity.com/api/performance-audits/gtmetrix-locations', {
method: 'GET',
headers: {
Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
Accept: 'application/json',
},
});
// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);import os
import requests
res = requests.get(
"https://manage.corefinity.com/api/performance-audits/gtmetrix-locations",
headers={
"Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
"Accept": "application/json",
},
)
data = res.json() if res.content else None{
"items": [
{
"id": "2",
"name": "London, UK"
},
{
"id": "7",
"name": "Sydney, Australia"
}
]
}{
"message": "Unauthenticated."
}{
"code": "forbidden",
"message": "Your account cannot use performance audits. Ask an owner of your company for access.",
"reason": "forbidden"
}{
"code": "rate_limited",
"message": "Too many requests. Try again in 60 seconds.",
"reason": "rate_limited",
"retry_after_seconds": 60
}{
"code": "upstream_unavailable",
"message": "GTmetrix could not list its locations: GTmetrix request failed (HTTP 500). Try again later.",
"reason": "upstream_unavailable"
}{
"code": "temporarily_unavailable",
"message": "GTmetrix reports are not available right now. Try again later.",
"reason": "temporarily_unavailable"
}Try it
Was this helpful?