Servers run the VoIP tests to your endpoints. There are two types of servers -- public and private. Public servers are available for all VoIP Spear customers to use and are maintained by VoIP Spear. Private servers, on the other hand, are run by VoIP Spear customers and only those customers can schedule these servers to run tests to their endpoints.
Please contact us in order to set up a private server.
Commands
| Action | URL | Method |
|---|---|---|
| List servers | /users/{user_id}/servers | GET |
| Show server info | /users/{user_id}/servers/{server_id} | GET |
Server Fields
- id
- An integer that uniquely identifies the server.
- ip_address
- The IP address the server is running on.
- name
- The name of the server.
- description
- A description of the server.
- user_id
- This is the user the server belongs to. If this is a public server, this value will be nil.
- created-at
- The date and time the server was created.
- deleted-at
- The date and time the server was cancelled. If this is nil, then the server has not been deleted/cancelled yet.
List servers
GET http://voipspear.com/users/{user_id}/servers
By default, this returns all active servers that are accessible by you.. However, you can
constrain the results to public servers only (by passing in the parameter public).
You can have private servers returned by passing in parameter private.
GET http://voipspear.com/users/{user_id}/servers?public
GET http://voipspear.com/users/{user_id}/servers?private
Example
curl -u username:password -H 'Accept: text/xml' -i http://voipspear.com/users/1/servers
HTTP/1.1 200 OK
Connection: close
Date: Sat, 24 Jan 2009 06:28:50 GMT
Status: 200 OK
Server: Mongrel 1.1.4
Content-Type: application/xml; charset=utf-8
Content-Length: 1167
<?xml version="1.0" encoding="UTF-8"?>
<servers type="array">
<server>
<created-at type="datetime">2008-01-01T00:00:00Z</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<description nil="true"></description>
<id type="integer">11</id>
<ip-address>192.168.1.100</ip-address>
<name>West Coast</name>
<user-id type="integer" nil="true"></user-id>
</server>
<server>
<created-at type="datetime">2009-01-01T00:00:00Z</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<description>This is our VoIP Spear server running in Ireland. It is sponsored by www.blahblah.com</description>
<id type="integer">2</id>
<ip-address>192.168.1.101</ip-address>
<name>Ireland</name>
<user-id type="integer" nil="true"></user-id>
</server>
<server>
<created-at type="datetime">2009-01-01T00:00:00Z</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<description></description>
<id type="integer">13</id>
<ip-address>129.0.0.1</ip-address>
<name>East Coast</name>
<user-id type="integer">1</user-id>
</server>
</servers>
Show server information
GET http://voipspear.com/user/{user_id}/servers/{server_id}
Example
curl -u username:password -H 'Accept: text/xml' -i http://voipspear.comß/users/1/servers/2
HTTP/1.1 200 OK
Connection: close
Date: Sat, 24 Jan 2009 06:34:40 GMT
Status: 200 OK
Server: Mongrel 1.1.4
Content-Type: application/xml; charset=utf-8
Content-Length: 433
<?xml version="1.0" encoding="UTF-8"?>
<server>
<created-at type="datetime">2009-01-01T00:00:00Z</created-at>
<deleted-at type="datetime" nil="true"></deleted-at>
<description>This is our VoIP Spear server running in Ireland. It is sponsored by www.blahblah.com</description>
<id type="integer">2</id>
<ip-address>209.20.73.234</ip-address>
<name>Ireland</name>
<user-id type="integer" nil="true"></user-id>
</server>
