VoIP Spear API: Users
Introduction Getting Started Users Endpoints VoIP Tests Servers

Description

For each endpoint, you need to define at least one VoIP Test. Basically, this is the server that will be testing the endpoint.

VoIP Test Object

Field Description
id An integer that uniquely identifies the VoIP Test.
endpoint_id The endpoint this VoIP Test belongs to.
server_id The server this VoIP Test belongs to.
mos The current MOS value for this VoIP test. Use the updated_at field to see how recent this value is.
codec The codec being used for the VoIP test.
created_at The date and time the VoIP Test was created.
updated_at The date and time the VoIP Test was last updated.
deleted_at The date and time the VoIP Test was cancelled. If this is null, then the VoIP Test has not been deleted/cancelled yet.
          
{
  "id": 1,
  "endpoint_id": 6,
  "server_id": 10,
  "codec": "g711",
  "created_at": "2008-06-07 00:29:53",
  "deleted_at": "2017-04-13 13:25:43",
}
          
        

Commands

Action Method URL
List the VoIP tests for an endpoint GET /endpoints/<endpoint_id>/voip_tests
Show info for a VoIP test GET /endpoints/<endpoint_id>/voip_tests/<voip_test_id>
Create a new VoIP test for an endpoint POST /endpoints/<endpoint_id>/voip_tests
Update a VoIP test PATCH /endpoints/<endpoint_id>/voip_tests/<voip_test_id>
Delete/cancel a VoIP test DELETE /endpoints/<endpoint_id>/voip_tests/<voip_test_id>
Re-activate a cancelled/deleted VoIP test PATCH /endpoints/<endpoint_id>/voip_tests/<voip_test_id>/activate

List the VoIP tests for an endpoint

Usage

GET /endpoints/<endpoint_id>/voip_tests

Description

In contrast to a listing of users and endpoints, a listing of VoIP tests includes both active and deleted/cancelled VoIP tests.

      GET https://voipspear.com/endpoints/6/voip_tests
      
[
  {
    "id": 1,
    "endpoint_id": 6,
    "server_id": 0,
    "codec": "g711",
    "created_at": "2008-06-07 00:29:53",
    "deleted_at": "2017-04-13 13:25:43",
  },
  {
    "id": 19,
    "endpoint_id": 6,
    "server_id": 1,
    "codec": "g711",
    "created_at": "2008-07-17 22:41:12",
    "deleted_at": null,
  },
  {
    "id": 1311,
    "endpoint_id": 6,
    "server_id": 7,
    "codec": "g711",
    "created_at": "2009-03-06 14:29:30",
    "deleted_at": "2017-04-13 13:25:43",
  }
]
      
    

Show a VoIP Test

Usage

GET /endpoints/<endpoint_id>/voip_tests/<voip_test_id>
      GET https://voipspear.com/endpoints/6/voip_tests/1311
      
{
  "id": 1311,
  "endpoint_id": 6,
  "server_id": 7,
  "codec": "g711",
  "created_at": "2009-03-06 14:29:30",
  "deleted_at": "2017-04-13 13:25:43",
}
      
    

Update a VoIP Test

Usage

PATCH /endpoints/<endpoint_id>/voip_tests/<voip_test_id>

Arguments

When supplying these arguments, they must be inside a JSON element named "voip_test".

server_id ID of the server for this VoIP Test.
codec The codec.
      PATCH https://voipspear.com/endpoints/6/voip_tests/1311     args: {"voip_test":{"codec":"g722"}}
      
{
  "id": 1311,
  "endpoint_id": 6,
  "server_id": 7,
  "codec": "g722",
  "created_at": "2009-03-06 14:29:30",
  "deleted_at": "2017-04-13 13:25:43",
}
      
    

Create a VoIP test for an endpoint

Usage

POST /endpoints/<endpoint_id>/voip_tests
      POST https://voipspear.com/endpoints/6/voip_tests     args:{"voip_test":{"server_id:"1097"}}
      
{
  "id": 1389,
  "endpoint_id": 6,
  "server_id": 1097,
  "codec": "g711",
  "created_at": "2009-03-06 14:29:30",
  "deleted_at": null,
}
      
    

Cancel a VoIP Test

Usage

DELETE /endpoints/<endpoint_id>/voip_tests/<voip_test_id>
      DELETE https://voipspear.com/endpoints/6/voip_tests/1311
      
{
  "id": 1311,
  "endpoint_id": 6,
  "server_id": 7,
  "codec": "g722",
  "created_at": "2009-03-06 14:29:30",
  "deleted_at": "2017-04-16 01:21:14",
}
      
    

Re-activate a VoIP Test

Usage

PATCH /endpoints/<endpoint_id>/voip_tests/<voip_test_id>/activate
      PATCH https://voipspear.com/endpoints/6/voip_tests/1311/activate
      
{
  "id": 1311,
  "endpoint_id": 6,
  "server_id": 7,
  "codec": "g722",
  "created_at": "2009-03-06 14:29:30",
  "deleted_at": null,
}