VoIP Spear API

Description

In the VoIP Spear world, servers are the entities that monitor your endpoints. VoIP Spear maintains a number of servers deployed around the world. Any VoIP Spear user is free to use these "community" servers.

In addition to community servers, some customers run "private" testing servers for their own endpoints. These are Linux, Windows, or Mac computers which are running the VoIP Spear testing software. Private servers are usable only by the customer who installed the software.

Please contact us if you would like to set up a private server.

Server Object

Field Description
id An integer that uniquely identifies the server
name Name of the server.
ip_address IP address or hostname of the server.
region Region where the server is located.
description Description of the server.
private Indicates if this is a private or community server.
last_login_date The date and time this server last logged into VoIP Spear.
last_login_ip The last IP address from which this server logged in.
created_at The date and time the server was created.
deleted_at The date and time the server was cancelled. If null, the server has not been cancelled.

  {
    "id": 1057,
    "name": "San Francisco",
    "ip_address": "162.243.146.17",
    "region": "North America",
    "description": "Community server located in San Francisco, USA.",
    "private": false,
    "version": "4.0.2",
    "last_login_date": "2016-10-11 00:59:41",
    "last_login_ip": "162.243.146.17",
    "created_at": "2013-11-23 16:28:22",
    "deleted_at": null,
  }
        

Commands

Action Method URL
List your servers GET /servers
Show server GET /servers/<server_id>
Update server PATCH /servers/<server_id>
Delete/cancel server DELETE /servers/<server_id>
Recover a deleted server PATCH /servers/<server_id>/activate

List your servers

Usage

GET /servers/<server_id>/servers

Description

By default, this returns all servers that are accessible by you (i.e., it includes both community and private servers). However, you may constrain the results to community or private servers only via the community and private parameters.

Arguments

name Case-insensitive partial match on the name of the server.
ip_address Case-insensitive partial match on IP address (or hostname).
community If included, community servers will be included. Default: true
private If included, private servers will be included. Default: true
status Status ("active", "cancelled") of the servers. Default: "active".
      GET /servers
      
{
  "collection": [
    {
      "id": 1058,
      "name": "New York",
      "ip_address": "162.243.87.191",
      "description": "Community server in New York, USA.",
      "private": false,
      "region": "North America",
      "version": "4.0.4",
      "last_login_date": "2016-10-11 00:59:44",
      "last_login_ip": "162.243.87.191",
      "created_at": "2013-11-23 16:54:17",
      "deleted_at": null
    },
    {
      "id": 1060,
      "name": "London",
      "ip_address": "37.235.54.150",
      "description": "VoIP Spear's community server in London, UK.",
      "private": false,
      "region": "Europe",
      "version": "4.0.3",
      "last_login_date": "2016-10-11 00:59:39",
      "last_login_ip": "37.235.54.150",
      "created_at": "2013-12-28 16:25:01",
      "deleted_at": null
    },
    {
      "id": 1062,
      "name": "Hong Kong",
      "ip_address": "158.255.208.62",
      "description": "VoIP Spear's community server in Hong Kong.",
      "private": false,
      "region": "Asia Pacific",
      "version": "4.0.2",
      "last_login_date": "2016-10-11 00:59:57",
      "last_login_ip": "158.255.208.62",
      "created_at": "2013-12-29 01:08:34",
      "deleted_at": null
    }
  ],
  "metadata": {
    "count": 3
  }
}
      
    

Show server

Usage

GET /servers/<server_id>
      GET /servers/1097
      
{
  "id": 1097,
  "name": "Miami",
  "ip_address": "104.207.145.85",
  "description": null,
  "private": false,
  "region": "North America",
  "version": "4.0.2",
  "last_login_date": "2016-10-11 00:59:41",
  "last_login_ip": "104.207.145.85",
  "created_at": "2015-06-06 01:16:10",
  "deleted_at": null
}
      
    

Update server

Usage

PATCH /servers/<server_id>

Arguments

name The new name of the server.
ip_address New IP address or FQDN for the server.
description Description for the server.
      PATCH /servers/1970     args:{ "name": "Carlos server" }
      
{
  "id": 1970,
  "name": "Carlos server",
  "ip_address": "104.207.145.85",
  "description": null,
  "private": true,
  "region": "North America",
  "version": "4.0.2",
  "last_login_date": "2016-10-11 00:59:41",
  "last_login_ip": "104.207.145.85",
  "created_at": "2015-06-06 01:16:10",
  "deleted_at": null
}
      
    

Delete/cancel server

Usage

DELETE /servers/<server_id>

Description

Deletes a server. Note that the server can be recovered after this.

      DELETE /servers/1973
      
{
  "id": 1973,
  "name": "North Minnesota",
  "ip_address": "14.27.15.85",
  "description": null,
  "private": true,
  "region": "North America",
  "version": "4.0.2",
  "last_login_date": "2016-10-11 00:59:41",
  "last_login_ip": "14.27.15.85",
  "created_at": "2015-06-06 01:16:10",
  "deleted_at": "2017-03-31 19:01:09"
}
      
    

Recover deleted server

Usage

PATCH /servers/<server_id>/activate

Description

Deletes a VoIP test. Note that the VoIP tests can be recovered after this.

      PATCH /servers/1973/activate
      
{
  "id": 1973,
  "name": "North Minnesota",
  "ip_address": "14.27.15.85",
  "description": null,
  "private": true,
  "region": "North America",
  "version": "4.0.2",
  "last_login_date": "2016-10-11 00:59:41",
  "last_login_ip": "14.27.15.85",
  "created_at": "2015-06-06 01:16:10",
  "deleted_at": "2017-03-31 19:01:09"
}