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 Try it

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).

  • isps array of objects
    Each item: 2 fields
    • ispcode string

      Pass as ispcode (MCP) or ?isp= (REST)

    • name string

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

GET /v1/regions Try it

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

  • isp string query

    ISP code from GET /isps. Optional when the key reaches exactly one ISP.

  • limit integer query

    Max rows (default 500, max 1000)

  • cursor string query

    next_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.

  • count integer
  • next_cursor string nullable

    Pass as cursor to get the next page; null on the last page

  • regions array of objects
    Each item: 3 fields
    • region_id integer
    • name string
    • site_count integer

      Sites 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

GET /v1/sites Try it

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

  • isp string query

    ISP code from GET /isps. Optional when the key reaches exactly one ISP.

  • region integer query

    Restrict to one region: region_id from list_regions

  • limit integer query

    Max rows (default 500, max 1000)

  • cursor string query

    next_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.

  • count integer
  • next_cursor string nullable

    Pass as cursor to get the next page; null on the last page

  • sites array of objects
    Each item: 6 fields
    • site_id integer
    • code string

      Short site code, as typed by the ISP

    • name string
    • region object nullable

      The site's region

      2 fields
      • region_id integer
      • name string
    • enabled boolean
    • device_count integer

      Infrastructure 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
    }
  ]
}