...
Code Block | ||||
---|---|---|---|---|
| ||||
Create Table: CREATE TABLE `queries` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `org_id` int(10) unsigned NOT NULL DEFAULT '1', `name` varchar(200) NOT NULL DEFAULT '', `category` enum('Change','Device','Hardware','Network','Other','Server','Software','User','') NOT NULL DEFAULT '', `description` text NOT NULL, `sql` text NOT NULL, `link` text NOT NULL, `expose` enum('y','n') NOT NULL DEFAULT 'y', `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=40 DEFAULT CHARSET=utf8; |
...
Code Block | ||||
---|---|---|---|---|
| ||||
id: 39 8 org_id: 1 name: AD Controllers Consumed IP Addresses category: NetworkServer description: The ip addresses used by a group. Active Directory Domain Controllers sql: SELECT system.id AS `system.id`, system.icon AS `system.icon`, system.type AS `system.type`, system.name AS `system.name`, system.domain AS `system.domain`, system.ip AS `system.ip`, system.description AS `system.description`, system.os_family AS `system.os_family`, system.descriptionstatus AS `system.description`, ip.ip as `ip.ip` status` FROM ipsystem LEFT JOIN systemwindows ON (system.id = ipwindows.system_id AND ipwindows.current = 'y') WHERE @filter AND ipwindows.ipdomain_role IS NOT NULL AND ip.ip != '127.000.000.001' AND ip.ip != ''LIKE '%Domain Controller' AND ipsystem.ipstatus != '0.0.0.0production' AND ip.ip != '000.000.000.000' AND ip.version = '4'link: GROUP BY ip.id, ip.ip ORDER BY ip.ip link: expose: y edited_by: system edited_date: 2000-01-01 00:00:00 |
API / Web Access
You can access the /queries collection using the normal Open-AudIT JSON based API. Just like any other collection. Please see the API documentation for further details.
...
Request Method | ID | Action | Resulting Function | Permission Required | URL Example | Notes | Example Response |
---|---|---|---|---|---|---|---|
POST | n | create | queries::create | /queries | Insert a new query entry. | queries_create.json | |
GET | y | read | queries::read | /queries/{id} | Returns a query details. | queries_read.json | |
PATCH | y | update | queries::update | /queries/{id} | Update an attribute of a query entry. | queries_update.json | |
DELETE | y | delete | queries::delete | /queries/{id} | Delete a query entry. | queries_delete.json | |
GET | n | collection | queries::read | /queries | Returns a list of queries. | queries_collection.json | |
GET | y | execute | execute | queries::read | /queries/{id}/execute | Execute (run) a query and show the resultresults. | queries_execute.json |
summary
...