Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

...

Logon

Request

Section


URLPOSThttp://localhost/omk/open-audit/login
HeadersAcceptapplication/json
BodyTypeform-data

Keyusernameadmin

Keypasswordpassword

...

Logon as above, then.

Request

Section

URLGEThttp://localhost/omk/open-audit/devices
HeadersAcceptapplication/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


URLPOSThttp://localhost/omk/open-audit/discoveries
HeadersAcceptapplication/json
BodyTypeform-data

Keydata
    {
        "access_token": "bcb3f959c14f0daf959e3de92e4213201a56bc205e31b63f35c3f9299670",
      "type": "discoveries",
        "attributes":
        {
            "description": "Subnet - 192.168.1.0/24",
            "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",
            "org_id": 1,
            "scan_options": "{\"exclude_ip\":\"\",\"exclude_tcp_ports\":\"\",\"exclude_udp_ports\":\"\",\"filtered\":\"\",\"id\":\"1\",\"nmap_tcp_ports\":\"\",\"nmap_udp_ports\":\"\",\"open|filtered\":\"\",\"ping\":\"\",\"service_version\":\"\",\"ssh_ports\":\"\",\"tcp_ports\":\"\",\"timeout\":\"\",\"timing\":\"\",\"udp_ports\":\"\",\"script_timeout\":\"\",\"snmp_timeout\":\"\",\"ssh_timeout\":\"\",\"wmi_timeout\":\"\"}",
          "subnet": "192.168.1.0/24",
            "type": "subnet"
      }
    }

...

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"
        }
    ],
    "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"
    }"issues": [],
    "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


URLPATCHhttp://localhost/omk/open-audit/discoveries/5
HeadersAcceptapplication/json
BodyTypex-www-form-urlencoded

Keydata
{
   "id": 5,
   "type": "discoveries",
   "attributes": {
      "name": "My New Name OMK"
   }
}

...

Logon as above, then.

Request

Section

URLDELETEhttp://localhost/omk/open-audit/discoveries/5
HeadersAcceptapplication/json

...