Versions Compared

Key

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

...

You will see a list of scripts. You can view a script by clicking on the blue view icon. You can also edit or delete your script.


Database Schema

The database schema

...

can

...

be found in the application

...

is the user has database::read permission by going to menu: Admin -> Database -> List Tables, then clicking on the

...

Code Block
languagetext
themeEclipse
CREATE TABLE `scripts` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL DEFAULT '',
  `org_id` int(10) unsigned NOT NULL DEFAULT '1',
  `options` text NOT NULL,
  `description` text NOT NULL,
  `based_on` varchar(200) NOT NULL DEFAULT '',
  `hash` varchar(250) NOT NULL DEFAULT '',
  `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=8 DEFAULT CHARSET=utf8;

Example Database Entry

Scripts are stored in the database in the "scripts" table. A typical entry will look as below.

Code Block
languagetext
themeEclipse
         id: 1
       name: audit_aix.sh
     org_id: 1
    options: {"submit_online":"y","create_file":"n","url":"http:\/\/localhost\/open-audit\/index.php\/input\/devices","debugging":1}
description: The default audit AIX config.
   based_on: audit_aix.sh
       hash: 
  edited_by: system
edited_date: 2000-01-01 00:00:00

...

details button for the table.


API / Web Access

You can access the

...

collection using the normal Open-AudIT JSON based API. Just like any other collection. Please

...

see The Open-AudIT API documentation for further details.

API Routes

...


...

Web Application Routes

Request MethodIDActionResulting FunctionURL ExampleNotes
GETncreatecreate_form/scripts/createDisplays a standard web form for submission to POST /scripts.
GETyupdateupdate_form/scripts/{id}/updateShow the script details with the option to update attributes using PATCH to /scripts/{id}
GETydownloaddownload/scripts/{id}/downloadDownload a complete audit script based on the script entry.

Default Items

Shipped are a set of default items. These can be found by going to menu: Help → Defaults → Scripts.