Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
themeEclipse
languagetext
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
themeEclipse
languagetext
         id: 39
    8 org_id: 1
       name: AD ConsumedControllers
 IP Addresses category: Network Server
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.ip IS NOT NULL AND ip.ip != '127.000.000.001' AND ip.ip != '' AND ip.ip != '0.0.0.0' AND ip.ip != '000.000.000.000' AND ip.version = '4' GROUP BY ip.id, ip.ip ORDER BY ip.ip link: expose: y domain_role LIKE '%Domain Controller' AND system.status = 'production'
       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
POSTn createqueries::create/queriesInsert a new query entry.queries_create.json
GETy readqueries::read/queries/{id}Returns a query details.queries_read.json
PATCHy updatequeries::update/queries/{id}Update an attribute of a query entry.queries_update.json
DELETEy deletequeries::delete/queries/{id}Delete a query entry.queries_delete.json
GETn collectionqueries::read/queriesReturns a list of queries.queries_collection.json
GETyexecuteexecutequeries::read/queries/{id}/executeExecute (run) a query and show the resultresults.queries_execute.json

summary

...