*(Under Review for V2)
Introduction
The license endpoint allows you to track the number of licenses found on your devices..
How Does it Work?
Creating a Licenses Entry
A License entry can be created using the web interface if the current user logged in has a role that contains the licenses::create permission. Go to menu: Manage -> Licenses -> Create Licenses. Also can be created from the Licenses View, using the "Create" button.
To create an entry to track your licenses you have to provide a name, an organization, the number of licenses acquired and the name of the software. On the field "Match String" you have to provide the name of the software that you want to track, you can use the percent sign (%) as a wildcard in the match_string.
View License Details
Go to menu: Manage -> Licenses -> List Licenses.
You will see a list of Licenses. You can view a License by clicking on the blue view icon.
You can also edit or delete the licenses.
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 Database, then clicking on the "licenses" table.
CREATE TABLE `licenses` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(200) NOT NULL DEFAULT '', `org_id` int(10) unsigned NOT NULL DEFAULT '1', `org_descendants` enum('y','n') NOT NULL DEFAULT 'y', `purchase_count` int(10) unsigned NOT NULL DEFAULT '0', `used_count` int(10) unsigned NOT NULL DEFAULT '0', `description` text NOT NULL, `match_string` 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;
A typical entry looks as below.
id: 3 name: Microsoft Office 2013 Professional Plus org_id: 2 org_descendants: y purchase_count: 45 used_count: 0 description: Microsoft Office 2013 Professional Plus for Mgmt Staff match_string: %Microsoft Office 2013% edited_by: Administrator edited_date: 2017-01-21 08:57:30
API / Web Access
You can access the /summaries 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. Summaries 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. The Web application routes are specifically designed to be called from the web interface (a browser).
API Routes
Request Method | ID | Action | Resulting Function | Permission Required | URL Example | Notes | Example Response |
---|---|---|---|---|---|---|---|
POST | n | create | summaries::create | /summaries | Insert a new summaries entry. | ||
GET | y | read | summaries::read | /summaries/{id} | Returns a summaries details. | ||
PATCH | y | update | summaries::update | /summaries/{id} | Update an attribute of a summaries entry. | ||
DELETE | y | delete | summaries::delete | /summaries/{id} | Delete a summaries entry. | ||
GET | n | collection | summaries::read | /summaries | Returns a list of summaries. | ||
POST | n | import | import | summaries::create | /summaries/import | Import multiple connections using a CSV. | |
GET | y | execute | execute | summaries::read | /summaries/2/execute | Execute (run) a summary and show the result. |
Web Application Routes
Request Method | ID | Action | Resulting Function | Permission Required | URL Example | Notes |
---|---|---|---|---|---|---|
GET | n | create | create_form | summaries::create | /summaries/create | Displays a standard web form for submission to POST /summaries. |
GET | y | update | update_form | summaries::update | /summaries/{id}/update | Show the summaries details with the option to update attributes using PATCH to /summaries/{id} |
GET | n | import | import_form | summaries::create | /summaries/import | Displays a standard web form for submission to POST /summaries/import. |