Child pages
  • Integrations
Skip to end of metadata
Go to start of metadata

Introduction

The Integrations endpoint allows you to define an integration which you can then use to import and export Open-AudIT data to an external system. At present the single supported Integration type is "nmis".

Integrations are a Professional and Enterprise feature.

Integrations are being introduced in Open-AudIT 3.1.0 with a view to expand on the concept as further development is made.

How Does it Work?

You can define an integration and use it to export Open-AudIT devices to NMIS. By default only devices with their nmis_manage attribute set tyo 'y' will be exported. This is completely customisable.

For a more detailed view, see OpenAudIT-NMIS Integration.

Integrations can be scheduled like other tasks. First define your Integration, then create the task and select integration from the type dropdown.

Creating an Integration

An integration entry can be created using the web interface if the current user logged in has a role that contains the integrations::create permission. Go to menu: Manage -> Integrations -> Create Integrations. Provide a name for the Integration, select an Org and provide your credentials. By default all devices with their nmis_manage attribute will be selected for the Integration. If you would like another selection of devices, click the Advanced button and select a different query to be used to select your device list. You can create a custom query the same as you do any other regular queries, see Queries.



Executing an Integration


After creating the integration entry you should be on that integrations entry details page. In the panel header on the upper right of the page is a group of buttons. The button that looks like an old fashioned "play" icon (a triangle) will execute this integration.

If you're on the Integrations list page, on the left side is a green triangle, the same icon as on the details page. Click that and the Integration will be executed.



You should shortly see the logs from the executing integration.

Your selected devices will be imported into NMIS, including their credentials. They will be assigned to the Open-AudIT group within NMIS. This is configurable on a per devices basis, see How to Bulk Edit device attributes for more information.


View Integrations Details

Go to menu: Manage-> Integrations -> List Integrations.
You will see a list of integrations. You can view an integration by clicking on the blue view icon. You can also edit or delete Integrations.


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: Admin -> Database -> List Tables, then clicking on the "integrations" table.

CREATE TABLE `integrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL DEFAULT '',
  `org_id` int(10) unsigned NOT NULL DEFAULT '1',
  `description` text NOT NULL,
  `type` varchar(45) NOT NULL DEFAULT 'nmis',
  `options` longtext NOT NULL,
  `last_run` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  `edited_by` varchar(200) NOT NULL DEFAULT '',
  `edited_date` datetime NOT NULL DEFAULT '2000-01-01 00:00:00',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

A typical entry looks as below.

         id: 1
       name: My Test Integration
     org_id: 1
description: Just Testing
       type: nmis
    options: {}
   last_run: 2019-06-01 10:10:10
  edited_by: system
edited_date: 2019-06-01 09:00:00

API / Web Access

You can access the /integrations collection using the normal Open-AudIT JSON based API. Just like any other collection. Please see the API documentation for further details.

Access is provided as part of a roles permissions. Applications is a standard resource and can have create, read, update and delete permissions.

The API routes below are usable from both a JSON Restful API and the web interface.

API Routes

Request Method

ID

Action

Resulting Function

Permission Required

URL Example

Notes

Example Response

GETn
collectionintegrations::read/integrationsReturns a list of integrations.
POSTn
createintegrations::create/integrationsInsert a new integrations entry.
GETy
readintegrations::read/integrations/{id}Returns an integrations details.
PATCHy
updateintegrations::update/integrations/{id}Update the details of an integrations entry.
DELETEy
deleteintegrations::delete/integrations/{id}Delete an integrations entry.

Web Application Routes


Request Method

ID

Action

Resulting Function

Permission Required

URL Example

Notes

GETncreatecreate_formintegrations::create/integrations/createDisplays a standard web form for submission to POST /integrations.
GETyupdateupdate_formintegrations::update/integrations/{id}/updateShow the attributes details with the option to update details using PATCH to /integrations/{id}