API reference
ISPs and sites
The ISPs a key can access, their sites, and the regions the sites belong to.
- List ISPs
GET /v1/isps - List regions
GET /v1/regions - List sites
GET /v1/sites
List ISPs
The ISPs your key can access. Every other operation takes one of these ISP codes to say which ISP it works on, and you can leave it out when your key reaches only one.
Response
Also available as CSV: add format=csv. Columns follow the field order below, with nested fields as dotted columns
(ap.name).
-
ispsarray of objectsEach item: 2 fields
-
ispcodestringPass as ispcode (MCP) or ?isp= (REST)
-
namestring
-
Example
curl -H "Authorization: Bearer $SWIFTFOX_KEY" \
"https://api.swiftfox.net/v1/isps" Response (example data):
{
"isps": [
{
"ispcode": "riverbend",
"name": "Riverbend Wireless"
},
{
"ispcode": "riverbendnorth",
"name": "Riverbend North"
}
]
} List regions
Your regions: the groups your sites belong to. Pass a region_id as region to list_sites, list_devices, list_backhauls, list_cpes or the issues feed to narrow them to one region.
Parameters
-
ispstring queryISP code from GET /isps. Optional when the key reaches exactly one ISP.
-
limitinteger queryMax rows (default 500, max 1000)
-
cursorstring querynext_cursor from the previous page
Response
Also available as CSV: add format=csv. Columns follow the field order below, with nested fields as dotted columns
(ap.name).
Paged: pass next_cursor back as cursor for the next page.
-
countinteger -
next_cursorstring nullablePass as cursor to get the next page; null on the last page
-
regionsarray of objectsEach item: 3 fields
-
region_idinteger -
namestring -
site_countintegerSites in the region
-
Example
curl -H "Authorization: Bearer $SWIFTFOX_KEY" \
"https://api.swiftfox.net/v1/regions?isp=yourisp" Response (example data):
{
"count": 3,
"next_cursor": null,
"regions": [
{
"region_id": 2,
"name": "North",
"site_count": 4
},
{
"region_id": 1,
"name": "Riverbend",
"site_count": 2
},
{
"region_id": 3,
"name": "South",
"site_count": 3
}
]
} List sites
Your sites (towers and other locations): each one's code, name, region, whether it's enabled, and how many infrastructure devices it has. Filter by region with a region_id from list_regions. To see a site's devices, pass its id or code to list_devices.
Parameters
-
ispstring queryISP code from GET /isps. Optional when the key reaches exactly one ISP.
-
regioninteger queryRestrict to one region: region_id from
list_regions -
limitinteger queryMax rows (default 500, max 1000)
-
cursorstring querynext_cursor from the previous page
Response
Also available as CSV: add format=csv. Columns follow the field order below, with nested fields as dotted columns
(ap.name).
Paged: pass next_cursor back as cursor for the next page.
-
countinteger -
next_cursorstring nullablePass as cursor to get the next page; null on the last page
-
sitesarray of objectsEach item: 6 fields
-
site_idinteger -
codestringShort site code, as typed by the ISP
-
namestring -
regionobject nullableThe site's region
2 fields
-
region_idinteger -
namestring
-
-
enabledboolean -
device_countintegerInfrastructure devices at the site
-
Example
curl -H "Authorization: Bearer $SWIFTFOX_KEY" \
"https://api.swiftfox.net/v1/sites?isp=yourisp" Response (example data):
{
"count": 3,
"next_cursor": null,
"sites": [
{
"site_id": 3,
"code": "RB-CORE",
"name": "Riverbend Data Centre",
"region": {
"region_id": 1,
"name": "Riverbend"
},
"enabled": true,
"device_count": 6
},
{
"site_id": 7,
"code": "HT",
"name": "Hilltop Tower",
"region": {
"region_id": 2,
"name": "North"
},
"enabled": true,
"device_count": 9
},
{
"site_id": 9,
"code": "MV",
"name": "Mill Valley Tower",
"region": {
"region_id": 3,
"name": "South"
},
"enabled": true,
"device_count": 7
}
]
}