*(Under Review for V2)
Introduction
As we run Discoveries and collect device results we populate the list of networks. The Blessed Subnets feature uses this list of networks to only accept data from devices on those networks.
Creating a Network
To make another network go to menu: Manage -> Networks -> Create Network. Provide a name and an optional description.
IMPORTANT - The network name should be a slash subnet address like 192.168.1.0/24. No spaces between the slash and numbers. It should be a valid subnet address. This string is what is tested against when using Blessed Subnets.
View Network Details
Go to menu: Manage -> Networks -> List Networks.
Database Schema
The schema for the database is below. It can also be found in the application if the user has database::read permission by going to menu: Manage -> Database -> List, then clicking on the "networks" table.
CREATE TABLE `networks` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(200) NOT NULL DEFAULT '', `network` varchar(200) NOT NULL DEFAULT '', `org_id` int(10) unsigned NOT NULL DEFAULT '1', `description` text NOT NULL, `edited_by` varchar(200) NOT NULL DEFAULT '', `edited_date` datetime NOT NULL DEFAULT '2000-01-01 00:00:00', PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
Example Database Entry
Networks are stored in the database in the "networks" table. A typical entry will look as below.
id: 3 name: 192.168.1.0/24 network: 192.168.1.0/24 org_id: 1 description: Auto inserted local server subnet edited_by: Administrator edited_date: 2017-05-29 10:47:33
API / Web Access
You can access the /networks collection using the normal Open-AudIT JSON based API. Just like any other collection. Please see the API documentation for further details.
API Routes
Request Method | ID | Action | Resulting Function | URL Example | Notes | Example Response |
---|---|---|---|---|---|---|
GET | n | collection | /networks | Returns a list of networks. | networks_collection.json | |
GET | y | read | /networks/{id} | Returns a network's details. | networks_read.json | |
PATCH | y | update | /networks/{id} | Update an attribute of a networks entry. | networks_patch.json | |
POST | n | create | /networks | Insert a new networks entry. | networks_create.json | |
DELETE | y | delete | /networks/{id} | Delete a networks entry. | networks_delete.json |
Web Application Routes
Request Method | ID | Action | Resulting Function | URL Example | Notes |
---|---|---|---|---|---|
GET | n | create | create_form | /networks/create | Displays a standard web form for submission to POST /networks. |
GET | y | update | update_form | /networks/{id}/update | Show the networks details with the option to update attributes using PATCH to /networks/{id} |