API v4
REST API
Method | URL | Parameter | Example |
GET | /api/:version/mac/:mac | :version=v4, :mac=mac address | /api/v4/mac/FCD4F2 |
GET | /api/:version/vendor/:vendor | :version=v4, :vendor=vendor name, wildcard | /api/v4/vendor/Coca |
GET | /api/:version/stats | :version=v4 | /api/v4/stats |
error codes
http | success | error | message |
200 | false | -1 | not found |
200 | false | -2 | empty query |
200 | false | -3 | invalid request |
200 | false | -4 | invalid MAC |
200 | false | -5 | too much results |
200 | false | -6 | api request out of date |
mac2vendor response
{
"success": true,
"results": 1,
"payload": [
{
"vendor": "Coca Cola Company",
"mac": {
"int": 16569586,
"str": "fcd4f2",
"strlower": "fcd4f2",
"strupper": "FCD4F2",
"dot": "fc:d4:f2",
"dotlower": "fc:d4:f2",
"dotupper": "FC:D4:F2",
"dash": "fc-d4-f2",
"dashlower": "fc-d4-f2",
"dashupper": "FC-D4-F2"
}
}
]
}
vendor2mac response
{
"success": true,
"results": 2,
"payload": [
{
"vendor": "U4ea Technologies",
"mac": {
"int": "5523",
"str": "001593",
"strlower": "001593",
"strupper": "001593",
"dot": "00:15:93",
"dotlower": "00:15:93",
"dotupper": "00:15:93",
"dash": "00-15-93",
"dashlower": "00-15-93",
"dashupper": "00-15-93"
}
},
{
"vendor": "U4ea Technologies",
"mac": {
"int": "6844",
"str": "001abc",
"strlower": "001abc",
"strupper": "001ABC",
"dot": "00:1a:bc",
"dotlower": "00:1a:bc",
"dotupper": "00:1A:BC",
"dash": "00-1a-bc",
"dashlower": "00-1a-bc",
"dashupper": "00-1A-BC"
}
}
]
}
error response
{
"success": false,
"error": -1,
"message": "not found"
}