api:sbc:peer:update
Table of Contents
API : SBC Peer Update
Introduction
This request will update a peer that the SBC exchanges traffic with.
Request
| URL | https://api.telecomx.dk/sbc/peer/PEER_ID | ||
|---|---|---|---|
| Method | POST | ||
| Access level | ADMIN. | ||
| Param | PEER_ID | Id of the peer, .e.g. 'Telenor'. | |
| Body | default | Boolean | [optional] True if this is the peer that traffic is sent to by default. |
| name | String | [optional] Friendly name of the peer. |
|
| hosts | Array | Array of IP addresses that the peer exchanges traffic with. | |
| hosts[].host | String | IP address of the peer host. | |
| hosts[].state | String | State of the host: up, down, true (unreachable) | |
| failoverPeerId | String | [optional] Id of the peer that calls should be sent through if this peer is down. |
|
| networkInterface | String | [optional] Name of the network interface this peer is located on, e.g. ETH0. |
|
| up | Boolean | [optional] True if peer is up and usable, false if it is down and the failover should be used instead. |
|
Query examples
{
up: false
}
Response
The response is a peer object.
| Peer object (JSON) | ||
|---|---|---|
| _id | String | Id of the peer, e.g. 'Telenor'. |
| default | Boolean | True if this is the peer that traffic is sent to by default. |
| name | String | Friendly name of the peer. |
| hosts | Array | Array of IP addresses that the peer exchanges traffic with. |
| hosts[].host | String | IP address of the peer host. |
| hosts[].state | String | State of the host: up, down, true (unreachable) |
| failoverPeerId | String | Id of the peer that calls should be sent through if this peer is down. |
| networkInterface | String | Name of the network interface this peer is located on, e.g. ETH0. |
| up | Boolean | True if peer is up and usable, false if it is down and the failover should be used instead. |
Note that properties holding no value may be omitted from the object.
Response example
{ _id: 'Telenor', default: true, name: 'Telenor Denmark A/S', hosts: [ { host: '2.1.1.1', state: 'up' }, { host: '2.1.1.2', state: 'up' } ], failoverPeerId: 'TDC', networkInterface: 'ETH0', up: false }
Errors
| Error code | Message | Description |
|---|---|---|
| 400 | bad_request | Id not found in request URI |
| 404 | id | Peer not found |
| 404 | hosts | Hosts not found |
| 422 | hosts | Found invalid IP address: x.x.x.x |
| 404 | failoverPeerId | Failover peer not found |
| 403 | access_denied | Insufficient access level |
| 500 | internal_error | <Unspecified> |
api/sbc/peer/update.txt · Last modified: 2024/06/21 13:07 by Per Møller