API Details¶
URL | Auth Required | GET | GET :id | GET Meta | POST | PUT | DELETE |
---|---|---|---|---|---|---|---|
Auth | no | yes | |||||
Auth-repo | yes | yes | yes | yes | |||
Backup | yes | yes | yes | yes | yes | yes | yes |
Brand | yes | yes | yes | yes | yes | yes | yes |
cmd | yes | yes | yes | yes | yes | yes | yes |
Config | yes | yes | yes | yes | yes | ||
Cron | yes | yes | yes | yes | yes | yes | yes |
Cronnetconf | yes | yes | yes | yes | yes | yes | yes |
CronTarget | yes | yes | yes | yes | yes | yes | yes |
Dbdelta | yes | yes | yes | yes | yes | ||
Device | yes | yes | yes | yes | yes | yes | yes |
DeviceStatus | yes | yes | yes | yes | |||
DeviceUser | yes | yes | yes | yes | yes | yes | yes |
DeviceUsrView | yes | yes | yes | yes | yes | yes | yes |
Filter | yes | yes | yes | yes | yes | yes | yes |
FilterCateg | yes | yes | yes | yes | yes | yes | yes |
Group | yes | yes | yes | yes | yes | yes | yes |
GroupCateg | yes | yes | yes | yes | yes | yes | yes |
GuestUser | yes | yes | yes | ||||
Log | yes | yes | yes | yes | yes | yes | yes |
LogCron | yes | yes | yes | yes | yes | yes | yes |
Model | yes | yes | yes | yes | yes | yes | yes |
Network | yes | yes | yes | yes | yes | yes | yes |
Notification | yes | yes | |||||
OTP | yes | yes | yes | yes | yes | yes | yes |
PolEval | yes | yes | |||||
Plugin | yes | yes | |||||
Policy | yes | yes | yes | yes | yes | yes | yes |
PolicyPlugin | yes | yes | yes | yes | yes | yes | yes |
Queue | yes | ||||||
QueueWorkers | yes | yes | |||||
QueueStatus | yes | yes | |||||
QueueStop | yes | yes | |||||
Radauth | no | yes | |||||
Repository | yes | yes | yes | yes | yes | yes | yes |
RepoIdUSer | yes | yes | yes | yes | yes | yes | yes |
RepoCheck | yes | yes | |||||
Searchldap | yes | yes | yes | yes | yes | yes | yes |
SecProfile | yes | yes | yes | yes | yes | yes | yes |
StatusUsrDev | yes | yes | yes | yes | yes | yes | yes |
Target | yes | yes | yes | yes | yes | yes | yes |
Template | yes | yes | yes | yes | yes | yes | yes |
UserLDAP | yes | yes | yes | yes | yes | yes | yes |
VLAN | yes | yes | yes | yes | yes | yes | yes |
WizAdmin | yes | yes | yes | yes | yes | ||
WizQuarantine | yes | yes | yes | yes | yes | ||
WizRegistry | yes | yes | yes | yes | yes | ||
WizSwitch | yes | yes | yes | yes | yes | ||
WizUsers | yes | yes | yes | yes | yes |
Authentication headers¶
Most API calls need authentication. In order to provide credentials for those calls, first of all a token must be acquired by issuing an auth request. In further calls, credentials will be provided as following HTTP headers:
- X-Opennac-Username: User name successfully authenticated in previous auth request
- X-Opennac-Token: Token returned by previous auth request
The token expires after one hour of inactivity.
Standard API¶
Given an ideal resource foo, its API calls should meet the following template:
GET foo
Get a list of foo objects.
Arguments
URL: following parameters are accepted:
filters: a list of field-value pairs. List items can be separated with either:
; performs a logical and
, performs a logical or
both chars are not allowed in the same list. Items cannot be grouped (i.e. parenthesized).
Each field-value item must meet the pattern {field name}{operator}{value}. Following operators are allowed:
== equals
< less
<= less or equal
> greater
>= greater or equal
=@ contains
<@ starts with
>@ ends with
Example:
filters=name=@X;date>2001-01-01
Will be interpreted as: name contains X and date after January 1st 2001
- count: if present the response will be a number indicating item count, instead of a list. When count is present, sort, start-index and max-results parameters are ignored.
- sort: a comma separated list of field names, each prefixed with a + or - to indicate ascending or descending order respectively. Example:
sort=+name,-date
Will be interpreted as: sort in ascending name order and for equal names in descending date order.
start-index: a number indicating the offset in the back-end data set of the first item to be returned (zero based). Defaults to 0.
max-results: a number limiting the size of the list to be returned. By default, all items are returned.
group-by: the id of a groupcateg. If present, only objects belonging to that group will be returned.
Headers: X-Opennac-Username, X-Opennac-Token.
Response
Code | Description | Body |
---|---|---|
200 | Successful | A JSON list of objects |
Example:
http://localhost/api/foo?filters=bar==123&sort=+qux&start-index=0&max-results=10
get the first 10 foo objects with field bar equal to 123 ordered by field qux.
GET foo/:id
Get the foo object identified by :id.
Arguments
URL: none
Headers: X-Opennac-Username, X-Opennac-Token.
Response
Code | Description | Body |
---|---|---|
200 | Successful | A JSON object or null if :id not found |
GET foo/metadata
Get an object describing foo resources (note that the string “metadata” can’t be used as id).
Arguments
URL: none
Headers: X-Opennac-Username, X-Opennac-Token.
Response
Code | Description | Body |
---|---|---|
200 | Successful | A list of JSON objects, one for each foo field |
POST foo
Insert a new foo resource.
Arguments
URL: none
Headers: X-Opennac-Username, X-Opennac-Token.
Body: JSON object representing the foo to be created.
Response
Code | Description | Body |
---|---|---|
201 | Successful | A JSON object representing the created foo |
404 | Failure due to invalid input data | A JSON object with one o more error messages |
500 | Failure due to a server error | A JSON object with one o more error messages |
PUT foo/:id
Update an existing foo resource given its unique id.
Arguments
URL: none
Headers: X-Opennac-Username, X-Opennac-Token.
Body: JSON object representing the foo to be updated.
Response
Code | Description | Body |
---|---|---|
200 | Successful | A JSON object representing the updated foo |
404 | Failure due to invalid input data | A JSON object with one o more error messages |
500 | Failure due to a server error | A JSON object with one o more error messages |
DELETE foo/:id
Delete an existing foo resource given its unique id.
Arguments
URL: none
Headers: X-Opennac-Username, X-Opennac-Token.
Response
Code | Description | Body |
---|---|---|
200 | Successful | TODO |
404 | Failure due to unknown id (not implemented) | |
500 | Failure due to a server error | A JSON object with one o more error messages |
Auth¶
GET auth
Not allowed.
POST auth
Start a new session and get a token to be used in further API calls.
Arguments
URL: none.
Headers: none.
Body: JSON object with three fields: username, password and role.
Response
Code | Description | Body |
---|---|---|
200 | Successful | {“result”: “ok”, “token”: “…”} |
401 | Failed | {“result”: “error”, “message”: “…”} |
Example:
curl -X POST -d '{"username":"admin","password":"openNAC","role":"admin"}' http://localhost/api/auth
{"result":"ok","token":"99f9824a-4ac0-11e3-ab15-7a656e642d76"}
PUT auth
Not allowed.
DELETE auth
Not allowed.
Auth-repository¶
Aggregates the set of available user data sources providing a uniform query interface. Returned items represent authenticable users in a format independent from their underlying data source.
GET auth-repository
Get a list of users. Some filter must be specified, if not it will return an empty list. See standard GET list
GET auth-repository/:id
Get an user by its :id. If :id exists in more than one data source, only the first will be returned. See standard GET by id
GET auth-repository/metadata
See standard GET metadata Get metadata
POST auth-repository
Not allowed.
PUT auth-repository
Not allowed.
DELETE auth-repository
Not allowed.
Back-up¶
Manage backups of switch configurations.
GET backup
See standard GET list GET backup
GET backup/:id
See standard GET by id GET backup
GET backup/metadata
See standard GET metadata GET metadata
POST backup
See standard POST Standard POST
PUT backup/:id
See standard PUT Standard PUT
DELETE backup/:id
See standard DELETE Standard DELETE
Brand¶
Brand management. A brand identifies the manufacturer of a device.
GET Brand
See standard GET list See standard GET list GET brand
GET Brand/:id
See standard GET by id See standard GET by id GET brand
GET Brand/metadata
See standard GET metadata GET metadata
POST Brand
See standard POST Standard POST
PUT Brand/:id
See standard PUT Standard PUT
DELETE Brand/:id
See standard DELETE Standard DELETE
CMD
Management of commands associated to cron or template objects. Each command is a script that can be sent to switches.
GET cmd
See standard GET list GET list
GET cmd/:id
See standard GET by id GET by id
GET cmd/metadata
See standard GET metadata GET metadata
POST cmd
See standard POST Standard POST
PUT cmd/:id
See standard PUT Standard PUT
DELETE cmd/:id
See standard DELETE Standard DELETE
Config¶
Management of configuration parameters.
GET config
GET config/:id
id value must be one of this predefined list: | |
---|---|
- netdev
- db
- plugins
- snmptraps
- registryportal
- queue
See standard GET by id GET by id
GET config/metadata
POST cmd
See standard POST Standard POST
PUT cmd/:id
DELETE cmd/:id
Cron¶
GET Cron
See standard GET list GET list
GET Cron/:id
See standard GET by id GET by id
GET Cron/metadata
See standard GET metadata GET metadata
POST Cron
See standard POST Standard POST
PUT Cron/:id
See standard PUT Standard PUT
DELETE Cron/:id
See standard DELETE Standard DELETE
CronNetConf¶
GET Cronnetconf
See standard GET list GET list
GET Cronnetconf/:id
See standard GET by id GET by id
GET Cronnetconf/metadata
See standard GET metadata GET metadata
POST Cronnetconf
See standard POST Standard POST
PUT Cronnetconf/:id
See standard PUT Standard PUT
DELETE Cronnetconf/:id
See standard DELETE Standard DELETE
CronTarget¶
GET Crontarget
See standard GET list GET list
GET Crontarget/:id
See standard GET by id GET by id
GET Crontarget/metadata
See standard GET metadata GET metadata
POST Crontarget
See standard POST Standard POST
PUT Crontarget/:id
See standard PUT Standard PUT
DELETE Crontarget/:id
See standard DELETE Standard DELETE
Device¶
GET Device
See standard GET list GET list
GET Device/:id
See standard GET by id GET by id
GET Device/metadata
See standard GET metadata GET metadata
POST Device
See standard POST Standard POST
PUT Device/:id
See standard PUT Standard PUT
DELETE Device/:id
See standard DELETE Standard DELETE
Device Status¶
GET Device/:id
:id is expected to be the IP of one of the devices registered in DeviceUser
See standard GET by id GET by id
Device User¶
GET DeviceUser
See standard GET list GET list
GET DeviceUser/:id
See standard GET by id GET by id
GET DeviceUser/metadata
See standard GET metadata GET metadata
POST DeviceUser
See standard POST Standard POST
PUT DeviceUser/:id
See standard PUT Standard PUT
DELETE DeviceUser/:id
See standard DELETE Standard DELETE
Device User Viewer¶
GET DeviceUserViewer
See standard GET list GET list
GET DeviceUserViewer/:id
See standard GET by id GET by id
GET DeviceUserViewer/metadata
See standard GET metadata GET metadata
POST DeviceUserViewer
See standard POST Standard POST
PUT DeviceUserViewer/:id
See standard PUT Standard PUT
DELETE DeviceUserViewer/:id
See standard DELETE Standard DELETE
Filter¶
GET Filter
See standard GET list GET list
GET Filter/:id
See standard GET by id GET by id
GET Filter/metadata
See standard GET metadata GET metadata
POST Filter
See standard POST Standard POST
PUT Filter/:id
See standard PUT Standard PUT
DELETE Filter/:id
See standard DELETE Standard DELETE
Filter Categ¶
GET FilterCateg
See standard GET list GET list
GET FilterCateg/:id
See standard GET by id GET by id
GET FilterCateg/metadata
See standard GET metadata GET metadata
POST FilterCateg
See standard POST Standard POST
PUT FilterCateg/:id
See standard PUT Standard PUT
DELETE FilterCateg/:id
See standard DELETE Standard DELETE
Filter Group¶
Management of group elements. Each group object belongs to a GroupCateg
GET Group
See standard GET list GET list
GET Group/:id
See standard GET by id GET by id
GET Group/metadata
See standard GET metadata GET metadata
POST Group
See standard POST Standard POST
PUT Group/:id
See standard PUT Standard PUT
DELETE Group/:id
See standard DELETE Standard DELETE
GroupCateg¶
Management of groups. Each groupcateg has a set of Group objects.
GET GroupCateg
See standard GET list GET list
GET GroupCateg/:id
See standard GET by id GET by id
GET GroupCateg/metadata
See standard GET metadata GET metadata
POST GroupCateg
See standard POST Standard POST
PUT GroupCateg/:id
See standard PUT Standard PUT
DELETE GroupCateg/:id
See standard DELETE Standard DELETE
GuestUser¶
Guest users registry.
Log¶
GET Log
See standard GET list GET list
GET Log/:id
See standard GET by id GET by id
GET Log/metadata
See standard GET metadata GET metadata
POST Log
See standard POST Standard POST
PUT Log/:id
See standard PUT Standard PUT
DELETE Log/:id
See standard DELETE Standard DELETE
LogCron¶
GET LogCron
See standard GET list GET list
GET LogCron/:id
See standard GET by id GET by id
GET LogCron/metadata
See standard GET metadata GET metadata
POST LogCron
See standard POST Standard POST
PUT LogCron/:id
See standard PUT Standard PUT
DELETE LogCron/:id
See standard DELETE Standard DELETE
Model¶
GET Model
See standard GET list GET list
GET Model/:id
See standard GET by id GET by id
GET Model/metadata
See standard GET metadata GET metadata
POST Model
See standard POST Standard POST
PUT Model/:id
See standard PUT Standard PUT
DELETE Model/:id
See standard DELETE Standard DELETE
Network¶
GET Network
See standard GET list GET list
GET Network/:id
See standard GET by id GET by id
GET Network/metadata
See standard GET metadata GET metadata
POST Network
See standard POST Standard POST
PUT Network/:id
See standard PUT Standard PUT
DELETE Network/:id
See standard DELETE Standard DELETE
Notification¶
OTP¶
GET OTP
See standard GET list GET list
GET OTP/:id
See standard GET by id GET by id
GET OTP/metadata
See standard GET metadata GET metadata
POST OTP
See standard POST Standard POST
PUT OTP/:id
See standard PUT Standard PUT
DELETE OTP/:id
See standard DELETE Standard DELETE
Poleval¶
GET Poleval
Send a policy evaluation request with desired parameters.
Arguments
URL: Following parameters can be sent:
- userid: User name
- mac: MAC address of user device
- switch: Network device IP address
- port: Network device port
- portid: Network device port id
- switchmac: Network device MAC address
- ssid: Wifi SSID name
- ip: User device IP address
- Headers:
- X-Opennac-Username
- X-Opennac-API-Key
- User-Agent: where possible values are, depending on policy evaluation type:
- MAB
- 8021XUSER
- 8021XCERT
- 8021XHOST
- USER
- VPN
- IpMac
- IpSession
Body: none.
Response
Code | Description | Body |
---|---|---|
200 | Successful | {“vlan”:”…”,”secProfile”:”…”,”vsatitle”:”…”,”vsa”:”…”,”vlanid”:”…”,”policyid”:”…”,”policy_rulenum”:…,”policy_rulename”:”…”,”status”:x} |
401 | Failed | {“result”: “error”, “message”: “…”} |
- Example
curl --header "User-Agent: 8021XUSER" --header "X-Opennac-Username: admin" --header "X-Opennac-API-Key: 099afbb8-216a-11e8-85b3-6f6e2d6a6f72" http://127.0.0.1/api/poleval/userid/user1/switch/1.2.3.4/port/1/mac/00:00:00:00:00:01/portid/1
{"vlan":"0","secProfile":null,"vsatitle":null,"vsa":null,"vlanid":"0","policyid":"1","policy_rulenum":2,"policy_rulename":"Test","status":1}
POST Poleval
Not allowed.
PUT Poleval/:id
Not allowed.
DELETE Poleval/:id
Not allowed.
Plugin¶
GET Plugin
This call doesn’t accept queries, it always returns the same fixed list of plugin objects.
Policy¶
GET Policy
See standard GET list GET list
GET Policy/:id
See standard GET by id GET by id
GET Policy/metadata
See standard GET metadata GET metadata
POST Policy
See standard POST Standard POST
PUT Policy/:id
See standard PUT Standard PUT
DELETE Policy/:id
See standard DELETE Standard DELETE
Policy Plugin¶
GET PolicyPlugin
See standard GET list GET list
GET PolicyPlugin/:id
See standard GET by id GET by id
GET PolicyPlugin/metadata
See standard GET metadata GET metadata
POST PolicyPlugin
See standard POST Standard POST
PUT PolicyPlugin/:id
See standard PUT Standard PUT
DELETE PolicyPlugin/:id
See standard DELETE Standard DELETE
Queue¶
Queue Workers¶
Information about queue workers.
GET Queue/Workers
Get the number of configured queue workers.
- Arguments
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
Response:
Code | Description | Body |
---|---|---|
200 | Successful | A quoted number, example: “5” |
GET Queue/Workers/:id
Aliased to GET Queue Workers
GET Queue/Workers/metadata
Aliased to GET Queue Workers
POST Queue/Workers
Aliased to GET Queue Workers
PUT Queue/Workers/:id
Aliased to GET Queue Workers
DELETE Queue/Workers/:id
Aliased to GET Queue Workers
Queue Status¶
Information about queue status.
GET QueueStatus
Get the current queue status.
- Arguments
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
Response:
Code | Description | Body |
---|---|---|
200 | Successful | A JSON object representing status, example: |
Example:
{
"pending_jobs": 3,
"running_jobs": 1,
"available_workers": 0,
"configured_workers": "5",
"workers": []
}
GET QueueStatus/:id
Aliased to GET Queue Status
GET QueueStatus/metadata
Aliased to GET Queue Status
POST QueueStatus
Aliased to GET Queue Status
PUT QueueStatus/:id
Aliased to GET Queue Status
DELETE QueueStatus/:id
Aliased to GET Queue Status
Queue Stop¶
Stop running jobs.
GET Queue Stop
Stop all running jobs.
- Arguments
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Toke
Response:
Code | Description | Body |
---|---|---|
200 | Successful | A string containing the response of the stop script |
GET Queue Stop/:id
Aliased to GET Queue Stop
GET Queue Stop/metadata
Aliased to GET Queue Stop
POST Queue Stop
Aliased to GET Queue Stop
PUT Queue Stop/:id
Aliased to GET Queue Stop
DELETE Queue Stop/:id
Aliased to GET Queue Stop
Queue Radauth¶
Radius authentication.
GET Radauth
Authenticates a device and returns the assigned vlan.
- Arguments
- URL: none
- switch
- port
- mac
- portid
- userid (optional)
- Headers: X-Opennac-Username, X-Opennac-Toke
Response:
Code | Description | Body |
---|---|---|
200 | Successful | A JSON object, example: { “vlan”: “330”, “secProfile”: “1” } |
500 | Failure due to internal server error | A JSON object containing error info |
Example:
curl http://localhost/api/radauth/switch/192.168.104.245/port/1003/mac/00064F3E5C4E/portid/FastEthernet0_13
{"vlan": "330", "secProfile": "1"}
POST Radauth
Not allowed.
PUT radauth/:id
Not allowed.
DELETE radauth/:id
Not allowed.
Repository¶
GET Repository
See standard GET list GET list
GET Repository/:id
See standard GET by id GET by id
GET Repository/metadata
See standard GET metadata GET metadata
POST Repository
See standard POST Standard POST
PUT Repository/:id
See standard PUT Standard PUT
DELETE Repository/:id
See standard DELETE Standard DELETE
Repository/:id/user¶
Manage users in a given data source. The parameter :id identifies the data source.
GET Repository/:id/user
See standard GET list GET list
GET Repository/:id/user/:id
See standard GET by id GET by id
GET Repository/:id/user/metadata
See standard GET metadata GET metadata
POST Repository/:id/user
See standard POST Standard POST
PUT Repository/:id/user/:id
See standard PUT Standard PUT
DELETE Repository/:id/user/:id
See standard DELETE Standard DELETE
Repository Check¶
Check status of user data sources.
GET Repository Check
Not allowed
GET Repository Check/:id
Not allowed
GET Repository Check/metadata
Not allowed
POST Repository Check
Check status of one or more user data sources.
- Arguments:
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
- Body: a JSON list with data source ids.
- Response:
Code | Description | Body |
---|---|---|
200 | Successful | A JSON list with a status object for every failing check. Empty list if all checks were successful. |
500 | Failure due to internal server error |
Example:
- check two data sources, one of them is not ready
curl -X POST -d '["localdb","corporateldap"]' -H "X-Opennac-Username:admin" -H "X-Opennac-Token:02a79efc-4c57-11e3-9cbf-7a656e642d76"
'http://localhost/api/repository-check'
[
{
"name":"corporateldap",
"code":1,
"message":"0x51 (Can't contact LDAP server): ldap:\/\/192.168.104.253:389",
"time":1384346085
}
]
PUT Repository Check/:id
Not allowed.
DELETE Repository Check/:id
Not allowed.
Search LDAP¶
GET Search LDAP
See standard GET list GET list
GET Search LDAP/:id
See standard GET by id GET by id
GET Search LDAP/metadata
See standard GET metadata GET metadata
POST Search LDAP
See standard POST Standard POST
PUT Search LDAP/:id
See standard PUT Standard PUT
DELETE Search LDAP/:id
See standard DELETE Standard DELETE
Security Profile¶
GET Security Profile
See standard GET list GET list
GET Security Profile/:id
See standard GET by id GET by id
GET Security Profile/metadata
See standard GET metadata GET metadata
POST Security Profile
See standard POST Standard POST
PUT Security Profile/:id
See standard PUT Standard PUT
DELETE Security Profile/:id
See standard DELETE Standard DELETE
StatusUserDev¶
GET StatusUserDev
See standard GET list GET list
- Response Example:
[
{
"id":"73bff7ce-b5fa-11e5-a6f7-6f70656e6e61",
"mac":"00:0E:C6:F7:93:35",
"ip":"192.168.4.210",
"netdevip":"192.168.1.48",
"netdevport":"50002",
"netdevportid":"FastEthernet0\/2",
"uid":"john",
"uidraw":"john@mycompany.com",
"lastaccess":"2016-01-08T12:24:59+01:00",
"vlanid":"330",
"vlanname":"SERVICE",
"status":"2",
"statusmsg":"",
"policyid":"40",
"policy":"6",
"policyname":"Service policy",
"deviceuserid":"314",
"macVendor":"ASIX ELECTRONICS CORP ",
"trackid":"",
"source":"802.1x User>IP>LOGOUT"
}
]
GET StatusUserDev/:id
See standard GET by id GET by id
GET StatusUserDev/metadata
See standard GET metadata GET metadata
POST StatusUserDev
See standard POST Standard POST
PUT StatusUserDev/:id
See standard PUT Standard PUT
DELETE StatusUserDev/:id
See standard DELETE Standard DELETE
Target¶
GET Target
See standard GET list GET list
GET Target/:id
See standard GET by id GET by id
GET Target/metadata
See standard GET metadata GET metadata
POST Target
See standard POST Standard POST
PUT Target/:id
See standard PUT Standard PUT
DELETE Target/:id
See standard DELETE Standard DELETE
Template¶
GET Template
See standard GET list GET list
GET Template/:id
See standard GET by id GET by id
GET Template/metadata
See standard GET metadata GET metadata
POST Template
See standard POST Standard POST
PUT Template/:id
See standard PUT Standard PUT
DELETE Template/:id
See standard DELETE Standard DELETE
User LDAP¶
GET User LDAP
See standard GET list GET list
GET User LDAP/:id
Besides the standard GET by id, this service also accepts an URL with the format userldap/uid/:uid/source/:source, which has the same semantics of the standard call, but performing the lookup with both values :uid and :source.
GET User LDAP/metadata
See standard GET metadata GET metadata
POST User LDAP
See standard POST Standard POST
PUT User LDAP/:id
See standard PUT Standard PUT
DELETE User LDAP/:id
See standard DELETE Standard DELETE
VLAN¶
GET VLAN
See standard GET list GET list
GET VLAN/:id
See standard GET by id GET by id
GET VLAN/metadata
See standard GET metadata GET metadata
POST VLAN
See standard POST Standard POST
PUT VLAN/:id
See standard PUT Standard PUT
DELETE VLAN/:id
See standard DELETE Standard DELETE
Wiz Administrator¶
Manages the “Administrator info” form in the setup wizard.
GET Wiz Administrator
Gets current form contents as a JSON list with one object. Response example:
[
{
"userid":"admin",
"password":"openNAC",
"repeat_password":"openNAC",
"url":"opennac.local"
}
]
GET Wiz Administrator/:id
Aliased to GET wizadministrator
GET Wiz Administrator/metadata
See standard GET metadata GET metadata
POST Wiz Administrator
Submit form contents.
- Arguments:
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
- Body: a JSON object with fields:
- userid
- password
- repeat_password
- url
- Response:
Code | Description | Body |
---|---|---|
200 | Successful | Mimics response of GET wizadministrator<api_get_wiz_admin> |
500 | Failure due to internal server error |
PUT Wiz Administrator/:id
Not implemented.
DELETE Wiz Administrator/:id
Not implemented.
Wiz Quarantine¶
Manages the “Quarantine VLAN” form in the setup wizard.
GET Wiz Quarantine
Gets current form contents as a JSON list with one object. Response example:
[
{
"ip_gateway":"172.1.20.254",
"num":"320",
"network":"172.1.20.0\/24",
"dhcp":"172.1.20.100-172.1.20.200"
}
]
GET Wiz Quarantine/:id
Aliased to GET wizquarantine
GET Wiz Quarantine/metadata
See standard GET metadata GET metadata
POST Wiz Quarantine
Submit form contents.
- Arguments:
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
- Body: a JSON object with fields:
- ip_gateway
- num
- network
- dhcp
- Response:
Code | Description | Body |
---|---|---|
200 | Successful | Mimics response of GET wizquarantine |
500 | Failure due to internal server error |
PUT Wiz Quarantine/:id
Not implemented.
DELETE Wiz Quarantine/:id
Not implemented.
Wiz Registry¶
Manages the “Registry VLAN” form in the setup wizard.
GET Wiz Registry
Gets current form contents as a JSON list with one object. Response example:
[
{
"ip_gateway":"172.1.10.254",
"num":"310",
"network":"172.1.10.0\/24",
"dhcp":"172.1.10.100-172.1.10.200"
}
]
GET Wiz Registry/:id
Aliased to GET WizRegistry
GET Wiz Registry/metadata
See standard GET metadata GET metadata
POST Wiz Registry
Submit form contents.
- Arguments:
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
- Body: a JSON object with fields:
- ip_gateway
- num
- network
- dhcp
- Response:
Code | Description | Body |
---|---|---|
200 | Successful | Mimics response of GET WizRegistry |
500 | Failure due to internal server error |
PUT Wiz Registry/:id
Not implemented.
DELETE Wiz Registry/:id
Not implemented.
Wiz Switch¶
Manages the “Initial Switch” form in the setup wizard.
GET Wiz Switch
Gets current form contents as a JSON list with one object. Response example:
[
{
"ip":"192.168.1.254",
"snmp_read":"public",
"snmp_write":"private",
"brand":"1",
"model":"2",
"port":"1",
"user":"admin",
"password":"",
"enable":""
}
]
GET Wiz Switch/:id
Aliased to GET Wiz Switch
GET Wiz Switch/metadata
See standard GET metadata GET metadata
POST Wiz Switch
Submit form contents.
- Arguments:
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
- Body: a JSON object with fields:
- ip
- snmp_read
- snmp_write
- brand
- model
- port
- user
- password
- enable
- Response:
Code | Description | Body |
---|---|---|
200 | Successful | Mimics response of GET Wiz Switch |
500 | Failure due to internal server error |
PUT Wiz Switch/:id
Not implemented.
DELETE Wiz Switch/:id
Not implemented.
Wiz Users¶
Manages the “Service VLAN” form in the setup wizard.
GET Wiz Users
Gets current form contents as a JSON list with one object. Response example:
[
{
"ip":"192.168.4.15",
"num":"330",
"network":"192.168.4.0\/24",
"ip_gateway":"192.168.4.1",
"dns1":"8.8.8.8",
"dns2":"8.8.4.4",
"dhcp":"192.168.4.200-192.168.4.210"
}
]
GET Wiz Users/:id
Aliased to GET Wiz Users
GET Wiz Users/metadata
See standard GET metadata GET metadata
POST Wiz Users
Submit form contents.
- Arguments:
- URL: none
- Headers: X-Opennac-Username, X-Opennac-Token.
- Body: a JSON object with fields:
- ip
- num
- network
- ip_gateway
- dns1
- dns2
- dhcp
- Response:
Code | Description | Body |
---|---|---|
200 | Successful | Mimics response of GET Wiz Users |
500 | Failure due to internal server error |
PUT Wiz Users/:id
Not implemented.
DELETE Wiz Users/:id
Not implemented.