Table of Contents |
---|
...
Logon
Request
Section | |||
---|---|---|---|
URL | POST | http://localhost/omk/open-audit/login | |
Headers | Accept | application/json | |
Body | Type | form-data | |
Key | username | admin | |
Key | password | password |
...
Logon as above, then.
Request
Section | ||
---|---|---|
URL | GET | http://localhost/omk/open-audit/devices |
Headers | Accept | application/json |
...
Logon as above, then request list of devices (or any available endpoint) so we can use the meta → access_token in our request (see above response).
Request
Section | |||
---|---|---|---|
URL | POST | http://localhost/omk/open-audit/discoveries | |
Headers | Accept | application/json | |
Body | Type | form-data | |
Key | data | { |
...
Code Block |
---|
{
"data":
[
{
"attributes":
{
"ad_domain": "",
"ad_server": "",
"cloud_id": 1,
"cloud_name": "",
"command_options": "",
"description": "Subnet - 192.168.1.0/24",
"devices_assigned_to_location": null,
"devices_assigned_to_org": null,
"discard": "n",
"duration": "00:00:00",
"edited_by": "Administrator",
"edited_date": "2021-11-29 13:16:53",
"id": 3,
"ip_all_count": 0,
"ip_audited_count": 0,
"ip_discovered_count": 0,
"ip_responding_count": 0,
"ip_scanned_count": 0,
"last_finished": "2000-01-01 00:00:00",
"last_run": "2000-01-01 00:00:00",
"match_options":
{
"match_dbus": "",
"match_dns_fqdn": "",
"match_dns_hostname": "",
"match_fqdn": "",
"match_hostname": "",
"match_hostname_dbus": "",
"match_hostname_serial": "",
"match_hostname_uuid": "",
"match_ip": "",
"match_ip_no_data": "",
"match_mac": "",
"match_mac_vmware": "",
"match_serial": "",
"match_serial_type": "",
"match_sysname": "",
"match_sysname_serial": "",
"match_uuid": ""
},
"name": "My Testing Discovery",
"network_address": "",
"org_id": 1,
"orgs.id": 1,
"scan_options":
{
"exclude_ip": "",
"exclude_tcp_ports": "",
"exclude_udp_ports": "",
"filtered": "",
"id": "1",
"nmap_tcp_ports": "",
"nmap_udp_ports": "",
"open|filtered": "",
"ping": "",
"script_timeout": "",
"service_version": "",
"snmp_timeout": "",
"ssh_ports": "",
"ssh_timeout": "",
"tcp_ports": "",
"timeout": "",
"timing": "",
"udp_ports": "",
"wmi_timeout": ""
},
"seed_ip": "",
"seed_ping": "y",
"seed_restrict_to_private": "y",
"seed_restrict_to_subnet": "y",
"status": "",
"subnet": "192.168.1.0/24",
"system.id": 0,
"system_id": 0,
"type": "subnet"
},
"id": 3,
"links":
{
"self": "http://dev.local/omk/open-audit/discoveries/3"
},
"type": "discoveries"
}
],
"dictionary":
{
"about": "<p>Discoveries are at the very heart of what Open-AudIT does.<br /><br />How else would you know \"What is on my network?\"<br /><br />Discoveries are preprepared data items that enable you to run a discovery upon a network in a single click, without entering the details of that network each and every time.<br /><br />For more detailed information, check the Open-AudIT <a href=\"https://community.opmantek.com/display/OA/discoveries\">Knowledge Base</a>.<br /><br /></p>",
"attributes":
{
"create":
[
"name",
"org_id",
"type"
],
"fields":
[
"id",
"name",
"org_id",
"description",
"type",
"subnet",
"seed_ip",
"seed_restrict_to_subnet",
"seed_restrict_to_private",
"seed_ping",
"ad_domain",
"ad_server",
"devices_assigned_to_org",
"devices_assigned_to_location",
"network_address",
"system_id",
"scan_options",
"match_options",
"command_options",
"discard",
"last_run",
"last_finished",
"duration",
"status",
"ip_all_count",
"ip_responding_count",
"ip_scanned_count",
"ip_discovered_count",
"ip_audited_count",
"cloud_id",
"cloud_name",
"edited_by",
"edited_date"
],
"update":
[
"name",
"org_id",
"description",
"type",
"subnet",
"seed_ip",
"seed_restrict_to_subnet",
"seed_restrict_to_private",
"seed_ping",
"ad_domain",
"ad_server",
"devices_assigned_to_org",
"devices_assigned_to_location",
"network_address",
"system_id",
"scan_options",
"match_options",
"command_options",
"discard",
"last_run",
"last_finished",
"duration",
"status",
"ip_all_count",
"ip_responding_count",
"ip_scanned_count",
"ip_discovered_count",
"ip_audited_count",
"cloud_id",
"cloud_name"
]
},
"columns":
{
"ad_domain": "The Active Directory domain to retrieve a list of subnets from.",
"ad_server": "The Active Directory server to retrieve a list of subnets from.",
"complete": "A internal field that indicates if the discovery has completed.",
"description": "Your description of this item.",
"device_count": "The number of devices found by this discovery.",
"devices_assigned_to_location": "Any discovered devices will be assigned to this Location if set. Links to <code>locations.id</code>.",
"devices_assigned_to_org": "Any discovered devices will be assigned to this Org if set. If not set, they are assigned to the 'org_id' of this discovery. Links to <code>orgs.id</code>.",
"discard": "Used internally when discovering a single device.",
"edited_by": "The name of the user who last changed or added this item (read only).",
"edited_date": "The date this item was changed or added (read only). NOTE - This is the timestamp from the server.",
"id": "The internal identifier column in the database (read only).",
"last_run": "A calculated field that is updated each time the discovery has been executed.",
"limit": "The number of devices to limit this discovery to.",
"match_dbus": "Should we match a device based on its dbus id.",
"match_dns_fqdn": "Should we match a device based on its DNS fqdn.",
"match_dns_hostname": "Should we match a device based on its DNS hostname.",
"match_fqdn": "Should we match a device based on its fqdn.",
"match_hostname": "Should we match a device based only on its hostname.",
"match_hostname_dbus": "Should we match a device based on its hostname and dbus id.",
"match_hostname_serial": "Should we match a device based on its hostname and serial.",
"match_hostname_uuid": "Should we match a device based on its hostname and UUID.",
"match_ip": "Should we match a device based on its ip.",
"match_ip_no_data": "Should we match a device based on its ip if we have an existing device with no data.",
"match_mac": "Should we match a device based on its mac address.",
"match_mac_vmware": "Should we match a device based mac address even if its a known likely duplicate from VMware.",
"match_options": "A JSON document containing the required attributes overriding the default device match options.",
"match_serial": "Should we match a device based on its serial number.",
"match_serial_type": "Should we match a device based on its serial and type.",
"match_sysname": "Should we match a device based only on its SNMP sysName.",
"match_sysname_serial": "Should we match a device based only on its SNMP sysName and serial.",
"match_uuid": "Should we match a device based on its UUID.",
"name": "The name given to this item. Ideally it should be unique.",
"network_address": "The URL the audit_* scripts should submit their result to.",
"org_id": "The Organisation that owns this item. Links to <code>orgs.id</code>.",
"scan_options": "A JSON document containing the required attributes overriding the chosen discovery_scan_options.",
"scan_options.exclude_ip": "Exclude these IP addresses from being Nmap scanned.",
"scan_options.exclude_tcp_ports": "Do not scan these TCP ports.",
"scan_options.exclude_udp_ports": "Do not scan these UDP ports.",
"scan_options.filtered": "If a port responds with filtered, should we consider it available.",
"scan_options.id": "The set of options for Nmap for this discovery. Links to discovery_scan_options.id.",
"scan_options.nmap_tcp_ports": "Scan the Nmap top number of TCP ports.",
"scan_options.nmap_udp_ports": "Scan the Nmap top number of UDP ports.",
"scan_options.open|filtered": "If a port responds with open|filtered, should we consider it available.",
"scan_options.ping": "The device must respond to an Nmap ping before it is considered online.",
"scan_options.service_version": "Should we use Nmaps Service Version detection. This will considerably slow the discovery scan.",
"scan_options.ssh_ports": "Check this port for any SSH service.",
"scan_options.tcp_ports": "A list of custom TCP ports to scan.",
"scan_options.timeout": "How long should Nmap wait for a response, per target device.",
"scan_options.timing": "The Nmap timing preset.",
"scan_options.udp_ports": "A list of custom UDP ports to scan.",
"seed_ip": "The IP of the device to start a seed discovery with.",
"seed_ping": "For a seed discovery, should I ping the subnet before running the discovery.",
"seed_restrict_to_private": "For a seed discovery, should I only discover IPs in the private IP address space.",
"seed_restrict_to_subnet": "For a seed discovery, should I only discover IPs on the chosen subnet.",
"subnet": "The network subnet to execute the discovery on.",
"system_id": "Used internally when discovering a single device. Links to <code>system.id</code>.",
"type": "Currently supported types are 'subnet' and 'active directory'."
},
"marketing": "<p>Discoveries are at the very heart of what Open-AudIT does. How else would you know \"What is on my network?\"<br /><br />Easily run a discovery upon a network in a single click, without entering the details of that network each and every time.<br /><br />Use Open-AudIT Professional and Enterprise to schedule your Discoveries to run automatically whenever you like.<br /><br />For more detailed information, check the Open-AudIT <a href=\"https://community.opmantek.com/display/OA/discoveries\">Knowledge Base</a>.<br /><br /></p>",
"notes": "<p>Some examples of valid Subnet attributes are: 192.168.1.1 (a single IP address), 192.168.1.0/24 (a subnet), 192.168.1-3.1-20 (a range of IP addresses).<br /><br /><b>NOTE</b> - Only a subnet (as per the examples - 192.168.1.0/24) will be able to automatically create a valid network for Open-AudIT. <br /><br />If you use an Active Directory type, make sure you have appropriate credentials to talk to your Domain Controller already in <a href=\"../credentials\">credentials</a>.</p>",
"product": "community",
"sentence": "Open-AudIT Enterprise discovers every device on your network.",
"table": "discoveries"
},
"included":
[
{
"attributes":
{
"command_options": "",
"description": "Approximately 1 second per target. Scan only the ports that Open-AudIT needs to use to talk to the device and detect an IOS device (WMI, SSH, SNMP, Apple Sync). An open|filtered port is considered closed. Device must respond to an Nmap ping. Use aggressive timing.",
"edited_by": "system",
"edited_date": "2000-01-01 00:00:00",
"exclude_ip": "",
"exclude_tcp_ports": "",
"exclude_udp_ports": "",
"filtered": "n",
"id": 1,
"name": "UltraFast",
"nmap_tcp_ports": "0",
"nmap_udp_ports": "0",
"open|filtered": "n",
"options": "",
"org_id": 1,
"orgs.id": 1,
"ping": "y",
"ports_in_order": "n",
"ports_stop_after": "0",
"script_timeout": "0",
"service_version": "n",
"snmp_timeout": "0",
"ssh_ports": "22",
"ssh_timeout": "0",
"tcp_ports": "22,135,62078",
"timeout": "0",
"timing": "4",
"udp_ports": "161",
"wmi_timeout": "0"
},
"id": 1,
"links":
{
"self": "http://dev.local/omk/open-audit/discovery_scan_options/1"
},
"type": "discovery_scan_options"
},
{
"attributes":
{
"ad_group": "open-audit_orgs_default_organisation",
"description": "",
"device_count": 0,
"edited_by": "system",
"edited_date": "2000-01-01 00:00:00",
"id": 1,
"name": "Default Organisation",
"parent_id": 1,
"type": "organisation"
},
"id": 1,
"links":
{
"self": "http://dev.local/omk/open-audit/orgs/1"
},
"type": "orgs"
}
],
"issues":
[],
"links":
{
"first": "http://dev.local/omk/open-audit/discoveries/3",
"last": "http://dev.local/omk/open-audit/discoveries/3",
"next": "http://dev.local/omk/open-audit/discoveries/3",
"prev": "http://dev.local/omk/open-audit/discoveries/3",
"self": "http://dev.local/omk/open-audit/discoveries/3"
},
"meta":
{
"access_token": "ef4421add7e6f2741a2830a1b0262d3b678cc33efdacdd9442d5a871f474",
"action": "read",
"as_at": "",
"baseurl": "http://dev.local/omk/open-audit",
"collection": "discoveries",
"current": "y",
"data_order":
[
"discoveries.id",
"discoveries.name",
"discoveries.org_id",
"discoveries.description",
"discoveries.type",
"discoveries.subnet",
"discoveries.seed_ip",
"discoveries.seed_restrict_to_subnet",
"discoveries.seed_restrict_to_private",
"discoveries.seed_ping",
"discoveries.ad_domain",
"discoveries.ad_server",
"discoveries.devices_assigned_to_org",
"discoveries.devices_assigned_to_location",
"discoveries.network_address",
"discoveries.system_id",
"discoveries.scan_options",
"discoveries.match_options",
"discoveries.command_options",
"discoveries.discard",
"discoveries.last_run",
"discoveries.last_finished",
"discoveries.duration",
"discoveries.status",
"discoveries.ip_all_count",
"discoveries.ip_responding_count",
"discoveries.ip_scanned_count",
"discoveries.ip_discovered_count",
"discoveries.ip_audited_count",
"discoveries.cloud_id",
"discoveries.cloud_name",
"discoveries.edited_by",
"discoveries.edited_date",
"orgs.id",
"system.id"
],
"debug": false,
"filter": [],
"filtered": 1,
"format": "json",
"groupby": "",
"header": "HTTP/1.1 200 OK",
"heading": "Discoveries",
"id": 3,
"include": "",
"limit": 1000,
"nmap_version": 7,
"offset": 0,
"properties": ".*",
"query_parameters": [],
"query_string": "",
"received_data": [],
"request_method": "GET",
"requestor": "commercial",
"server_app_version": "4.3.0",
"server_platform": "Debian GNU/Linux 9 (stretch)",
"sort": "",
"sub_resource": "",
"timestamp": "2021-11-29 13:24:45",
"timezone": "UTC +1000",
"total": 1,
"version": 1
}
} |
...
Logon as above, then.
Request
Section | |||
---|---|---|---|
URL | PATCH | http://localhost/omk/open-audit/discoveries/5 | |
Headers | Accept | application/json | |
Body | Type | x-www-form-urlencoded | |
Key | data | { |
...
Logon as above, then.
Request
Section | ||
---|---|---|
URL | DELETE | http://localhost/omk/open-audit/discoveries/5 |
Headers | Accept | application/json |
...