Locations
List locations
Retrieves all locations
Available include parameters
| Parameter | Description |
|---|---|
| nodes | List of nodes assigned to the location |
| servers | List of servers in the location |
GET
/api/application/locationsAuthorization
ApplicationToken AuthorizationBearer <token>
Application API key (generated at /admin/api)
In: header
Query Parameters
include?string
Comma-separated list of related resources to embed in each returned object. Accepted values are listed in the include-parameters table above.
filter[short]?string
Partial match on the short code.
filter[long]?string
Partial match on the long name.
sort?string
Sort by id; prefix with - for descending.
Value in
"id" | "-id"page?integer
Page of results to return.
per_page?integer
Number of results per page (default 50).
Default
50Response Body
application/json
curl -X GET "https://pterodactyl.file.properties/api/application/locations?include=nodes%2Cservers&filter%5Bshort%5D=us&filter%5Blong%5D=United+States&sort=id&page=1&per_page=50" \ -H "Authorization: Bearer ptla_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" \ -H "Accept: application/json"{
"object": "list",
"data": [
{
"object": "location",
"attributes": {
"id": 1,
"short": "GB",
"long": "London Datacenter",
"updated_at": "2020-06-13T21:16:58+00:00",
"created_at": "2019-12-22T04:44:18+00:00"
}
}
],
"meta": {
"pagination": {
"total": 1,
"count": 1,
"per_page": 50,
"current_page": 1,
"total_pages": 1,
"links": {}
}
}
}