Download OpenAPI specification:Download
For information on using the API, please refer to our guide on Using the API.
This method returns a list of organization accounts that the provided user is a member of.
format required | string Value: "json" The output format of the response. |
user_id required | integer The User ID that belongs under the organization(s). |
[- {
- "id": 2,
- "role": "Administrator",
- "name": "The A Team",
- "status": 1
}
]
This method allows you to retrieve a detailed change report for your organization.
format required | string Enum: "csv" "json" The output format of the response. |
weeks | integer Default: 1 The time span, in weeks, from which to retrieve changes from now. |
environment_id | integer Example: environment_id=1 The environment to retrieve changes for. |
node_group_id | integer Example: node_group_id=1 The node group to retrieve changes for |
node_id | int Example: node_id=1 The node to retrieve changes for |
date_from | date Example: date_from=2012-01-13 Start date to retrieve changes (ISO 8601 format) |
date_to | date Example: date_to=2012-01-13 End date to retrieve changes (ISO 8601 format) |
show_ignored | bool Default: false Whether or not to include ignored items. |
limit | integer Default: 4000 The number of entries to return. If used with 'page', the number of entries to return per page. |
page | integer Default: 0 Allows pagination of a report, with ‘limit’ controlling the number of records per page. |
{- "diff_counts": [
- {
- "updated_at": "2016-06-29",
- "status": "modified",
- "count": 2
}, - {
- "updated_at": "2016-06-28",
- "status": "added",
- "count": 1
}, - {
- "updated_at": "2016-06-28",
- "status": "removed",
- "count": 1
}
], - "diff_items": [
- {
- "id": 1,
- "node_id": 1,
- "node_name": "Node",
- "node_environment_id": "1",
- "updated_at": "2016-06-29 15:25:19.703671",
- "epoch": "1467213919.70367",
- "old_attrs": {
- "description": "Rebuild Hardware Database",
- "systemd_type": "service",
- "state": "exited"
}, - "new_attrs": {
- "description": "Rebuild Hardware Database",
- "systemd_type": "service",
- "state": "dead"
}, - "new_scan_id": "4",
- "old_scan_id": "3",
- "status": "modified",
- "path": "{services,systemd}",
- "name": "systemd-hwdb-update",
- "type": "services"
}, - {
- "id": "2",
- "node_id": "1",
- "node_name": "Node",
- "node_environment_id": "1",
- "updated_at": "2016-06-29 15:25:19.703671",
- "epoch": "1467213919.70367",
- "old_attrs": {
- "epoch_sec": "1467152770",
- "value": "Tue, 28 Jun 2016 22:26:10 UTC"
}, - "new_attrs": {
- "epoch_sec": "1467213860",
- "value": "Wed, 29 Jun 2016 15:24:20 UTC"
}, - "old_scan_id": "3",
- "new_scan_id": "4",
- "status": "modified",
- "path": "{inventory,facts}",
- "name": "boot_time",
- "type": "inventory"
}
]
}
This method allows you to receive a CSV report of changes aggregated by node. Each node with changes has an individual entry in the CSV, with fields summarizing the old and new values of its attributes.
format required | string Value: "csv" The output format of the response. |
environment_id | integer Example: environment_id=1 The environment to retrieve changes for. |
node_group_id | integer Example: node_group_id=2 The node group to retrieve changes for. |
node_id | integer Example: node_id=3 The node to retrieve changes for. |
date_from | datetime Default: "1 week ago" Example: date_from=2014-01-01 Start date to retrieve changes (ISO 8601 format). |
date_to | datetime Default: "now" Example: date_to=2014-03-31 End date to retrieve changes (ISO 8601 format). |
show_ignored | boolean Default: false Example: show_ignored=true Whether or not to include ignored items. |
limit | integer Default: 4000 Example: limit=4000 The number of change records to return on each call. |
page | integer Default: 0 Example: page=1 Allows pagination of a report, with ‘limit’ controlling the number of records per page and is zero indexed. |
"ID","Node","Old_Summary","New_Summary" "1","node02","[{""id"":1,""name"":""agent_version"",...}]","[...]" "2","node04","[{""id"":2,""name"":""agent_version"",...}]","[...]"
This method allows you to retrieve a list of change requests for your organization. For data to exist, you must have established a ServiceNow Integration.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "external_id": "46e9b4afa9fe198101w9e122b85f442",
- "short_description": "Roll back Windows SP2 patch",
- "planned_start_at": "2015-09-01T18:00:00-07:00",
- "planned_end_at": "2015-09-01T23:00:00-07:00",
- "started_at": "2015-09-01T09:17:01-07:00",
- "ended_at": "2015-09-01T13:17:04-07:00",
- "data": { },
}
]
This method returns details of the change request specified by the change request ID in the URL. The data returned for this change request record is retrieved from ServiceNow records.
format required | string Value: "json" The output format of the response. |
change_request_id required | integer The ID of the change request. |
{- "id": 1,
- "external_id": "46e9b4afa9fe198101w9e122b85f442",
- "short_description": "Roll back Windows SP2 patch",
- "planned_start_at": "2015-09-01T18:00:00-07:00",
- "planned_end_at": "2015-09-01T23:00:00-07:00",
- "started_at": "2015-09-01T09:17:01-07:00",
- "ended_at": "2015-09-01T13:17:04-07:00",
- "data": { },
}
This method returns a list of the latest CIS benchmark results for your organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "benchmark_id": "xccdf_org.cisecurity.benchmarks_benchmark_1.4.0.1_CIS_Red_Hat_Enterprise_Linux_6_Benchmark",
- "benchmark_title": "CIS Red Hat Enterprise Linux 6 Benchmark",
- "cis_benchmark_id": 5,
- "node_id": 109,
- "node_name": "QA ESXi Ubuntu 14.04 (2.11.0 RC7 - a)",
- "policy_id": 85,
- "policy_title": "Level 1",
- "result": "failure",
- "vuln_ref": "xccdf_org.cisecurity.benchmarks_rule_6.1.6_Set_UserGroup_Owner_and_Permission_on_etccron.daily"
}
]
This method returns CIS benchmark results, filtered by a particular CIS Benchmark determined by the cis_benchmark_id.
format required | string Value: "json" The output format of the response. |
cis_benchmark_id required | integer The ID of the CIS Benchmark. |
environment_id | integer Filter results by nodes in the environment specified by this Environment ID. |
node_group_id | integer Filter results by nodes in the node group specified by this Node Group ID. |
node_id | integer Filter results for the node specified by the Node ID. |
timespan | integer Limit results to only include those that occurred within this number of weeks back from today. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
{- "specific": false,
- "benchmark": {
- "benchmark_id": "xccdf_org.cisecurity.benchmarks_benchmark_1.4.0.1_CIS_Red_Hat_Enterprise_Linux_6_Benchmark",
- "benchmark_title": "CIS Red Hat Enterprise Linux 6 Benchmark",
- "benchmark_version": "1.4.0.1",
- "created_at": "2016-03-29T13:52:13-07:00",
- "docs": [ ],
- "id": 1,
- "oval_text_file_id": 2,
- "policy_id": 85,
- "policy_version_id": 2,
- "profile_id": "xccdf_org.cisecurity.benchmarks_profile_Level_1",
- "profile_index": 0,
- "profile_title": "Level 1",
- "results": [
- {
- "row_id": 741124,
- "rule_id": "xccdf_org.cisecurity.benchmarks_rule_1.1.1_Create_Separate_Partition_for_tmp",
- "node_id": 109,
- "node_name": "QA ESXi Ubuntu 14.04 (2.11.0 RC7 - a)",
- "result": "failure",
- "created_at": "2016-06-10T22:21:01+00:00"
}
], - "status": 1,
- "updated_at": "2016-03-29T13:52:13-07:00",
- "xccdf_text_file_id": 4
}
}
This method returns active CIS benchmarks. Active benchmarks are those that are the most recent and have not been superseded.
format required | string Value: "json" The output format of the response. |
active_only | boolean Default: true Set this to |
[- {
- "benchmark_id": "xccdf_org.cisecurity.benchmarks_benchmark_1.4.0.1_CIS_Red_Hat_Enterprise_Linux_6_Benchmark",
- "benchmark_title": "CIS Red Hat Enterprise Linux 6 Benchmark",
- "benchmark_version": "1.4.0.1",
- "profiles": [
- {
- "row_id": 741124,
- "profile_id": "xccdf_org.cisecurity.benchmarks_profile_Level_1",
- "profile_title": "Level 1"
}
]
}
]
This method returns a summary of all the CIS benchmark results that are active for the specified time period.
format required | string Value: "json" The output format of the response. |
timespan | integer Limit results to only include those that occurred within this number of weeks back from today. |
[- {
- "benchmark_id": "xccdf_org.cisecurity.benchmarks_benchmark_1.4.0.1_CIS_Red_Hat_Enterprise_Linux_6_Benchmark",
- "profile_id": "xccdf_org.cisecurity.benchmarks_profile_Level_1",
- "benchmark_title": "CIS Red Hat Enterprise Linux 6 Benchmark",
- "profile_title": "Level 1",
- "benchmark_version": "1.4.0.1",
- "success": "failure",
- "failure": "failure",
- "timeout": "failure",
- "error": "failure",
- "ignored": "failure",
- "total": "failure"
}
]
This method returns the CIS benchmark results that are active for the specified node group, environment or node id. Note that you must provide exactly one of either environment_id
, node_group_id
or node_id
. Combinations are not allowed.
format required | string Enum: "csv" "json" The output format of the response. |
cis_benchmark_id required | integer The ID of the CIS Benchmark. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
environment_id | integer Filter results by nodes in the environment specified by this Environment ID. |
node_group_id | integer Filter results by nodes in the node group specified by this Node Group ID. |
node_id | integer Filter results for the node specified by the Node ID. |
date_from | string Filter to only show results after the given timestamp. If omitted, all results back to the first will be included. |
date_to | string Filter to only show results before the given timestamp. If omitted, results will be given up to the present time. |
[- {
- "node_id": 109,
- "benchmark_id": "xccdf_org.cisecurity.benchmarks_benchmark_1.4.0.1_CIS_Red_Hat_Enterprise_Linux_6_Benchmark",
- "profile_id": "xccdf_org.cisecurity.benchmarks_profile_Level_1",
- "rule_id": "xccdf_org.cisecurity.benchmarks_rule_1.1.1_Create_Separate_Partition_for_tmp",
- "result": "failure",
- "created_at": "2016-03-29T13:52:13-07:00"
}
]
This method returns a list of CIS benchmark rules that correspond to a given benchmark ID.
format required | string Value: "json" The output format of the response. |
benchmark_id required | string Example: benchmark_id=xccdf_org.cisecurity.benchmarks_rule_1.1.1_L1_Set_Enforce_password_history_to_24_or_more_passwords The Benchmark ID to retrieve rules for. |
[- {
- "id": "xccdf_org.cisecurity.benchmarks_rule_1.1.1_L1_Set_Enforce_password_history_to_24_or_more_passwords",
- "name": "1.1.1 - (L1) Set 'Enforce password history' to '24 or more password(s)'",
- "description": "This policy setting determines the number of renewed, unique passwords that have to be associated with a user account before you can reuse an old password. The value for this policy setting must be between 0 and 24 passwords. The default value for Windows Vista is 0 passwords, but the default setting in a domain is 24 passwords. To maintain the effectiveness of this policy setting, use the Minimum password age setting to prevent users from repeatedly changing their password. The recommended state for this setting is: 24 or more password(s).",
- "rationale": "The longer a user uses the same password, the greater the chance that an attacker can determine the password through brute force attacks. Also, any accounts that may have been compromised will remain exploitable for as long as the password is left unchanged. If password changes are required but password reuse is not prevented, or if users continually reuse a small number of passwords, the effectiveness of a good password policy is greatly reduced.If you specify a low number for this policy setting, users will be able to use the same small number of passwords repeatedly. If you do not also configure the Minimum password age setting, users might repeatedly change their passwords until they can reuse their original password.",
- "fix": "To implement the recommended configuration state, set the following Group Policy setting to 24 or more password(s): Computer Configuration\\Policies\\Windows Settings\\Security Settings\\Account Policies\\Password Policy\\Enforce password history\n Impact:\n\n The major impact of this configuration is that users must create a new password every time they are required to change their old one. If users are required to change their passwords to new unique values, there is an increased risk of users who write their passwords somewhere so that they do not forget them. Another risk is that users may create passwords that change incrementally (for example, password01, password02, and so on) to facilitate memorization but make them easier to guess. Also, an excessively low value for the Minimum password age setting will likely increase administrative overhead, because users who forget their passwords might ask the help desk to reset them frequently."
}
]
This method returns a list of connection managers within the organization.
format required | string Value: "json" The output format of the response. |
[- {
- "id": 1,
- "hostname": "host-name",
- "last_contact": "2015-03-16T22:19:53-07:00",
- "advertised_addrs": [
- "10.0.0.1",
- "2601:9:abba:fa0:82e6:6eff:fe04:d72a",
- "2601:9:bad0:fa0:beef:421e:40cb:5e28"
]
}
]
This method returns a list of connection manager groups within the organization.
format required | string Value: "json" The output format of the response. |
[- {
- "id": 1,
- "name": "Windows Connection Managers",
- "organisation_id": 2,
- "status": 1,
- "last_contact": "2015-03-16T22:19:53-07:00",
- "connection_managers": [
- {
- "id": 1,
- "hostname": "host-name",
- "last_contact": "2015-03-16T22:19:53-07:00",
- "advertised_addrs": [
- "10.0.0.1",
- "2601:9:abba:fa0:82e6:6eff:fe04:d72a",
- "2601:9:bad0:fa0:beef:421e:40cb:5e28"
]
}
]
}
]
This method creates a new connection manager group and returns its ID, name, and the API key used for registering connection managers in the newly created group.
format required | string Value: "json" The output format of the response. |
name required | string The desired name of the connection manager group to be created |
{- "id": 1,
- "name": "Windows Connection Managers",
- "api_key": "12345667890125018190284sixtyfourcharacterlongapikey1259181721234"
}
This method returns details of the connection manager group specified by the ID given in the URL.
format required | string Value: "json" The output format of the response. |
connection_manager_group_id required | integer The ID of the connection manager group. |
{- "created_at": "2016-04-13T11:27:09-07:00",
- "id": 1,
- "name": "Windows Connection Managers",
- "organisation_id": 2,
- "ssh_public_key": "ssh-rsa AAAA....xyz guardian",
- "status": 1,
- "updated_at": "2017-03-16T22:19:53-07:00"
}
This method returns a list of delayed jobs for the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
search | string The search query to use in the format |
[- {
- "id": 1,
- "priority": 22,
- "attempts": 3,
- "handler": "generate_report",
- "run_at": "2012-10-30T16:16:52-07:00",
- "created_at": "2012-10-30T16:16:52-07:00",
- "updated_at": "2012-10-30T16:16:57-07:00",
- "last_error": "Appliance not ready",
- "url": "/api/v2/delayed_jobs/1.json"
}
]
This method returns details of the delayed job specified by a given ID.
format required | string Value: "json" The output format of the response. |
delayed_job_id required | integer The ID of the job. |
{- "id": 1,
- "priority": 22,
- "attempts": 3,
- "handler": "generate_report",
- "run_at": "2012-10-30T16:16:52-07:00",
- "created_at": "2012-10-30T16:16:52-07:00",
- "updated_at": "2012-10-30T16:16:57-07:00",
- "last_error": "Appliance not ready"
}
This method allows you to delete all delayed jobs or those matching a search query.
format required | string Value: "json" The output format of the response. |
search | string The search query to use in the format |
{- "error": "No authorization method found"
}
This method allows you to retrieve a list of node scan item diffs for your organization.
format required | string Enum: "csv" "json" The output format of the response. |
environment_id | integer Example: environment_id=1 The ID of the environment to retrieve diffs for. |
node_group_id | integer Example: node_group_id=1 The ID of the node group to retrieve diffs for. |
node_id | integer Example: node_id=1 The ID of the node to receive diffs for. |
date_from | datetime Example: date_from=2018-07-07 12:34:56 If specified, only retrieve difference data at or after this date, otherwise retrieve all data back to the first recorded difference. |
date_to | datetime Example: date_to=2018-07-07 12:34:56 If specified, only retrieve difference data at or before this date, otherwise retrieve all data up until the present time. |
include_ignored | boolean Default: false Whether or not to include ignored items. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 500 Number of results per page |
{- "diff_items_count": 2,
- "ignored_items_count": 1,
- "total_items_count": 3,
- "diff_items": [
- {
- "old_scan_id": 2,
- "new_scan_id": 3,
- "node_name": "Node",
- "node_id": 1,
- "environment_id": 1,
- "name": "zlib",
- "type": "packages",
- "path": "{packages,yum}",
- "created_at": "2016-06-28 22:30:40.263302",
- "old_attrs": {
- "attr1": "value1",
- "attr2": "value2"
}, - "new_attrs": {
- "attr1": "value1",
- "attr2": "value2"
}
}
], - "ignored_items": [
- {
- "old_scan_id": 2,
- "new_scan_id": 3,
- "node_name": "Node",
- "node_id": 1,
- "environment_id": 1,
- "name": "libpciaccess",
- "type": "packages",
- "path": "{packages,yum}",
- "created_at": "2016-06-28 22:30:40.263302",
- "old_attrs": {
- "attr1": "value1",
- "attr2": "value2"
}, - "new_attrs": {
- "attr1": "value1",
- "attr2": "value2"
}
}
]
}
This method returns a skeleton payload format that can subsequently be submitted to create a new environment.
format required | string Value: "json" The output format of the response. |
{- "name": null,
- "short_description": null,
- "node_rules": null
}
This method returns a list of environments created by the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "name": "Production",
- "short_description": "CryptoCurrencyPopularAtTheMoment Miner",
- "node_rules": "miner[0-9]+[.]example[.]com",
- "organisation_id": 123
}
]
This method allows you to create a new environment.
format required | string Value: "json" The output format of the response. |
object (EnvironmentWithoutId) |
{- "environment": {
- "name": "Production",
- "short_description": "CryptoCurrencyPopularAtTheMoment Miner",
- "node_rules": "miner[0-9]+[.]example[.]com"
}
}
{- "id": 123,
- "organisation_id": 2,
- "name": "Production",
- "short_description": "string",
- "description": "string",
- "updated_by": 0,
- "created_by": 0,
- "updated_at": null,
- "created_at": null,
- "node_rules": "string",
- "weight": 0
}
This method returns the details of the environment specified by the ID given in the URL.
format required | string Value: "json" The output format of the response. |
environment_id required | integer The ID of the environment. |
{- "id": 30,
- "organisation_id": 123,
- "name": "Production",
- "short_description": "ForEx Trading Production",
- "node_rules": "",
- "created_by": 1,
- "updated_by": 2,
- "created_at": null,
- "updated_at": null
}
This method allows you to update properties of an environment.
format required | string Value: "json" The output format of the response. |
environment_id required | integer The ID of the environment. |
object |
{- "environment": {
- "name": "New Environment Name"
}
}
{- "error": "No authorization method found"
}
This method allows you to delete an environment from your account.
format required | string Value: "json" The output format of the response. |
environment_id required | integer The ID of the environment. |
{- "error": "No authorization method found"
}
This method allows you to lookup the Environment ID by name.
format required | string Value: "json" The output format of the response. |
name required | string The name of the environment. |
{- "environment_id": 123
}
This method allows you to list all nodes within an environment.
format required | string Value: "json" The output format of the response. |
environment_id required | integer The ID of the environment. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 311,
- "name": "ugv1laptop",
- "description": "Unmanned Ground Vehicle 1 Laptop",
}
]
This method allows you to retrieve the last scheduled scan report for the environment (i.e. the data you get sent by email showing added/removed/changed counts).
format required | string Value: "json" The output format of the response. |
environment_id required | integer The ID of the environment. |
{- "date": "2014-04-15T00:08:02-07:00",
- "report": {
- "job_id": 27793663,
- "nodes": [
- {
- "node_id": 26,
- "node_name": "bluthcompanydirectory",
- "date_previous": "2014-04-14T07:06:02Z",
- "date_latest": "2014-04-15T07:06:04Z",
- "previous_scan_id": 15676,
- "latest_scan_id": 15847,
- "diff_hash": "1daf3bb1e751363825477cb5a0757b3a",
- "stats": {
- "summary": {
- "total": 611,
- "added": 0,
- "modified": 0,
- "removed": 0
}
}
}
]
}
}
This method returns a skeleton payload format that can subsequently be submitted to create a new event action.
format required | string Value: "json" The output format of the response. |
{- "id": 1,
- "name": "Send Email",
- "action_type": 2,
- "variables": {
- "integration": "1",
- "text": "{{ node }} failed scanning",
- "icon_type": "icon_emoji",
- "icon_url": "",
- "icon_emoji": ":bomb:"
}, - "event_view_id": 0
}
This method allows you to extract events from views, or using an ad hoc query.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "name": "Send Email",
- "status": "enabled",
- "type": "slack",
- "variables": {
- "integration": "1",
- "text": "{{ node }} failed scanning",
- "icon_type": "icon_emoji",
- "icon_url": "",
- "icon_emoji": ":bomb:"
}, - "view": "User Logins."
}
]
This method allows you to create a new event action.
format required | string Value: "json" The output format of the response. |
object |
{- "event_action": {
- "name": "Send Email",
- "type": "slack",
- "variables": {
- "integration": "1",
- "text": "{{ node }} failed scanning",
- "icon_type": "icon_emoji",
- "icon_url": "",
- "icon_emoji": ":bomb:"
}, - "view": "User Logins."
}
}
{- "id": 1,
- "name": "Send Email",
- "action_type": 2,
- "variables": {
- "integration": "1",
- "text": "{{ node }} failed scanning",
- "icon_type": "icon_emoji",
- "icon_url": "",
- "icon_emoji": ":bomb:"
}, - "event_view_id": 0,
- "updated_by": 178,
- "created_by": 178,
- "updated_at": "2012-10-30T16:16:57-07:00",
- "created_at": "2012-10-30T16:16:52-07:00"
}
This method returns the details of the event action specified by the ID given in the URL.
event_action_id required | integer The ID of the event action. |
format required | string Value: "json" The output format of the response. |
{- "id": 1,
- "name": "Send Email",
- "status": "enabled",
- "type": "slack",
- "variables": {
- "integration": "1",
- "text": "{{ node }} failed scanning",
- "icon_type": "icon_emoji",
- "icon_url": "",
- "icon_emoji": ":bomb:"
}, - "view": "User Logins."
}
This method allows you to update properties of an Event Action.
format required | string Value: "json" The output format of the response. |
event_action_id required | integer The ID of the event action. |
object |
{- "event_action": {
- "id": 1,
- "name": "Send Email",
- "type": "slack",
- "variables": {
- "integration": "1",
- "text": "{{ node }} failed scanning",
- "icon_type": "icon_emoji",
- "icon_url": "",
- "icon_emoji": ":bomb:"
}, - "view": "User Logins."
}
}
{- "error": "No authorization method found"
}
This method allows you to delete an event action from your account.
format required | string Value: "json" The output format of the response. |
event_action_id required | integer The ID of the event action. |
{- "error": "No authorization method found"
}
This method returns a skeleton payload format that can subsequently be submitted to create a new event view.
format required | string Value: "json" The output format of the response. |
{- "id": 1,
- "name": "User Logins",
- "query": "type=User Logged In",
- "view_type": 2
}
This method returns a list of the available event views.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "name": "User Logins",
- "query": "type=User Logged In",
- "view_type": 2
}
]
This method allows you to create a new event view. Note that you cannot create a Global
Event View.
format required | string Value: "json" The output format of the response. |
object |
{- "event_view": {
- "name": "User Logins",
- "query": "type=User Logged In",
- "view_type": 2
}
}
{- "id": 1,
- "name": "User Logins",
- "query": "type=User Logged In",
- "view_type": 2,
- "updated_by": 178,
- "created_by": 178,
- "updated_at": "2012-10-30T16:16:57-07:00",
- "created_at": "2012-10-30T16:16:52-07:00"
}
This method returns the details of the event view specified by the ID given in the URL.
event_view_id required | integer The ID of the event view. |
format required | string Value: "json" The output format of the response. |
{- "id": 1,
- "name": "User Logins",
- "query": "type=User Logged In",
- "view_type": 2
}
This method allows you to update properties of an Event View. Note that Global
Event Views cannot be updated.
format required | string Value: "json" The output format of the response. |
event_view_id required | integer The ID of the event view. |
object |
{- "event_view": {
- "id": 1,
- "name": "User Logins",
- "query": "type=User Logged In",
- "view_type": 2
}
}
{- "error": "No authorization method found"
}
This method allows you to delete an event view from your account. Note that Global
Event Views cannot be deleted.
format required | string Value: "json" The output format of the response. |
event_view_id required | integer The ID of the event view. |
{- "error": "No authorization method found"
}
This method allows you to extract events from views, or using an ad hoc query. You must specify either view_name
or query
.
format required | string Value: "json" The output format of the response. |
view_name | string Name of the event view you’d like to extract events from. (At least either |
query | string Query you’d like to use to extract events. (At least either |
date_from | datetime Start date to retrieve events from. |
date_to | datetime End date to retrieve events until. |
last_event_id | integer When making multiple requests you can ensure you do not retrieve the same event twice by specifying this value (request will only retrieve events with an event ID higher than this value). |
helper_variables | string Example: helper_variables=node_scan_url,node_id,success Comma delimited list of helper variables you would like included in the returned data. This can only be used with the |
string Example: email=me@example.com Results can be generated offline and then emailed on completion. If this option is used then | |
report_format | string Enum: "csv" "json" Example: report_format=csv When using the |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 500 Number of results per page |
[- {
- "id": 1,
- "type_id": 53,
- "environment_id": 2,
- "created_at": "2017-01-01 08:08:01\"",
- "variables": {
- "job_id": 1,
- "node": "LAMP-01",
- "node_id": 1,
- "scheduled": true,
- "status": "exception",
- "success": false,
- "var1": "string"
}
}
]
This method allows you to create an “External Event” within Guardian, containing custom information.
format required | string Value: "json" The output format of the response. |
user_id | integer Example: user_id=1 An ID representing a user within Guardian to associate with the event. |
node_id | integer Example: node_id=1 An ID representing a node within Guardian. |
ip_address | string Example: ip_address=1.2.4.5 An IP representing the device associated with the event. |
object |
{- "variables": {
- "type": "SSH Login",
- "customAttr1": "customValue1",
- "customAttr2": 2
}
}
{- "associated_id": 1,
- "associated_type": "string",
- "audit_id": 0,
- "auditable_id": 0,
- "auditable_type": "string",
- "created_at": "2016-07-07 12:34:56",
- "environment_id": 0,
- "id": 11854346,
- "metric_type_id": 1000024,
- "node_groups": "string",
- "organisation_id": 0,
- "source_system": "string",
- "user_id": 43,
- "variables": "{\"type\":\"ssh_login\"}"
}
This method allows you to extract event types (use to get event type names from type IDs returned by index).
format required | string Value: "json" The output format of the response. |
[- {
- "id": 153,
- "name": "Blueprint Created"
}
]
This method allows you to create new events that will display on the timeline.
format required | string Value: "json" The output format of the response. |
object |
{- "legacy_event": {
- "sub_categoery": "Build Process",
- "action_taken": "Started",
- "status": 0,
- "source": "ansible",
- "duration": 10,
- "extra": "git hash 123...",
}
}
{- "legacy_event": {
- "sub_categoery": "Build Process",
- "action_taken": "Started",
- "status": 0,
- "source": "ansible",
- "duration": 10,
- "extra": "git hash 123...",
}
}
This method returns details of the legacy event, specified by the ID given in the URL.
format required | string Value: "json" The output format of the response. |
event_id required | integer The ID of the legacy event. |
{- "organisation_id": 123,
- "sub_categoery": "build process",
- "action_taken": "started",
- "status": 0,
- "extra": "Process started successfully"
}
This method allows you to look up all Ignore items on a node group or individual node. You must specify either 'node_group_id' or 'node_id'.
format required | string Value: "json" The output format of the response. |
node_group_id | integer Example: node_group_id=1 If selecting ignores for a particular node group, the node group's ID. |
node_id | integer Example: node_id=2 If selecting ignores for a particular node, the node's ID. |
category | integer Default: 1 Enum: 1 3 1 for node group ignore list, 3 for node group diff ignore list. Only used with the 'node_group_id' parameter. |
{ }
This method allows you to create Ignore items for a node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer Creates an ignore item for an entire node group. |
category | integer Default: 1 Enum: 1 3
|
object |
{- "users": {
- "windows": {
- "guest": {
- "...": null
}
}
}
}
{- "ci_type": {
- "provider": {
- "ci": {
- "ignore": {
- "node_group_id": 0
}
}
}
}
}
This method allows you to retrieve a list of incidents for your organization. For data to exist, you must have established a ServiceNow Integration.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "external_id": "9c573169c611228700193229fff72400",
- "short_description": "Can't read email",
- "started_at": "2015-06-02T12:09:51-11:00",
- "ended_at": "2015-06-03T12:10:06-11:00",
}
]
This method returns details of the incident specified by the incident ID in the URL. The data returned for this incident record is retrieved from ServiceNow records.
format required | string Value: "json" The output format of the response. |
incident_id required | integer The ID of the incident. |
{- "id": 1,
- "external_id": "9c573169c611228700193229fff72400",
- "short_description": "Can't read email",
- "started_at": "2015-06-02T12:09:51-11:00",
- "ended_at": "2015-06-03T12:10:06-11:00",
}
This method returns a list of all integrations in an organization. The selected organization is determined by the API key and secret specified in the Authorization header.
format required | string Value: "json" The output format of the response. |
[- {
- "id": 45,
- "name": "X to Y Notification WebHook",
- "username": null,
- "status": 1,
- "channel": "",
- "icon_url": "/assets/icons/integration/webhook-bee0cd0e19a7397b4710d8667751f9a57a298f8b77015f1dbc8b3afb7bac20d5.png",
- "category_name": "WebHook",
- "category": 1,
- "config": { },
- "created_at": "FEB 10, 2023",
- "created_at_time": "02:07:58 +0000",
- "settings": { },
- "img_class": "webhook-icon"
}, - {
- "id": 44,
- "name": "Splunk Index Name",
- "username": "",
- "status": 1,
- "channel": "",
- "icon_url": "/assets/icons/integration/splunk-c443d47f4e652f0ed8f0441aaac0844e71884f99719aba2590406ad6676a2e67.png",
- "category_name": "Splunk",
- "category": 2,
- "config": { },
- "created_at": "FEB 10, 2023",
- "created_at_time": "02:03:50 +0000",
- "settings": {
- "period": ""
}, - "img_class": "splunk-icon"
}
]
This method deletes one or more integrations.
format required | string Value: "json" The output format of the response. |
ids | Array of arrays (ids) An array containing the IDs of the integrations to be deleted. |
{- "ids": [
- 1,
- 2,
- 3
]
}
{- "message": "1 item deleted"
}
This method creates one or more integrations.
format required | string Value: "json" The output format of the response. |
name | string |
category | integer |
settings | object (settings_ad) |
[- {
- "name": "Active Directory Integration",
- "category": 13,
- "settings": {
- "ldap_query": "query",
- "ldap_path": "LDAP://DC=your,DC=domain,DC=here",
- "connection_manager_group_id": 1
}
}
]
{ }
This method returns a list of all supported integration types and their associated IDs.
format required | string Value: "json" The output format of the response. |
[- {
- "name": "AWS",
- "id": 9,
- "imgClass": "aws-icon",
- "customName": true
}, - {
- "name": "Active Directory",
- "imgClass": "active-icon",
- "id": 13,
- "customName": true
}
]
This method returns a list of jobs for the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "organisation_id": 2,
- "source_id": 22,
- "source_name": "Cluster Node 1",
- "source_type": 11,
- "status": 2,
- "url": "/api/v2/jobs/1.json"
}
]
This method allows you to initiate and execute a new job. Depending on the type
a different type of job can be initiated.
format required | string Value: "json" The output format of the response. |
type required | integer The code of the type of job you would like to initiate.
| ||||||||||||||||||
type_id required | integer The ID of the resource associated with the
| ||||||||||||||||||
node_id | integer The ID of the node to execute a policy-based job against.
| ||||||||||||||||||
node_group_id | integer The ID of the node group to execute a policy-based job against.
|
{- "job_id": 1,
- "delayed_job": true
}
This method returns details of the job specified by a given ID.
format required | string Value: "json" The output format of the response. |
job_id required | integer The ID of the job. |
{- "created_at": "2012-10-30T16:16:52-07:00",
- "created_by": 178,
- "id": 1,
- "scheduled_job_id": 3,
- "source_id": 22,
- "source_name": "Cluster Node 1",
- "source_type": 11,
- "status": 2,
- "updated_at": "2012-10-30T16:16:57-07:00",
- "updated_by": 178
}
This methods allows you to list tasks under a given job. An optional ‘status’ parameter can be supplied to filter for tasks with a given status.
format required | string Value: "json" The output format of the response. |
job_id required | integer Example: 1 The ID of the job. |
status | string Enum: "pending" "processing" "success" "assigned" "failure" "offline" "cancelled" "timeout" "error" "exception" Example: status=success A Task's status can be one of the following values:
|
[- {
- "agent_name": "golang-agent-0",
- "connection_manager_id": 7,
- "created_at": "2012-10-30T16:16:52-07:00",
- "id": 1,
- "job_id": 2,
- "label": "string",
- "log": "string",
- "node_id": 23,
- "node_session_id": 452,
- "payload": {
- "process_definition": "generate_and_upload_blueprint",
- "fields": {
- "os": "Windows",
- "os_family": "2012",
- "node_id": 12,
- "scan_options": {
- "scan_ports": {
- "tcp": "1-1024",
- "udp": "1-1024"
}, - "template_vars": {
- "node_name": "Cluster Node1",
- "node_environment": "Default"
}
}
}
}, - "report": "[...]",
- "sequence": 1,
- "status": 99,
- "step_description": "Node Scan",
- "step_id": 0,
- "updated_at": "2012-10-30T16:16:57-07:00",
- "user_task_id": 0,
- "uuid": "53a1239d-845d-4b14-b434-1e3fg712bb15c"
}
]
This method returns a list of node groups registered to the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "organisation_id": 123,
- "name": "IIS",
- "description": "All IIS Servers",
- "node_rules": "^IIS",
}
]
This method allows you to create a new node group group.
format required | string Value: "json" The output format of the response. |
object |
{- "node_group": {
- "name": "IIS",
- "description": "All IIS Servers",
- "node_rules": "^IIS"
}
}
{- "organisation_id": 123,
- "name": "IIS",
- "description": "All IIS Servers",
- "node_rules": "^IIS"
}
This method returns details of the node group, specified by a given ID.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
{- "created_at": "2015-08-18T13:53:59-11:00",
- "description": "All IIS Servers",
- "diff_notify": false,
- "external_id": "string",
- "id": 1,
- "name": "IIS",
- "node_rules": "^IIS",
- "organisation_id": 123,
- "scan_options": {
- "scan_directory_options": [
- {
- "path": "/var/logs",
- "contents": false
}
], - "registry_keys": [
- "HKCU:\\a\\registry\\key"
], - "group_policy_objects": [
- "gpo1"
], - "powershell_queries": [
- {
- "description": "get machine's hostname",
- "key_name": "",
- "query": "hostname"
}
], - "scripts": [
- {
- "description": "another script",
- "script": "find . -name '*conf'"
}
], - "scan_ports": {
- "tcp": "1-1024",
- "udp": "1-1024"
}, - "scan_diff_excluded_text": [ ]
}, - "search_query": [
- {
- "type": "info",
- "typeQuery": "platform",
- "attr": "scanned_operating_system_family",
- "attrQuery": "Windows",
- "exact": true
}
], - "status": 1,
- "updated_at": "2016-05-25T03:53:28-11:00"
}
This method allows you to update attributes of a node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
object |
{- "node_group": {
- "description": "All IIS Servers",
- "name": "IIS",
- "node_rules": "^IIS",
- "search_query": [
- {
- "type": "info",
- "typeQuery": "platform",
- "attr": "scanned_operating_system_family",
- "attrQuery": "Windows",
- "exact": true
}
]
}
}
{- "error": "No authorization method found"
}
This method allows you to delete a node group from your account.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
{- "error": "No authorization method found"
}
This method allows you to lookup the Node Group ID by name.
format required | string Value: "json" The output format of the response. |
name required | string The name of the node group to search for. |
{- "node_group_id": 123
}
This method allows you to add a node to a given node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
node_id required | integer The node ID you want to remove from this node group. |
{- "created_at": "2013-12-18T14:48:31-08:00",
- "id": 34,
- "node_group_id": 1,
- "node_id": 45,
- "updated_at": "2013-12-18T14:48:31-08:00"
}
This method allows you to add nodes to the node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
node_ids required | Array of arrays A list of one or more node IDs to add to this node group.
e.g. |
[- {
- "created_at": "2013-12-18T14:48:31-08:00",
- "id": 34,
- "node_group_id": 1,
- "node_id": 45,
- "updated_at": "2013-12-18T14:48:31-08:00"
}
]
This method allows you to compare the nodes in the node group to each other.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
node_id | integer The id of the node you wish to use as the base. If none given it will select the first in the group. |
{- "node_group_id": 1,
- "nodes": [
- {
- "node_id": 45,
- "node_name": "prod01"
}
], - "totals": {
- "total": 358,
- "added": 0,
- "deleted": 0,
- "updated": 1,
- "type": "{\"packages\":{\"total\":358,\"added\":0,\"deleted\":0,\"updated\":1}}"
}
}
This method returns a list of nodes in the node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 311,
- "name": "ugv2laptop",
- "description": "Unmanned Ground Vehicle 1 Laptop",
}
]
This method allows you to remove a node from the node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
node_id required | integer The node ID you want to remove from this node group. |
{- "error": "No authorization method found"
}
This method allows you to add a policy version to the node group. Acceptable parameter combinations are:
policy_version_id
policy_id
and version
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
policy_version_id | integer The ID of the policy version you want to attach to this node group. |
policy_id | integer The ID of the policy you want to attach to this node group. |
version | integer The version number of the policy you want to attach to this node group. This parameter also accepts the string "latest" for the most recent version of the specified policy. |
{- "created_at": "2013-12-18T14:48:31-08:00",
- "id": 123,
- "node_group_id": 1,
- "policy_version_id": 17,
- "updated_at": "2013-12-18T14:48:31-08:00"
}
This method allows you to list all policy versions attached to this node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
[- {
- "id": 17,
- "name": "MySQL Config (latest)",
- "version": 33,
- "organisation_id": 2
}
]
This method allows you to remove a policy version assigned to the node group. Acceptable parameter combinations are:
policy_version_id
policy_id
and version
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
policy_version_id | integer The ID of the policy version you want to attach to this node group. |
policy_id | integer The ID of the policy you want to attach to this node group. |
version | integer The version number of the policy you want to attach to this node group. This parameter also accepts the string "latest" for the most recent version of the specified policy. |
{- "error": "No authorization method found"
}
This method allows you to view the current configuration for the node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
{- "ignore_items": {
- "ci_type": {
- "ci_subtype": {
- "ci": {
- "ignore": {
- "node_group_id": 3
}
}
}
}
}, - "scan_options": {
- "scan_directory_options": [
- {
- "path": "/var/logs",
- "contents": false
}
], - "registry_keys": [
- "HKCU:\\a\\registry\\key"
], - "group_policy_objects": [
- "gpo1"
], - "powershell_queries": [
- {
- "description": "get machine's hostname",
- "key_name": "",
- "query": "hostname"
}
], - "scripts": [
- {
- "description": "another script",
- "script": "find . -name '*conf'"
}
], - "scan_ports": {
- "tcp": "1-1024",
- "udp": "1-1024"
}, - "scan_diff_excluded_text": [ ]
}, - "policies": [ ]
}
This method allows you to update the scan options for a specified node group by its ID. This method accepts only one scan option key at a time for updating the scan options. The submitted request body is echoed back on successful application of the endpoint to please refer to the sample request body examples for examples of response bodies.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
option_name | string Enum: "connectivity" "database_schemas" "etcd_keys" "scan_directory_options" "scan_diff_excluded_text" "scan_nmap" "scan_sections" "registry_keys" "group_policy_objects" "sql_queries" "powershell_queries" "preprocessors" "scripts" "scan_ports" "web" "cis_ignore" Defines the scan option key that you will be setting. |
option_object_array | Array of arrays Array of objects or strings depending on the |
{- "option_name": "connectivity",
- "connectivity": [
- {
- "protocol": "TCP",
- "host": "8.8.8.8",
- "port": "22"
}
]
}
{- "option_name": "connectivity",
- "option_object_array": [ ]
}
This method allows you to trigger a scan of a node group by specifying the node group’s ID.
node_group_id required | integer The ID of the node group. |
{- "created_at": "2012-10-30T16:16:52-07:00",
- "created_by": 178,
- "id": 1,
- "scheduled_job_id": 3,
- "source_id": 22,
- "source_name": "Cluster Node 1",
- "source_type": 11,
- "status": 2,
- "updated_at": "2012-10-30T16:16:57-07:00",
- "updated_by": 178
}
This method allows you to add a user to be a member of a node group. Account level members must be added to a node group to be able to see and interact with nodes in that node group. For more information on Account level and Node Group level user access controls, please visit our guide on User Access.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
user_id required | integer The ID of the user you want to add to the node group. |
[- {
- "id": 22,
- "user_id": 123,
- "node_group_id": 42,
- "created_at": "2017-07-24T10:29:59.735-07:00",
- "updated_at": "2017-07-24T10:29:59.735-07:00"
}
]
This method allows you to list users assigned to a node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
[- {
- "email": "steve@example.com",
- "user_id": 123
}
]
This method allows you to unassign a user from a node group.
format required | string Value: "json" The output format of the response. |
node_group_id required | integer The ID of the node group. |
user_id | integer The ID of the user you want to unassign from the node group. |
{- "error": "No authorization method found"
}
This method allows you to retrieve a list of node scans.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node to retrieve scans for. |
latest | boolean Retrieve the latest node scan for the node. |
date_from | string The start date to query scans from. Must be used with the |
date_to | string The end date to query scans to. Must be used with the |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 9,
- "node_id": 3,
- "created_at": "2016-08-04T15:03:21-07:00",
- "updated_at": "2016-08-05T15:06:42-07:00",
- "scan_options": "\"scan_ports\":{\"tcp\":\"1-1024\",\"udp\":\"1-1024\"}",
}
]
This method allows you to view a node scan referenced by its ID in the request URL path. You may also reference this method from the Index method, as shown in the url key value of each node scan for a specified node.
format required | string Value: "json" The output format of the response. |
node_scan_id required | integer The ID of the node scan to show. |
{- "id": 9,
- "node_id": 3,
- "data": "{\"EnvVars\":{\"Linux\":{\"PATH\":{...}...}...}...}",
- "scan_options": "\"scan_ports\":{\"tcp\":\"1-1024\",\"udp\":\"1-1024\"}",
- "created_at": "2016-08-04T15:03:21-07:00",
- "updated_at": "2016-08-05T15:06:42-07:00",
- "task_id": 6,
- "associated_id": 0,
- "category": 0,
- "label": "Authorized change 2001",
- "tsv": "string"
}
This method allows you to compare the differences between that of the specified node_scan_id against another node scan specified by the source id. The differences shown between the two node scans are those of the most current node scan of the source node scan against the node_scan_id.
format required | string Value: "json" The output format of the response. |
node_scan_id required | integer The ID of the node scan to show. |
source_id required | integer The ID of the node scan to compare against. |
{- "packages": {
- "windows": {
- "Notepad++": {
- "version": {
- "__a_value": "6.9.2",
- "__b_value": "6.9.1",
- "__diff": "attr_different"
}, - "__diff_stats": {
- "attr_different": 1,
- "attr_total": 2
}
}
}
}, - "__diff_stats": {
- "attr_different": 2,
- "attr_total": 2884,
- "ci_different": 2,
- "ci_total": 779,
- "attr_b_missing": 162,
- "ci_b_missing": 7
}
}
This method allows you to search your previous node scans for key words and return a JSON result.
format required | string Value: "json" The output format of the response. |
query required | string The query string you wish to search for. |
type | string The type name (eg Packages, Users) you wish to restrict the query to. |
environment_id | integer The id of the environment you wish to restrict the query to. |
node_group_id | integer The id of the node group you wish to restrict the query to. |
exact_match | boolean Whether or not the results should exactly match the search text or can just be a subset of the text. |
{- "node_id": 6,
- "node_name": "SERVER_XYZ",
- "scan_date": "2014-06-28T21:24:24-07:00",
- "data": {
- "packages": {
- "windows": {
- "Adobe Flash Player 11 ActiveX": {
- "name": "Adobe Flash Player 11 ActiveX",
- "version": "11.3.300.257"
}
}
}
}
}
This method returns a skeleton payload format that can subsequently be submitted to create a new node.
format required | string Value: "json" The output format of the response. |
{- "alternate_password": "string",
- "connection_manager_group_id": 1,
- "description": "The prod node we use to serve the main content from our website. One sunny day...",
- "environment_id": 2,
- "external_id": "i-12345",
- "mac_address": "00:00:00:00:00:00",
- "medium_hostname": "jenkins.company.com",
- "medium_info": "string",
- "medium_password": "string",
- "medium_port": 22,
- "medium_type": 1,
- "medium_username": "guardian",
- "name": "prod01",
- "node_type": "SV",
- "operating_system_family_id": 1,
- "operating_system_id": 123,
- "public": true,
- "short_description": "The main prod website node",
}
This method allows you to register a new node.
format required | string Value: "json" The output format of the response. |
object |
{- "node": {
- "alternate_password": "string",
- "connection_manager_group_id": 1,
- "description": "The prod node we use to serve the main content from our website. One sunny day...",
- "environment_id": 2,
- "external_id": "i-12345",
- "ip_address": "string",
- "mac_address": "00:00:00:00:00:00",
- "medium_hostname": "jenkins.company.com",
- "medium_info": "string",
- "medium_password": "string",
- "medium_port": 22,
- "medium_type": 1,
- "medium_username": "guardian",
- "name": "prod01",
- "node_type": "SV",
- "operating_system_family_id": 1,
- "operating_system_id": 123,
- "public": true,
- "short_description": "The main prod website node",
}
}
{- "alternate_password": "string",
- "connection_manager_group_id": 1,
- "description": "The prod node we use to serve the main content from our website. One sunny day...",
- "environment_id": 2,
- "external_id": "i-12345",
- "id": 311,
- "ip_address": "192.168.1.1",
- "mac_address": "00:00:00:00:00:00",
- "medium_hostame": "jenkins.company.com",
- "medium_info": "string",
- "medium_port": 22,
- "medium_type": 1,
- "medium_username": "guardian",
- "name": "prod01",
- "node_type": "SV",
- "online": true,
- "operating_system_family_id": 1,
- "operating_system_id": 123,
- "public": true,
- "short_description": "The main prod website node",
}
This method returns a list of nodes registered to the organization.
format required | string Value: "json" The output format of the response. |
last_scan_status | string Default: "all" Enum: "pending" "processing" "success" "assigned" "actioned" "failure" "offline" "cancelled" "timeout" "error" "exception" "all_failures" List nodes based on the status of their last node scan. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
status | string Enum: "active" "deleted" "detected" Only show nodes of a particular status |
name | string Filter down to nodes that contain this substring in their name. (case insensitive). |
external_id | string Filter down to nodes that contain this substring in their external ID. (case insensitive). |
[- {
- "id": 311,
- "environment_id": 2,
- "node_type": "SV",
- "name": "prod01",
- "mac_address": "00:00:00:00:00:00",
- "ip_address": "192.168.1.1",
- "short_description": "The main prod website node",
- "operating_system_family_id": 1,
- "operating_system_id": 123,
- "external_id": "i-12345",
- "online": true,
- "last_scan_status": 2,
- "last_scan_status_string": "success",
- "medium_hostame": "jenkins.company.com",
- "medium_port": 22,
- "medium_info": "string",
- "medium_type": 1,
- "medium_username": "guardian",
- "connection_manager_group_id": 1
}
]
This method returns details of the node specified by the ID given in the URL.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
{- "alternate_password": "string",
- "connection_manager_group_id": 1,
- "description": "The prod node we use to serve the main content from our website. One sunny day...",
- "environment_id": 2,
- "external_id": "i-12345",
- "id": 311,
- "ip_address": "192.168.1.1",
- "mac_address": "00:00:00:00:00:00",
- "medium_hostame": "jenkins.company.com",
- "medium_info": "string",
- "medium_port": 22,
- "medium_type": 1,
- "medium_username": "guardian",
- "name": "prod01",
- "node_type": "SV",
- "online": true,
- "operating_system_family_id": 1,
- "operating_system_id": 123,
- "public": true,
- "short_description": "The main prod website node",
}
This method allows you to update properties of a node.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
object The node object you would like to update. If a field is missing from the node object, the it will not be updated. Please note that submitting a value as |
{- "node": {
- "alternate_password": "string",
- "connection_manager_group_id": 1,
- "description": "The prod node we use to serve the main content from our website. One sunny day...",
- "environment_id": 2,
- "external_id": "i-12345",
- "id": 311,
- "ip_address": "string",
- "mac_address": "00:00:00:00:00:00",
- "medium_hostname": "jenkins.company.com",
- "medium_info": "string",
- "medium_password": "string",
- "medium_port": 22,
- "medium_type": 1,
- "medium_username": "guardian",
- "name": "prod01",
- "node_type": 1,
- "operating_system_family_id": 1,
- "operating_system_id": 123,
- "public": true,
- "short_description": "The main prod website node",
}
}
{- "error": "No authorization method found"
}
This method allows you to delete a node from your account.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
{- "error": "No authorization method found"
}
This method allows you to look up the Node ID of a registered node based on either the name, external_id or a combination of SSH connection details. Valid parameter usages are:
?name=[node_name]
?external_id=[external_id]
?ssh_hostname=[hostname]&ssh_username=[username]
?ssh_hostname=[hostname]&ssh_username=[username]&ssh_port=[port]
.format required | string Value: "json" The output format of the response. |
name | string The name of the node to look up. |
external_id | string The external ID of the node to look up. |
ssh_hostname | string The SSH hostname of the node to look up. |
ssh_username | string The SSH username of the node to look up. |
ssh_port | integer The SSH port of the node to look up. If missing and ssh_hostname and ssh_username are supplied, defaults to 22. |
{- "node_id": 123
}
This method allows you to add the node to a node group.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
node_group_id required | integer The ID of the node group the node is being added to. |
{- "created_at": "2013-12-18T14:48:31-08:00",
- "id": 87,
- "node_id": 199,
- "node_group_id": 101,
- "updated_at": "2013-12-18T14:48:31-08:00"
}
This method allows you to remove the node from a node group.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
node_group_id required | integer The ID of the node group the node is being removed from. |
{- "error": "No authorization method found"
}
This method returns a list of node groups the node belongs to.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
[- {
- "id": 311,
- "organisation_id": 123,
- "name": "IIS",
- "description": "All IIS Servers",
- "node_rules": "^IIS"
}
]
This method returns the total, failing and unmanaged status counts, either for your whole account, a particular node group or a particular environment. If both the node_group_id
and environment_id
parameter are specified, only the environment_id
parameter will be considered and the node_group_id
will be ignored.
format required | string Value: "json" The output format of the response. |
node_group_id | integer Show only status counts for nodes in the given node group. |
environment_id | integer Show only status counts for nodes in the given environment. |
{- "total": 0,
- "failed": 0,
- "unmanaged": 0
}
This method allows you to initiate a Node Scan against this node.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node you wish to initiate a scan on. |
label | string The label you wish to tag a scan with (can include spaces). |
{- "job_id": 1337
}
This method allows you to retrieve scan details from the latest Node Scan for the node. If neither scan_id
or scan_label
are given, the most recent scan for this node is retrieved.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node you wish to retrieve a scan for. |
scan_id | integer The ID of the scan you would like to retrieve. |
scan_label | string The label of the scan you would like to retrieve (if there are multiple matches it will return the most recent). |
{- "id": 1337,
- "label": "Change 2001",
- "status": 0,
- "data": "{\"packages\":{...}}",
- "created_at": "2015-09-14T05:02:12Z"
}
This method allows you to look up the task status and task report of the last node scan run on this node.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node you wish to retrieve the last node scan's status for. |
{- "status": 2,
- "status_string": "success",
- "report": "[{\"generate_node_scan\":{\"number_of_packages_found\":\"96\",\"number_of_files_found\":\"5\",\"number_of_services_found\":\"153\",\"number_of_users_found\":\"2\",\"number_of_groups_found\":\"25\",\"number_of_ports_found\":\"64\",\"number_of_environment_variables_found\":\"34\",\"result\":\"success\",\"messages\":[]}},{\"upload_node_scan\":{\"result\":\"success\",\"node_id\":\"174\",\"http_response_code\":\"201\",\"http_response_body\":\"\",\"messages\":[]}}]\""
}
This method allows you to look up the details of the last successful scan job that was run against the specified node. Note that this will not retrieve the raw data of the actual scan.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node you wish to retrieve details for. |
{- "status": 2,
- "status_string": "success",
- "report": "[{\"detect_os\":{\"messages\":[],\"result\":\"success\"}},{\"generate_blueprint\":{\"messages\":[],\"result\":\"success\"}},{\"upload_blueprint\":{\"messages\":[],\"result\":\"success\"}}]",
- "created_at": "2015-06-09T10:14:52-07:00",
- "updated_at": "2015-06-09T10:15:19-07:00"
}
This method allows you to retrieve information about the last scan that was performed on the specified node.
format required | string Enum: "csv" "json" The output format of the response. |
node_id required | integer The ID of the node you wish to retrieve details for. |
with_data | boolean Default: true If true, will retrieve verbose output from the last scan. |
{- "associated_id": 0,
- "category": 0,
- "created_at": "2016-08-04T15:03:21-07:00",
- "id": 9,
- "label": "Authorized change 2001",
- "node_id": 3,
- "scan_options": "\"scan_ports\":{\"tcp\":\"1-1024\",\"udp\":\"1-1024\"}",
- "status": 1,
- "task_id": 6,
- "updated_at": "2016-08-05T15:06:42-07:00"
}
This method allows you to perform differencing operations against nodes and specific node scans. There are three types of diffs you can perform with this endpoint.
Diff Style | Example URL |
Diff Last | /api/v2/nodes/diff.json?node_id=50 |
Node to Node | /api/v2/nodes/diff.json?node_id=50&compare_node_id=60 |
Scan to Scan | /api/v2/nodes/diff.json?scan_id=100&compare_scan_id=200 |
format required | string Value: "json" The output format of the response. |
node_id | integer The ID of the node to be used for diff (last scan will be used by default). |
compare_node_id | integer The id of the node to be used for comparing to node_id (last scan will be used by default). |
scan_id | integer The ID of the scan to be used for diff. |
compare_scan_id | integer The ID of the scan to be used for comparing to the scan indicated by scan_id. |
[- {
- "summary": {
- "attr_total": 2788,
- "ci_total": 870,
- "attr_b_missing": 1,
- "attr_a_missing": 1,
- "ci_different": 1
}
}, - {
- "__diff_stats": {
- "summary": {
- "attr_total": 2788,
- "ci_total": 870,
- "attr_b_missing": 1,
- "attr_a_missing": 1,
- "ci_different": 1
}
}, - "ci_type": {
- "__diff_stats": {
- "summary": {
- "attr_total": 2788,
- "ci_total": 870,
- "attr_b_missing": 1,
- "attr_a_missing": 1,
- "ci_different": 1
}
}, - "provider": {
- "__diff_stats": {
- "level": "ci",
- "attr_b_missing": 1,
- "attr_a_missing": 1,
- "attr_total": 2788,
- "ci_different": 1,
- "ci_total": 870
}, - "ci": {
- "__diff_stats": {
- "attr_b_missing": 1,
- "attr_a_missing": 1,
- "attr_total": 2788
}, - "ci_attribute": {
- "__value": "added line to file",
- "__diff": "The type of difference this diff is."
}
}
}
}
}
]
This method allows you to perform group diff operations against nodes, or node groups. There are 2 types of diffs you can perform using the parameters listed above. 1. A “grouped nodes” style diff where you supply any number of node id’s and the most recent scan for those nodes will be compared 2. A “node group to node group” style diff where you supply any number of node group id’s and the most recent scan for those node groups will be compared. Some example usages are
Diff Style | Example URL |
Diff Between Nodes | /api/v2/nodes/group_diff.json?node_ids=1,2,3,4,5,6 |
Diff Between Node Groups | /api/v2/nodes/group_diff.json?node_group_ids=2,4 |
Ignored Items | /api/v2/nodes/group_diff.json?node_group_ids=2&show_ignored=true |
Show differences only | /api/v2/nodes/group_diff.json?node_group_ids=2&show_difference=true |
format required | string Value: "json" The output format of the response. |
node_ids | Array of integers The IDs of the nodes to be used for differencing (latest node scan will be used). |
node_group_ids | Array of integers The IDs of the node groups to be used for differencing (latest node group scan will be used). |
show_ignored | boolean If true, includes ignored items in the resulting difference. |
show_difference | boolean Only show where differences exist and discard any common attributes between all scans considered. |
{- "data": {
- "ci_type": {
- "provider": {
- "ci": {
- "__type": "c",
- "attr": "string"
}
}
}
}, - "group_hash": "string",
- "ignored_items": {
- "data": {
- "ci_type": {
- "provider": {
- "ci": {
- "ignore": {
- "node_group_id": 0
}
}
}
}
}, - "merged": true
}, - "lookup": [
- {
- "created_at": "2018-12-23T08:25:14.018Z",
- "node_id": 10,
- "node_name": "Amazon Linux",
- "node_scan_id": 119809
}
], - "name": "Group Diff",
- "node_count": 2
}
This method allows you to view the scan configuration of a node.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node you wish to retrieve the node scan configuration for. |
{- "ignore_items": {
- "ci_type": {
- "ci_subtype": {
- "ci": {
- "ignore": {
- "node_group_id": 3
}
}
}
}
}, - "scan_options": {
- "scan_directory_options": [
- {
- "path": "/etc/sysconfig/*",
- "exclude": false,
- "contents": false
}
], - "sql_queries": [ ],
- "scan_ports": {
- "tcp": "1-1024",
- "udp": "1-1024"
}, - "scan_diff_excluded_text": [
- ""
], - "scripts": [ ]
}, - "policies": [ ]
}
This method allows you to retrieve a subsection of the latest node scan for the specified node.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
ci_type required | string The CI type of the section to retrieve. Some examples include |
{- "provider": {
- "name_of_ci": {
- "name": "%windir%\\system.ini",
- "owner": "NT AUTHORITY\\SYSTEM",
- "content": "286a9edb379dc3423a528b0864a0f111"
}
}
}
This method allows you to retrieve a list of all raw files which correspond to a node scan of the specified node types above. Note The raw file endpoints only apply to node types that are Firewalls, Switches, or Routers.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
[- {
- "id": 125,
- "node_scan_id": 9,
- "created_at": "2016-02-22T12:08:36-11:00",
- "updated_at": "2016-02-22T12:08:36-11:00"
}
]
This method allows you to retrieve the most recent raw file which corresponds to its equivalent node scan for the specified node types above Firewalls, Switches, or Routers. If no parameters are supplied, this method will return the most recent raw file in the stored category by default. Note The parameters raw_file_id
and category
should not be used together.
format required | string Value: "json" The output format of the response. |
node_id required | integer The ID of the node. |
raw_file_id | integer The ID of the raw file that you wish to retrieve. |
category | integer Default: 0 Enum: 0 1 2 The category from which the node scan ids will be retrieved from.
|
{- "id": 125,
- "data": "...",
- "node_scan_id": 9
}
This method returns a list of recognized operating system families. An operating system family is a grouping of operating systems.
format required | string Value: "json" The output format of the response. |
[- {
- "id": 1,
- "name": "Windows"
}
]
This method allows you to access a specific Operating System Family given its ID.
format required | string Value: "json" The output format of the response. |
operating_system_family_id required | integer The ID of the operating system family. |
{- "id": 1,
- "name": "Windows"
}
This method returns a list of recognized operating system types.
format required | string Value: "json" The output format of the response. |
[- {
- "description": "Windows Server 2012",
- "id": 123,
- "name": "2012",
- "operating_system_family_id": 1
}
]
This method allows you to access a specific Operating System given it's ID.
format required | string Value: "json" The output format of the response. |
operating_system_id required | integer The ID of the operating system. |
{- "id": 123,
- "name": "Windows",
- "operating_system_family_id": 1,
- "description": "Windows 2012 Server"
}
This method allows you to lookup the ID of an Operating System registered with Guardian based on a query string.
format required | string Value: "json" The output format of the response. |
query required | string A search query of the general name of the operating system you want to lookup. |
{- "operating_system_family_id": 1,
- "operating_system_family": "Windows",
- "operating_system_id": 123,
- "operating_system_name": "Windows 2012 Server"
}
This method returns a skeleton payload format that can subsequently be submitted to create a new pluggable.
format required | string Value: "json" The output format of the response. |
{- "name": null,
- "operating_system_family_id": null,
- "script": null
}
This method returns a list of pluggables created by the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "name": "NewOS",
- "operating_system_family": "NewFamily",
- "script": "showall config",
- "organisation_id": 123
}
]
This method allows you to create a new pluggable.
format required | string Value: "json" The output format of the response. |
object (PluggableWithoutId) |
{- "pluggable": {
- "name": "NewOS",
- "operating_system_family": "Linux",
- "script": "showall config"
}
}
{- "operating_system_id": 123,
- "operating_system_family_id": 2,
- "name": "Production",
- "script": "showall config"
}
This method returns the details of the pluggable specified by the ID given in the URL.
format required | string Value: "json" The output format of the response. |
operating_system_id required | integer The Operating System ID of the pluggable. |
{- "operating_system_id": 30,
- "operating_system_family_id": 123,
- "name": "NewOS",
- "script": ""
}
This method allows you to update properties of an pluggable.
format required | string Value: "json" The output format of the response. |
operating_system_id required | integer The Operating System ID of the pluggable. |
object |
{- "pluggable": {
- "name": "New Pluggable Name",
- "script": ""
}
}
{- "error": "No authorization method found"
}
This method allows you to delete an pluggable from your account.
format required | string Value: "json" The output format of the response. |
operating_system_id required | integer The Operating System ID of the pluggable. |
{- "error": "No authorization method found"
}
This method returns a skeleton payload format that can subsequently be submitted to create a new policy.
format required | string Value: "json" The output format of the response. |
{- "policy": {
- "name": null,
- "description": null,
- "operating_system_family_id": null,
- "operating_system_id": null
}
}
This method returns a list of policies for the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "name": "Basic user permissions.",
- "organisation_id": 2
}
]
This method allows you to create a new policy.
format required | string Value: "json" The output format of the response. |
object |
{- "policy": {
- "name": "Basic User Permissions",
- "description": "A baseline user permissions policy.",
- "operating_system_family_id": 2,
- "operating_system_id": 211
}
}
{- "id": 1,
- "name": "Basic user permissions.",
- "description": "A basic policy used to enforce User Permissions.",
- "created_by": 10,
- "updated_by": 11,
- "created_at": "2016-04-14T18:03:29-07:00",
- "updated_at": "2016-04-14T18:03:29-07:00",
- "operating_system_family_id": 2,
- "operating_system_id": 211
}
This method returns details of the policy specified by the ID given in the URL.
format required | string Value: "json" The output format of the response. |
policy_id required | integer The ID of the policy. |
{- "id": 1,
- "name": "Basic user permissions.",
- "description": "A basic policy used to enforce User Permissions.",
- "created_by": 10,
- "updated_by": 11,
- "created_at": "2016-04-14T18:03:29-07:00",
- "updated_at": "2016-04-14T18:03:29-07:00",
- "operating_system_family_id": 2,
- "operating_system_id": 211,
- "data": "[{\"EnvVars\": [{\"linux\": [{\"name\": \"BASH\", \"checks\": {\"value\": [{\"check\": \"equals\", \"expected\": \"/bin/bash\"}]}, \"EnvVars\": {\"name\": \"BASH\"}, \"ci_path\": [\"EnvVars\", \"linux\", \"BASH\"], \"check_type\": \"envvars\"}]}]}]",
- "tag": "string",
- "is_latest": true,
- "version": 1
}
This method allows you to update the properties of a policy.
format required | string Value: "json" The output format of the response. |
policy_id required | integer The ID of the policy. |
object |
{- "policy": {
- "add_node_groups": [
- "Database nodes"
], - "data": "[{\"EnvVars\": [{\"linux\": [{\"name\": \"BASH\", \"checks\": {\"value\": [{\"check\": \"equals\", \"expected\": \"/bin/bash\"}]}, \"EnvVars\": {\"name\": \"BASH\"}, \"ci_path\": [\"EnvVars\", \"linux\", \"BASH\"], \"check_type\": \"envvars\"}]}]}]",
- "description": "A basic policy used to enforce User Permissions.",
- "name": "Basic user permissions.",
- "node_scan": "If the policy was created or updated using a node scan as a template, the ID of that node scan.",
- "operating_system_family_id": 2,
- "operating_system_id": 211,
- "revert_to": 2,
- "scan_options": "{\"scan_directory_options\":[{\"path\":\"/etc/app.conf\",\"contents\":false,\"lastModified\":false}]}",
- "tag": "string"
}
}
{- "error": "No authorization method found"
}
This method allows you to delete a policy from your account.
format required | string Value: "json" The output format of the response. |
policy_id required | integer The ID of the policy. |
{- "error": "No authorization method found"
}
This method allows you to lookup the Policy ID of a created policy in your account based on either the name of the policy or the description fields of the policy. This method will return the first result of the policy that matches the lookup parameters.
format required | string Value: "json" The output format of the response. |
name | string The text to search for in the names of policies to locate a policy. |
short_description | string The text to search for in the dscriptions of policies to locate a policy. |
{- "policy_id": 14
}
This method returns a summary of policy results for the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "short_description": "Policy_1",
- "policy_id": 1,
- "min_date": "2016-04-14T18:03:29-07:00",
- "max_date": "2016-04-14T18:03:29-07:00",
- "pass_count": 55,
- "fail_count": 55
}
]
This method returns you the list of Node IDs that is targeted by the Policy specified by the ID in the URL.
format required | string Value: "json" The output format of the response. |
policy_id required | integer The ID of the policy. |
"[53,61,62]"
This method returns you the list of versions of the policy, each version different from the previous due to updates performed to the policy data.
format required | string Value: "json" The output format of the response. |
policy_id required | integer The ID of the policy. |
[- {
- "id": 5,
- "version": 1,
- "tag": "string"
}
]
This method allows you to add a file type check to the given policy. If the check already existed in the policy, then a new policy version will not be created and a 204
response will be returned. If a new check was added to the policy, a new policy version will be created and the details of that new version returned with a 201
response code.
format required | string Value: "json" The output format of the response. |
policy_id required | integer The ID of the policy. |
section required | string Example: section=Production Files The policy section the check should live under. A policy consists of sections, which contain checks. |
file_path required | string Example: file_path=/etc/application.conf The absolute file path for the file check to be added. |
attr required | string Example: attr=checksum The attribute of the configuration object you want to check. Examples include |
check required | string Enum: "equals" "includes" "excludes" "conditional" "version_comparison" "time_comparison" "regex" "regex_excludes" "allow" "xpath" "present" Example: check=present The type of attribute check. |
expected required | string Example: expected=true The expected value for the policy check. |
absent_pass | boolean A check will fail by default if the value the check is to be run on is missing. Set this value to true to pass the check if the value is absent. |
{- "policy_version_id": 44,
- "tag": "string",
- "version": 1
}
This method returns the latest result details of the policy specified by the ID given in the URL. Note Policy results are displayed for each node that the policy is applied to. The policy_result_id
can be queried against the results provided by the include_policy_results
parameter to display further policy result details.
format required | string Enum: "json" "pdf" The output format of the response. |
policy_id required | integer The ID of the policy. |
failed_only | boolean If true, only failed policy results will be returned. |
include_policy | boolean Display policy meta data. |
include_policy_versions | boolean Display previous policy versions. |
include_type_stats | boolean Display the overall result of a policy across all nodes. |
include_policy_results | boolean Display detailed policy results. The |
all_data | boolean Display results for all parameters listed here (not including |
node_id | integer Optionally narrow down policy results to a specific node given by this node_id. |
{- "policy_stats": [
- {
- "stats": "{\"EnvVars\":{\"__pass\":1,\"__fail\":2,\"windows\":{\"Path\":{\"__pass\":1,\"__fail\":2}}}}",
- "passed": "f",
- "pass_count": "1",
- "fail_count": "2",
- "name": "IIS-PROD01",
- "node_id": "2458",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2016-03-23 20:58:04.956449",
- "nspr_id": "51839",
- "policy_result_id": "2221"
}, - {
- "stats": "{\"EnvVars\":{\"__pass\":2,\"__fail\":1,\"windows\":{\"Path\":{\"__pass\":2,\"__fail\":1}}}}",
- "passed": "f",
- "pass_count": "2",
- "fail_count": "1",
- "name": "IIS-PROD02",
- "node_id": "2486",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2015-11-26 09:01:39.32032",
- "nspr_id": "10923",
- "policy_result_id": "1464"
}
]
}
This method returns the latest result details of the policy specified by the ID given in the URL. Note Policy results are displayed for each node that the policy is applied to. The policy_result_id
can be queried against the results provided by the include_policy_results
parameter to display further policy result details.
format required | string Enum: "json" "pdf" The output format of the response. |
policy_id required | integer The ID of the policy. |
failed_only | boolean If true, only failed policy results will be returned. |
include_policy | boolean Display policy meta data. |
include_policy_versions | boolean Display previous policy versions. |
include_type_stats | boolean Display the overall result of a policy across all nodes. |
include_policy_results | boolean Display detailed policy results. The |
all_data | boolean Display results for all parameters listed here (not including |
node_id | integer Optionally narrow down policy results to a specific node given by this node_id. |
{- "policy_stats": [
- {
- "stats": "{\"EnvVars\":{\"__pass\":1,\"__fail\":2,\"windows\":{\"Path\":{\"__pass\":1,\"__fail\":2}}}}",
- "passed": "f",
- "pass_count": "1",
- "fail_count": "2",
- "name": "IIS-PROD01",
- "node_id": "2458",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2016-03-23 20:58:04.956449",
- "nspr_id": "51839",
- "policy_result_id": "2221"
}, - {
- "stats": "{\"EnvVars\":{\"__pass\":2,\"__fail\":1,\"windows\":{\"Path\":{\"__pass\":2,\"__fail\":1}}}}",
- "passed": "f",
- "pass_count": "2",
- "fail_count": "1",
- "name": "IIS-PROD02",
- "node_id": "2486",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2015-11-26 09:01:39.32032",
- "nspr_id": "10923",
- "policy_result_id": "1464"
}
]
}
This method returns the latest result details of the policy specified by the ID given in the URL. Note Policy results are displayed for each node that the policy is applied to. The policy_result_id
can be queried against the results provided by the include_policy_results
parameter to display further policy result details.
format required | string Enum: "json" "pdf" The output format of the response. |
policy_id required | integer The ID of the policy. |
failed_only | boolean If true, only failed policy results will be returned. |
include_policy | boolean Display policy meta data. |
include_policy_versions | boolean Display previous policy versions. |
include_type_stats | boolean Display the overall result of a policy across all nodes. |
include_policy_results | boolean Display detailed policy results. The |
all_data | boolean Display results for all parameters listed here (not including |
node_id | integer Optionally narrow down policy results to a specific node given by this node_id. |
{- "policy_stats": [
- {
- "stats": "{\"EnvVars\":{\"__pass\":1,\"__fail\":2,\"windows\":{\"Path\":{\"__pass\":1,\"__fail\":2}}}}",
- "passed": "f",
- "pass_count": "1",
- "fail_count": "2",
- "name": "IIS-PROD01",
- "node_id": "2458",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2016-03-23 20:58:04.956449",
- "nspr_id": "51839",
- "policy_result_id": "2221"
}, - {
- "stats": "{\"EnvVars\":{\"__pass\":2,\"__fail\":1,\"windows\":{\"Path\":{\"__pass\":2,\"__fail\":1}}}}",
- "passed": "f",
- "pass_count": "2",
- "fail_count": "1",
- "name": "IIS-PROD02",
- "node_id": "2486",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2015-11-26 09:01:39.32032",
- "nspr_id": "10923",
- "policy_result_id": "1464"
}
]
}
This method returns the latest result details of the policy specified by the ID given in the URL. Note Policy results are displayed for each node that the policy is applied to. The policy_result_id
can be queried against the results provided by the include_policy_results
parameter to display further policy result details.
format required | string Enum: "json" "pdf" The output format of the response. |
policy_id required | integer The ID of the policy. |
failed_only | boolean If true, only failed policy results will be returned. |
include_policy | boolean Display policy meta data. |
include_policy_versions | boolean Display previous policy versions. |
include_type_stats | boolean Display the overall result of a policy across all nodes. |
include_policy_results | boolean Display detailed policy results. The |
all_data | boolean Display results for all parameters listed here (not including |
node_id | integer Optionally narrow down policy results to a specific node given by this node_id. |
{- "policy_stats": [
- {
- "stats": "{\"EnvVars\":{\"__pass\":1,\"__fail\":2,\"windows\":{\"Path\":{\"__pass\":1,\"__fail\":2}}}}",
- "passed": "f",
- "pass_count": "1",
- "fail_count": "2",
- "name": "IIS-PROD01",
- "node_id": "2458",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2016-03-23 20:58:04.956449",
- "nspr_id": "51839",
- "policy_result_id": "2221"
}, - {
- "stats": "{\"EnvVars\":{\"__pass\":2,\"__fail\":1,\"windows\":{\"Path\":{\"__pass\":2,\"__fail\":1}}}}",
- "passed": "f",
- "pass_count": "2",
- "fail_count": "1",
- "name": "IIS-PROD02",
- "node_id": "2486",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2015-11-26 09:01:39.32032",
- "nspr_id": "10923",
- "policy_result_id": "1464"
}
]
}
This method returns the latest result details of the policy specified by the ID given in the URL. Note Policy results are displayed for each node that the policy is applied to. The policy_result_id
can be queried against the results provided by the include_policy_results
parameter to display further policy result details.
format required | string Enum: "json" "pdf" The output format of the response. |
policy_id required | integer The ID of the policy. |
failed_only | boolean If true, only failed policy results will be returned. |
include_policy | boolean Display policy meta data. |
include_policy_versions | boolean Display previous policy versions. |
include_type_stats | boolean Display the overall result of a policy across all nodes. |
include_policy_results | boolean Display detailed policy results. The |
all_data | boolean Display results for all parameters listed here (not including |
node_id | integer Optionally narrow down policy results to a specific node given by this node_id. |
{- "policy_stats": [
- {
- "stats": "{\"EnvVars\":{\"__pass\":1,\"__fail\":2,\"windows\":{\"Path\":{\"__pass\":1,\"__fail\":2}}}}",
- "passed": "f",
- "pass_count": "1",
- "fail_count": "2",
- "name": "IIS-PROD01",
- "node_id": "2458",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2016-03-23 20:58:04.956449",
- "nspr_id": "51839",
- "policy_result_id": "2221"
}, - {
- "stats": "{\"EnvVars\":{\"__pass\":2,\"__fail\":1,\"windows\":{\"Path\":{\"__pass\":2,\"__fail\":1}}}}",
- "passed": "f",
- "pass_count": "2",
- "fail_count": "1",
- "name": "IIS-PROD02",
- "node_id": "2486",
- "environment_id": "2814",
- "environment_name": "IIS Servers",
- "created_at": "2015-11-26 09:01:39.32032",
- "nspr_id": "10923",
- "policy_result_id": "1464"
}
]
}
This method returns a list of scheduled jobs for the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": "2s",
- "organization_id": 2,
- "source_id": 2,
- "source_name": "Default",
- "source_type": 12,
- "status": 2,
- "url": "/api/v2/scheduled_jobs/2.json",
- "data": "{}"
}
]
This method allows you to create a new Scheduled Job.
format required | string Value: "json" The output format of the response. |
object |
{- "scheduled_job": {
- "failure_list": "support@example.com,admin@example.com",
- "notify_admins": true,
- "notify_analysts": true,
- "output_format": 1,
- "repeat_minutes": 60,
- "repeat_day": 0,
- "start_time_hour": 23,
- "start_time_minute": 59,
- "start_time_zone": "Pacific Time (US & Canada)",
- "report_recipients": "support@example.com,admin@example.com",
- "source_id": 12,
- "source_type": 13
}
}
{- "id": "2s",
- "organization_id": 2,
- "source_id": 2,
- "source_name": "Default",
- "source_type": 12,
- "status": 2,
- "url": "/api/v2/scheduled_jobs/2.json",
- "data": "{}"
}
This method returns details of the scheduled job specified by the job ID in the URL.
format required | string Value: "json" The output format of the response. |
scheduled_job_id required | integer The ID of the scheduled job. |
{- "id": "2s",
- "organization_id": 2,
- "source_id": 2,
- "source_name": "Default",
- "source_type": 12,
- "status": 2,
- "url": "/api/v2/scheduled_jobs/2.json",
- "data": "{}"
}
This method allows you to update the specified scheduled job.
format required | string Value: "json" The output format of the response. |
scheduled_job_id required | integer The ID of the scheduled job. |
object |
{- "scheduled_job": {
- "repeat_minutes": 60,
- "repeat_day": 0,
- "start_time_hour": 23,
- "start_time_minute": 59,
- "start_time_zone": "Pacific Time (US & Canada)",
- "report_recipients": "support@example.com,admin@example.com",
- "status": 1
}
}
{- "error": "No authorization method found"
}
This method allows you to delete the specified scheduled job.
format required | string Value: "json" The output format of the response. |
scheduled_job_id required | integer The ID of the scheduled job. |
{- "error": "No authorization method found"
}
This method allows you to stop running and pending jobs associated with the specified scheduled job.
format required | string Value: "json" The output format of the response. |
scheduled_job_id required | integer The ID of the scheduled job. |
{- "error": "No authorization method found"
}
This method returns a list of Scores created by the organization.
format required | string Value: "json" The output format of the response. |
page | integer >= 1 Default: 1 Displays results based on specified page number. |
per_page | integer >= 1 Default: 20 Number of results per page |
[- {
- "id": 1,
- "node_id": 2,
- "node_scan_id": 2,
- "data": "{score_summary: {score_value: 42, score_version: 1 } }"
}
]
This endpoint reports disk usage percentages. (This endpoint is only applicable to on-premise accounts.).
format required | string Value: "json" The output format of the response. |
[- {
- "metric": "DB_DISK_USAGE_PERCENTAGE",
- "value": 42,
- "timestamp": "2018-01-01 12:34:56 UTC"
}
]
This method allows you to retrieve a text file.
format required | string Value: "json" The output format of the response. |
text_file_id required | integer The ID of the text file. |
{- "category": 1,
- "checksum": "0fcc7e5d846da8b3079bd56d5eaea6cc",
- "created_at": "2015-03-10T15:37:09-07:00",
- "data": "This is sample content from a text file",
- "id": 20,
- "name": null,
- "updated_at": "2015-03-10T15:37:09-07:00"
}
This method returns a list of all users in an organization. The selected organization is determined by the API key and secret specified in the Authorization header.
format required | string Value: "json" The output format of the response. |
invited | bool Default: false If set to true, also return users who have been invited to the organization. |
[- {
- "id": 3,
- "name": "Mr",
- "surname": "Burns",
- "email": "c.m.burns@snpp.com",
- "role": "Administrator",
- "last_sign_in_at": "2016-12-24T15:40:35.622Z"
}, - {
- "email": "success@monorails.com",
- "expiry": "2018-07-07T12:34:56-07:00",
- "invited": true,
- "role": "Member"
}
]
This method allows a caller to invite a user to an organization via their email address. If a user does not have an account with Guardian yet, they will be sent an invite link to sign up. If the user already has an account they are immediately added to this organization.
Responses are:
member
or analyst
format required | string Value: "json" The output format of the response. |
email required | string Example: email=c.m.burns@snpp.com The email address of the user to invite. Note, if the email address contains a plus symbol (+) please replace it with the URL encoded form (%2B). |
role required | string Enum: "member" "analyst" The role to invite the user as. Note you cannot invite new users as the Administrator ( |
{- "email": "c.m.burns@snpp.com",
- "organisation_id": 12,
- "role": "member"
}
This method allows you to update properties of a user.
format required | string Value: "json" The output format of the response. |
user_id required | integer The ID of the user. |
name | string (_properties_name-10) The first name of the user, set during registration. |
surname | string (surname) The surname of the user, set during registration. |
external_id | string (_properties_external_id) An extra, free-text external ID field that can be stored and viewed against user records. This is only available via a feature toggle. |
{- "name": "Charles",
- "surname": "Burns",
- "external_id": "987654321"
}
{- "error": "No authorization method found"
}
This method updates a user's role within the selected organization. The selected organization is determined by the API key and secret specified in the Authorization header. The selected user is determined by the email value specified in the request parameters.
format required | string Value: "json" The output format of the response. |
email required | string The email of the user whose role will be updated. Note, if the email address contains a plus symbol (+) please replace it with the URL encoded form (%2B). |
role required | string Enum: "member" "analyst" "admin" The new role to switch the user to. |
{- "error": "No authorization method found"
}
This method removes a user from the selected organization. The selected organization is determined by the API key and secret specified in the Authorization header. The selected user is determined by the email value specified in the request parameters.
format required | string Value: "json" The output format of the response. |
email required | string Default: false The email of the user that will be removed from the organization. Note, if the email address contains a plus symbol (+) please replace it with the URL encoded form (%2B). |
new_owner | number Default: false The id of the user that will own the removed user's existing policies. |
{- "error": "No authorization method found"
}