Skip to content
jpereira edited this page Oct 27, 2014 · 5 revisions

Defining the SoftGREd API

The API consists of the following methods:

GET /softgre/api/ues/{cpe-ip}

List all mac-address of UES (User Equipments) by IP of CPE, e.g: /api/ue/201.26.122.22 and result $mac_ue1;$mac_ue2;...

GET /softgre/api/cpe/{ue-mac}

Show tunnel info by mac-address of UE (User Equipment) e.g: /api/cpe/7c:fa:df:a1:f7:30 result $ip_cpe@$iface

GET /softgre/api/tunnels

Show all provisioned tunnels. (IP_CPE@GRE-INTERFACE) result: $ip_cpe1@$iface1;$ip_cpe@$ifaceN;

GET /softgre/api/status

Show status of SoftGREd, result: $os_name;$os_version;$os_arch;$sys_uptime;$sgre_version;$sgre_timestarted

Object returned (jSON)

{
  "status": "OK",             // Possible values: OK, DOWN, NOTFOUND, INVALID or NULL
  "body": "return of command" // Only when 'status' was "OK"
}