Skip to content

Commit

Permalink
Add missing parameters in documentation (#133)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lifka authored and jesuslinares committed Jul 17, 2018
1 parent 40eb62f commit 3058fd3
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controllers/agents.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ var router = require('express').Router();
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [select] List of selected fields.
* @apiParam {String="active", "pending", "neverconnected", "disconnected"} [status] Filters by agent status. Use commas to enter multiple statuses.
* @apiParam {String} [older_than] Filters out disconnected agents for longer than specified. Time in seconds, '[n_days]d', '[n_hours]h', '[n_minutes]m' or '[n_seconds]s'. For never connected agents, uses the register date.
* @apiParam {String} [os.platform] Filters by OS platform.
* @apiParam {String} [os.version] Filters by OS version.
* @apiParam {String} [manager] Filters by manager hostname to which agents are connected.
* @apiParam {String} [version] Filters by agents version.
* @apiParam {String} [group] Filters by group of agents.
* @apiParam {String} [node] Filters by node name.
*
* @apiDescription Returns a list with the available agents.
*
Expand Down Expand Up @@ -200,6 +202,7 @@ router.get('/no_group', cache(), function (req, res) {
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [hash] Select algorithm to generate the sum.
*
* @apiDescription Returns the list of existing agent groups.
*
Expand Down Expand Up @@ -243,6 +246,8 @@ router.get('/groups', cache(), function(req, res) {
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [select] List of selected fields.
* @apiParam {String="active", "pending", "neverconnected", "disconnected"} [status] Filters by agent status.
*
* @apiDescription Returns the list of agents in a group.
*
Expand Down Expand Up @@ -454,6 +459,7 @@ router.get('/outdated', cache(), function(req, res) {
* @apiGroup Info
*
* @apiParam {String} agent_name Agent name.
* @apiParam {String} [select] List of selected fields.
*
* @apiDescription Returns various information from an agent called :agent_name.
*
Expand Down Expand Up @@ -491,6 +497,7 @@ router.get('/name/:agent_name', cache(), function(req, res) {
* @apiGroup Info
*
* @apiParam {Number} agent_id Agent ID.
* @apiParam {String} [select] List of selected fields.
*
* @apiDescription Returns various information from an agent.
*
Expand Down
1 change: 1 addition & 0 deletions controllers/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ router.get('/node', cache(), function (req, res) {
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [select] List of selected fields.
* @apiParam {String} [type] Filters by node type.
* *
* @apiDescription Returns the nodes info
*
Expand Down
18 changes: 18 additions & 0 deletions controllers/experimental.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ var router = require('express').Router();
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [vendor] Filters by vendor.
* @apiParam {String} [name] Filters by name.
* @apiParam {String} [architecture] Filters by architecture.
* @apiParam {String} [format] Filters by format.
* @apiParam {String} [select] List of selected fields.
*
* @apiDescription Returns the agent's packages info
*
Expand Down Expand Up @@ -82,6 +87,12 @@ router.get('/syscollector/packages', function (req, res) {
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [select] List of selected fields.
* @apiParam {String} [os_name] Filters by os_name.
* @apiParam {String} [architecture] Filters by architecture.
* @apiParam {String} [os_version] Filters by os_version.
* @apiParam {String} [version] Filters by version.
* @apiParam {String} [release] Filters by release.
*
* @apiDescription Returns the agent's os info
*
Expand Down Expand Up @@ -146,6 +157,13 @@ router.get('/syscollector/os', function (req, res) {
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [select] List of selected fields.
* @apiParam {String} [ram_free] Filters by ram_free.
* @apiParam {String} [ram_total] Filters by ram_total.
* @apiParam {String} [cpu_cores] Filters by cpu_cores.
* @apiParam {String} [cpu_mhz] Filters by cpu_mhz.
* @apiParam {String} [cpu_name] Filters by cpu_name.
* @apiParam {String} [board_serial] Filters by board_serial.
*
* @apiDescription Returns the agent's hardware info
*
Expand Down
1 change: 1 addition & 0 deletions controllers/rootcheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ var router = require('express').Router();
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [status] Filters by status.
*
* @apiDescription Returns the rootcheck database of an agent.
*
Expand Down
1 change: 1 addition & 0 deletions controllers/rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var router = require('express').Router();
* @apiParam {String} [path] Filters the rules by path.
* @apiParam {String} [file] Filters the rules by file name.
* @apiParam {String} [pci] Filters the rules by pci requirement.
* @apiParam {String} [gdpr] Filters the rules by gdpr.
*
* @apiDescription Returns all rules.
*
Expand Down
8 changes: 8 additions & 0 deletions controllers/syscollector.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ var router = require('express').Router();
* @apiGroup OS
*
* @apiParam {Number} agent_id Agent ID.
* @apiParam {String} [select] List of selected fields.
*
* @apiDescription Returns the agent's OS info
*
Expand Down Expand Up @@ -52,6 +53,7 @@ router.get('/:agent_id/os', function(req, res) {
* @apiGroup Hardware
*
* @apiParam {Number} agent_id Agent ID.
* @apiParam {String} [select] List of selected fields.
*
* @apiDescription Returns the agent's hardware info
*
Expand Down Expand Up @@ -93,6 +95,12 @@ router.get('/:agent_id/hardware', function(req, res) {
* @apiParam {Number} [limit=500] Maximum number of elements to return.
* @apiParam {String} [sort] Sorts the collection by a field or fields (separated by comma). Use +/- at the beginning to list in ascending or descending order.
* @apiParam {String} [search] Looks for elements with the specified string.
* @apiParam {String} [select] List of selected fields.
* @apiParam {String} [vendor] Filters by vendor.
* @apiParam {String} [name] Filters by name.
* @apiParam {String} [architecture] Filters by architecture.
* @apiParam {String} [format] Filters by format.
* @apiParam {String} [version] Filters by version.
*
* @apiDescription Returns the agent's packages info
*
Expand Down

0 comments on commit 3058fd3

Please sign in to comment.