This API component provides endpoints for blocking clients and editing client names.
functionality | method | endpoint |
---|---|---|
get blocked clients | GET | /client/network/<network-id>/block |
block/unblock clients | PUT | /client/network/<network-id>/block |
edit clients | PUT | /client/network/<network-id>/edit |
GET /client/network/<network-id>/block
Get all blocked clients for a network.
GET https://api.cloudtrax.com/client/network/123456/block
The API either returns HTTP status code 200 (success) or an HTTP error and JSON describing the error. On success, the API returns all blocked clients.
{
"clients": {
"00:00:00:00:00:01": {
"name": "unittest client",
"name_override": "test overwrite",
"cid": "V28hO3syPho0szL5dqDeoRDBtdv9_cofjMygMbpmstQ=",
"signal": {
"antenna1": -64,
"antenna2": -74
},
"mcs": {
"tx": 6
},
"bitrate": {
"rx": 52,
"tx": 58.5
},
"channel_width": 20,
"band": "2.4GHz",
"last_seen": "2015-10-04T23:18:58Z",
"last_name": "andreas test",
"last_node": "ac:86:74:00:00:04",
"link": "wireless",
"wifi_mode": "ac",
"blocked": true,
"os": "IOS",
"os_version": "",
"traffic": {
"ssid2": {
"bup": 60000000,
"bdown": 54000000
},
"ssid1": {
"bup": 24000000,
"bdown": 18000000
}
}
},
"AB:CD:EF:14:3B:04": {
"name": "",
"name_override": "",
"cid": "8DEnHhpg5sRvpnrumoCiuKQXJ-gA0Hmeyr2aHKXBMdE=",
"signal": {
},
"mcs": {
"tx": 0
},
"bitrate": {
"rx": 0,
"tx": 0
},
"channel_width": 0,
"band": "",
"last_seen": "",
"last_name": "",
"last_node": "",
"link": "",
"wifi_mode": "",
"blocked": true,
"os": "IOS",
"os_version": "",
"traffic": {
"ssid3": {
"bup": 2400000,
"bdown": 1800000
},
"ssid2": {
"bup": 6000000,
"bdown": 5400000
}
}
}
}
}
Block/unblock a client.
PUT /client/network/<network-id>/block
PUT https://api.cloudtrax.com/client/network/12345/block
{
"block":1,
"client_ids": [
"_4G6of2NARub8yqm-YJR3RveJYK1SI07uXhLygJSkOs=",
"V28hO3syPho0szL5dqDeoRDBtdv9_cofjMygMbpmstQ=",
]
}
The API returns HTTP status code 200 (success) or an HTTP error and JSON describing the error.
PUT /client/network/<network-id>/edit
PUT https://api.cloudtrax.com/client/network/12345/edit
{
"clients": [
{
"id": "_4G6of2NARub8yqm-YJR3RveJYK1SI07uXhLygJSkOs=",
"name": "new-name"
},
{
"id": "V28hO3syPho0szL5dqDeoRDBtdv9_cofjMygMbpmstQ=",
"name": "another-new-name"
}
]
}
The API returns HTTP status code 200 (success) or an HTTP error and JSON describing the error.