Chilkat Online Tools

DataFlex / Datadog API Collection / Get all hosts for your organization

Back to Collection Items

Use ChilkatAx-9.5.0-win32.pkg

Procedure Test
    Handle hoHttp
    Boolean iSuccess
    Variant vQueryParams
    Handle hoQueryParams
    Variant vResp
    Handle hoResp
    Variant vSbResponseBody
    Handle hoSbResponseBody
    Handle hoJResp
    Integer iRespStatusCode
    String sAws_name
    String sHost_name
    Integer iId
    Boolean iIs_muted
    Integer iLast_reported_time
    String sAgent_version
    Integer iCpuCores
    String sGohai
    String sInstaller_version
    String sTool
    String sTool_version
    String sMachine
    String sPlatform
    String sProcessor
    String sPythonV
    String sSocket_fqdn
    String sSocket_hostname
    Integer iCpu
    String sIowait
    String sLoad
    Integer iMute_timeout
    String sName
    Boolean iUp
    Integer j
    Integer iCount_j
    String sStrVal
    Integer k
    Integer iCount_k
    Integer iTotal_matching
    Integer iTotal_returned
    Integer i
    Integer iCount_i
    String sTemp1
    Boolean bTemp1

    // This example assumes the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    Get Create (RefClass(cComChilkatHttp)) To hoHttp
    If (Not(IsComObjectCreated(hoHttp))) Begin
        Send CreateComObject of hoHttp
    End

    Get Create (RefClass(cComChilkatJsonObject)) To hoQueryParams
    If (Not(IsComObjectCreated(hoQueryParams))) Begin
        Send CreateComObject of hoQueryParams
    End
    Get ComUpdateString Of hoQueryParams "filter" "tempor Ut sed velit" To iSuccess
    Get ComUpdateString Of hoQueryParams "sort_field" "tempor Ut sed velit" To iSuccess
    Get ComUpdateString Of hoQueryParams "sort_dir" "tempor Ut sed velit" To iSuccess
    Get ComUpdateInt Of hoQueryParams "start" -62147425 To iSuccess
    Get ComUpdateInt Of hoQueryParams "count" -62147425 To iSuccess
    Get ComUpdateInt Of hoQueryParams "from" -62147425 To iSuccess
    Get ComUpdateString Of hoQueryParams "include_muted_hosts_data" "true" To iSuccess
    Get ComUpdateString Of hoQueryParams "include_hosts_metadata" "true" To iSuccess

    Send ComSetRequestHeader To hoHttp "Accept" "application/json"

    Get pvComObject of hoQueryParams to vQueryParams
    Get ComQuickRequestParams Of hoHttp "GET" "https://api.app.ddog-gov.com/api/v1/hosts" vQueryParams To vResp
    If (IsComObject(vResp)) Begin
        Get Create (RefClass(cComChilkatHttpResponse)) To hoResp
        Set pvComObject Of hoResp To vResp
    End
    Get ComLastMethodSuccess Of hoHttp To bTemp1
    If (bTemp1 = False) Begin
        Get ComLastErrorText Of hoHttp To sTemp1
        Showln sTemp1
        Procedure_Return
    End

    Get Create (RefClass(cComChilkatStringBuilder)) To hoSbResponseBody
    If (Not(IsComObjectCreated(hoSbResponseBody))) Begin
        Send CreateComObject of hoSbResponseBody
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComGetBodySb Of hoResp vSbResponseBody To iSuccess

    Get Create (RefClass(cComChilkatJsonObject)) To hoJResp
    If (Not(IsComObjectCreated(hoJResp))) Begin
        Send CreateComObject of hoJResp
    End
    Get pvComObject of hoSbResponseBody to vSbResponseBody
    Get ComLoadSb Of hoJResp vSbResponseBody To iSuccess
    Set ComEmitCompact Of hoJResp To False

    Showln "Response Body:"
    Get ComEmit Of hoJResp To sTemp1
    Showln sTemp1

    Get ComStatusCode Of hoResp To iRespStatusCode
    Showln "Response Status Code = " iRespStatusCode
    If (iRespStatusCode >= 400) Begin
        Showln "Response Header:"
        Get ComHeader Of hoResp To sTemp1
        Showln sTemp1
        Showln "Failed."
        Send Destroy of hoResp
        Procedure_Return
    End

    Send Destroy of hoResp

    // Sample JSON response:
    // (Sample code for parsing the JSON response is shown below)

    // {
    //   "host_list": [
    //     {
    //       "aliases": [
    //         "mycoolhost-1",
    //         "mycoolhost-1"
    //       ],
    //       "apps": [
    //         "agent",
    //         "agent"
    //       ],
    //       "aws_name": "mycoolhost-1",
    //       "host_name": "i-deadbeef",
    //       "id": 123456,
    //       "is_muted": false,
    //       "last_reported_time": 1565000000,
    //       "meta": {
    //         "agent_checks": [
    //           [
    //             "ntp",
    //             "ntp",
    //             "ntp:d884b5186b651429",
    //             "OK",
    //             "",
    //             ""
    //           ],
    //           [
    //             "ntp",
    //             "ntp",
    //             "ntp:d884b5186b651429",
    //             "OK",
    //             "",
    //             ""
    //           ]
    //         ],
    //         "agent_version": "7.32.3",
    //         "cpuCores": 1,
    //         "fbsdV": [
    //           "FreeBSD",
    //           "FreeBSD"
    //         ],
    //         "gohai": "{\"cpu\":{\"cache_size\":\"8192 KB\",\"cpu_cores\":\"1\",\"cpu_logical_processors\":\"1\",\"family\":\"6\",\"mhz\":\"2712.000\",\"model\":\"142\",\"model_name\":\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\"stepping\":\"10\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"3966896\",\"mounted_on\":\"/dev\",\"name\":\"udev\"},{\"kb_size\":\"797396\",\"mounted_on\":\"/run\",\"name\":\"tmpfs\"},{\"kb_size\":\"64800356\",\"mounted_on\":\"/\",\"name\":\"/dev/mapper/vagrant--vg-root\"},{\"kb_size\":\"3986972\",\"mounted_on\":\"/dev/shm\",\"name\":\"tmpfs\"},{\"kb_size\":\"5120\",\"mounted_on\":\"/run/lock\",\"name\":\"tmpfs\"},{\"kb_size\":\"3986972\",\"mounted_on\":\"/sys/fs/cgroup\",\"name\":\"tmpfs\"},{\"kb_size\":\"488245288\",\"mounted_on\":\"/vagrant\",\"name\":\"vagrant\"},{\"kb_size\":\"797392\",\"mounted_on\":\"/run/user/1000\",\"name\":\"tmpfs\"}],\"memory\":{\"swap_total\":\"1003516kB\",\"total\":\"7973944kB\"},\"network\":{\"interfaces\":[{\"ipv4\":\"10.0.2.15\",\"ipv4-network\":\"10.0.2.0/24\",\"ipv6\":\"fe80::a00:27ff:fec2:be11\",\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"08:00:27:c2:be:11\",\"name\":\"eth0\"},{\"ipv4\":\"192.168.122.1\",\"ipv4-network\":\"192.168.122.0/24\",\"macaddress\":\"52:54:00:6f:1c:bf\",\"name\":\"virbr0\"}],\"ipaddress\":\"10.0.2.15\",\"ipaddressv6\":\"fe80::a00:27ff:fec2:be11\",\"macaddress\":\"08:00:27:c2:be:11\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"linux\",\"goV\":\"1.16.7\",\"hardware_platform\":\"x86_64\",\"hostname\":\"vagrant\",\"kernel_name\":\"Linux\",\"kernel_release\":\"4.15.0-29-generic\",\"kernel_version\":\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\",\"machine\":\"x86_64\",\"os\":\"GNU/Linux\",\"processor\":\"x86_64\",\"pythonV\":\"2.7.15rc1\"}}",
    //         "install_method": {
    //           "installer_version": "install_script-1.7.1",
    //           "tool": "install_script",
    //           "tool_version": "install_script"
    //         },
    //         "macV": [
    //           "Mac",
    //           "Mac"
    //         ],
    //         "machine": "amd64",
    //         "nixV": [
    //           "Ubuntu",
    //           "Ubuntu"
    //         ],
    //         "platform": "linux",
    //         "processor": "Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz",
    //         "pythonV": "3.8.11",
    //         "socket-fqdn": "vagrant.vm.",
    //         "socket-hostname": "vagrant",
    //         "winV": [
    //           "Windows",
    //           "Windows"
    //         ]
    //       },
    //       "metrics": {
    //         "cpu": 99,
    //         "iowait": 3.2,
    //         "load": 0.5
    //       },
    //       "mute_timeout": 29442737,
    //       "name": "i-hostname",
    //       "sources": [
    //         "aws",
    //         "aws"
    //       ],
    //       "tags_by_source": {
    //         "magna_": [
    //           "test.example.com.host",
    //           "test.example.com.host"
    //         ]
    //       },
    //       "up": true
    //     },
    //     {
    //       "aliases": [
    //         "mycoolhost-1",
    //         "mycoolhost-1"
    //       ],
    //       "apps": [
    //         "agent",
    //         "agent"
    //       ],
    //       "aws_name": "mycoolhost-1",
    //       "host_name": "i-deadbeef",
    //       "id": 123456,
    //       "is_muted": false,
    //       "last_reported_time": 1565000000,
    //       "meta": {
    //         "agent_checks": [
    //           [
    //             "ntp",
    //             "ntp",
    //             "ntp:d884b5186b651429",
    //             "OK",
    //             "",
    //             ""
    //           ],
    //           [
    //             "ntp",
    //             "ntp",
    //             "ntp:d884b5186b651429",
    //             "OK",
    //             "",
    //             ""
    //           ]
    //         ],
    //         "agent_version": "7.32.3",
    //         "cpuCores": 1,
    //         "fbsdV": [
    //           "FreeBSD",
    //           "FreeBSD"
    //         ],
    //         "gohai": "{\"cpu\":{\"cache_size\":\"8192 KB\",\"cpu_cores\":\"1\",\"cpu_logical_processors\":\"1\",\"family\":\"6\",\"mhz\":\"2712.000\",\"model\":\"142\",\"model_name\":\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\"stepping\":\"10\",\"vendor_id\":\"GenuineIntel\"},\"filesystem\":[{\"kb_size\":\"3966896\",\"mounted_on\":\"/dev\",\"name\":\"udev\"},{\"kb_size\":\"797396\",\"mounted_on\":\"/run\",\"name\":\"tmpfs\"},{\"kb_size\":\"64800356\",\"mounted_on\":\"/\",\"name\":\"/dev/mapper/vagrant--vg-root\"},{\"kb_size\":\"3986972\",\"mounted_on\":\"/dev/shm\",\"name\":\"tmpfs\"},{\"kb_size\":\"5120\",\"mounted_on\":\"/run/lock\",\"name\":\"tmpfs\"},{\"kb_size\":\"3986972\",\"mounted_on\":\"/sys/fs/cgroup\",\"name\":\"tmpfs\"},{\"kb_size\":\"488245288\",\"mounted_on\":\"/vagrant\",\"name\":\"vagrant\"},{\"kb_size\":\"797392\",\"mounted_on\":\"/run/user/1000\",\"name\":\"tmpfs\"}],\"memory\":{\"swap_total\":\"1003516kB\",\"total\":\"7973944kB\"},\"network\":{\"interfaces\":[{\"ipv4\":\"10.0.2.15\",\"ipv4-network\":\"10.0.2.0/24\",\"ipv6\":\"fe80::a00:27ff:fec2:be11\",\"ipv6-network\":\"fe80::/64\",\"macaddress\":\"08:00:27:c2:be:11\",\"name\":\"eth0\"},{\"ipv4\":\"192.168.122.1\",\"ipv4-network\":\"192.168.122.0/24\",\"macaddress\":\"52:54:00:6f:1c:bf\",\"name\":\"virbr0\"}],\"ipaddress\":\"10.0.2.15\",\"ipaddressv6\":\"fe80::a00:27ff:fec2:be11\",\"macaddress\":\"08:00:27:c2:be:11\"},\"platform\":{\"GOOARCH\":\"amd64\",\"GOOS\":\"linux\",\"goV\":\"1.16.7\",\"hardware_platform\":\"x86_64\",\"hostname\":\"vagrant\",\"kernel_name\":\"Linux\",\"kernel_release\":\"4.15.0-29-generic\",\"kernel_version\":\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\",\"machine\":\"x86_64\",\"os\":\"GNU/Linux\",\"processor\":\"x86_64\",\"pythonV\":\"2.7.15rc1\"}}",
    //         "install_method": {
    //           "installer_version": "install_script-1.7.1",
    //           "tool": "install_script",
    //           "tool_version": "install_script"
    //         },
    //         "macV": [
    //           "Mac",
    //           "Mac"
    //         ],
    //         "machine": "amd64",
    //         "nixV": [
    //           "Ubuntu",
    //           "Ubuntu"
    //         ],
    //         "platform": "linux",
    //         "processor": "Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz",
    //         "pythonV": "3.8.11",
    //         "socket-fqdn": "vagrant.vm.",
    //         "socket-hostname": "vagrant",
    //         "winV": [
    //           "Windows",
    //           "Windows"
    //         ]
    //       },
    //       "metrics": {
    //         "cpu": 99,
    //         "iowait": 3.2,
    //         "load": 0.5
    //       },
    //       "mute_timeout": 54283511,
    //       "name": "i-hostname",
    //       "sources": [
    //         "aws",
    //         "aws"
    //       ],
    //       "tags_by_source": {
    //         "non_4e8": [
    //           "test.example.com.host",
    //           "test.example.com.host"
    //         ],
    //         "officia__d4": [
    //           "test.example.com.host",
    //           "test.example.com.host"
    //         ]
    //       },
    //       "up": true
    //     }
    //   ],
    //   "total_matching": 1,
    //   "total_returned": 1
    // }

    // Sample code for parsing the JSON response...
    // Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    Get ComIntOf Of hoJResp "total_matching" To iTotal_matching
    Get ComIntOf Of hoJResp "total_returned" To iTotal_returned
    Move 0 To i
    Get ComSizeOfArray Of hoJResp "host_list" To iCount_i
    While (i < iCount_i)
        Set ComI Of hoJResp To i
        Get ComStringOf Of hoJResp "host_list[i].aws_name" To sAws_name
        Get ComStringOf Of hoJResp "host_list[i].host_name" To sHost_name
        Get ComIntOf Of hoJResp "host_list[i].id" To iId
        Get ComBoolOf Of hoJResp "host_list[i].is_muted" To iIs_muted
        Get ComIntOf Of hoJResp "host_list[i].last_reported_time" To iLast_reported_time
        Get ComStringOf Of hoJResp "host_list[i].meta.agent_version" To sAgent_version
        Get ComIntOf Of hoJResp "host_list[i].meta.cpuCores" To iCpuCores
        Get ComStringOf Of hoJResp "host_list[i].meta.gohai" To sGohai
        Get ComStringOf Of hoJResp "host_list[i].meta.install_method.installer_version" To sInstaller_version
        Get ComStringOf Of hoJResp "host_list[i].meta.install_method.tool" To sTool
        Get ComStringOf Of hoJResp "host_list[i].meta.install_method.tool_version" To sTool_version
        Get ComStringOf Of hoJResp "host_list[i].meta.machine" To sMachine
        Get ComStringOf Of hoJResp "host_list[i].meta.platform" To sPlatform
        Get ComStringOf Of hoJResp "host_list[i].meta.processor" To sProcessor
        Get ComStringOf Of hoJResp "host_list[i].meta.pythonV" To sPythonV
        Get ComStringOf Of hoJResp "host_list[i].meta.socket-fqdn" To sSocket_fqdn
        Get ComStringOf Of hoJResp "host_list[i].meta.socket-hostname" To sSocket_hostname
        Get ComIntOf Of hoJResp "host_list[i].metrics.cpu" To iCpu
        Get ComStringOf Of hoJResp "host_list[i].metrics.iowait" To sIowait
        Get ComStringOf Of hoJResp "host_list[i].metrics.load" To sLoad
        Get ComIntOf Of hoJResp "host_list[i].mute_timeout" To iMute_timeout
        Get ComStringOf Of hoJResp "host_list[i].name" To sName
        Get ComBoolOf Of hoJResp "host_list[i].up" To iUp
        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].aliases" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].aliases[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].apps" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].apps[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].meta.agent_checks" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Move 0 To k
            Get ComSizeOfArray Of hoJResp "host_list[i].meta.agent_checks[j]" To iCount_k
            While (k < iCount_k)
                Set ComK Of hoJResp To k
                Get ComStringOf Of hoJResp "host_list[i].meta.agent_checks[j][k]" To sStrVal
                Move (k + 1) To k
            Loop

            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].meta.fbsdV" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].meta.fbsdV[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].meta.macV" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].meta.macV[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].meta.nixV" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].meta.nixV[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].meta.winV" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].meta.winV[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].sources" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].sources[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].tags_by_source.magna_" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].tags_by_source.magna_[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].tags_by_source.non_4e8" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].tags_by_source.non_4e8[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move 0 To j
        Get ComSizeOfArray Of hoJResp "host_list[i].tags_by_source.officia__d4" To iCount_j
        While (j < iCount_j)
            Set ComJ Of hoJResp To j
            Get ComStringOf Of hoJResp "host_list[i].tags_by_source.officia__d4[j]" To sStrVal
            Move (j + 1) To j
        Loop

        Move (i + 1) To i
    Loop



End_Procedure

Curl Command

curl -G -d "filter=tempor%20Ut%20sed%20velit"
	-d "sort_field=tempor%20Ut%20sed%20velit"
	-d "sort_dir=tempor%20Ut%20sed%20velit"
	-d "start=-62147425"
	-d "count=-62147425"
	-d "from=-62147425"
	-d "include_muted_hosts_data=true"
	-d "include_hosts_metadata=true"
	-H "Accept: application/json"
https://api.app.ddog-gov.com/api/v1/hosts

Postman Collection Item JSON

{
  "name": "Get all hosts for your organization",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v1/hosts?filter=tempor Ut sed velit&sort_field=tempor Ut sed velit&sort_dir=tempor Ut sed velit&start=-62147425&count=-62147425&from=-62147425&include_muted_hosts_data=true&include_hosts_metadata=true",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "hosts"
      ],
      "query": [
        {
          "key": "filter",
          "value": "tempor Ut sed velit",
          "description": "String to filter search results."
        },
        {
          "key": "sort_field",
          "value": "tempor Ut sed velit",
          "description": "Sort hosts by this field."
        },
        {
          "key": "sort_dir",
          "value": "tempor Ut sed velit",
          "description": "Direction of sort. Options include `asc` and `desc`."
        },
        {
          "key": "start",
          "value": "-62147425",
          "description": "Host result to start search from."
        },
        {
          "key": "count",
          "value": "-62147425",
          "description": "Number of hosts to return. Max 1000."
        },
        {
          "key": "from",
          "value": "-62147425",
          "description": "Number of seconds since UNIX epoch from which you want to search your hosts."
        },
        {
          "key": "include_muted_hosts_data",
          "value": "true",
          "description": "Include information on the muted status of hosts and when the mute expires."
        },
        {
          "key": "include_hosts_metadata",
          "value": "true",
          "description": "Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.)."
        }
      ]
    },
    "description": "This endpoint allows searching for hosts by name, alias, or tag.\nHosts live within the past 3 hours are included by default.\nRetention is 7 days.\nResults are paginated with a max of 1000 results at a time."
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/hosts?filter=tempor Ut sed velit&sort_field=tempor Ut sed velit&sort_dir=tempor Ut sed velit&start=-62147425&count=-62147425&from=-62147425&include_muted_hosts_data=true&include_hosts_metadata=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "hosts"
          ],
          "query": [
            {
              "key": "filter",
              "value": "tempor Ut sed velit",
              "description": "String to filter search results."
            },
            {
              "key": "sort_field",
              "value": "tempor Ut sed velit",
              "description": "Sort hosts by this field."
            },
            {
              "key": "sort_dir",
              "value": "tempor Ut sed velit",
              "description": "Direction of sort. Options include `asc` and `desc`."
            },
            {
              "key": "start",
              "value": "-62147425",
              "description": "Host result to start search from."
            },
            {
              "key": "count",
              "value": "-62147425",
              "description": "Number of hosts to return. Max 1000."
            },
            {
              "key": "from",
              "value": "-62147425",
              "description": "Number of seconds since UNIX epoch from which you want to search your hosts."
            },
            {
              "key": "include_muted_hosts_data",
              "value": "true",
              "description": "Include information on the muted status of hosts and when the mute expires."
            },
            {
              "key": "include_hosts_metadata",
              "value": "true",
              "description": "Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.)."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"host_list\": [\n    {\n      \"aliases\": [\n        \"mycoolhost-1\",\n        \"mycoolhost-1\"\n      ],\n      \"apps\": [\n        \"agent\",\n        \"agent\"\n      ],\n      \"aws_name\": \"mycoolhost-1\",\n      \"host_name\": \"i-deadbeef\",\n      \"id\": 123456,\n      \"is_muted\": false,\n      \"last_reported_time\": 1565000000,\n      \"meta\": {\n        \"agent_checks\": [\n          [\n            \"ntp\",\n            \"ntp\",\n            \"ntp:d884b5186b651429\",\n            \"OK\",\n            \"\",\n            \"\"\n          ],\n          [\n            \"ntp\",\n            \"ntp\",\n            \"ntp:d884b5186b651429\",\n            \"OK\",\n            \"\",\n            \"\"\n          ]\n        ],\n        \"agent_version\": \"7.32.3\",\n        \"cpuCores\": 1,\n        \"fbsdV\": [\n          \"FreeBSD\",\n          \"FreeBSD\"\n        ],\n        \"gohai\": \"{\\\"cpu\\\":{\\\"cache_size\\\":\\\"8192 KB\\\",\\\"cpu_cores\\\":\\\"1\\\",\\\"cpu_logical_processors\\\":\\\"1\\\",\\\"family\\\":\\\"6\\\",\\\"mhz\\\":\\\"2712.000\\\",\\\"model\\\":\\\"142\\\",\\\"model_name\\\":\\\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\\\",\\\"stepping\\\":\\\"10\\\",\\\"vendor_id\\\":\\\"GenuineIntel\\\"},\\\"filesystem\\\":[{\\\"kb_size\\\":\\\"3966896\\\",\\\"mounted_on\\\":\\\"/dev\\\",\\\"name\\\":\\\"udev\\\"},{\\\"kb_size\\\":\\\"797396\\\",\\\"mounted_on\\\":\\\"/run\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"64800356\\\",\\\"mounted_on\\\":\\\"/\\\",\\\"name\\\":\\\"/dev/mapper/vagrant--vg-root\\\"},{\\\"kb_size\\\":\\\"3986972\\\",\\\"mounted_on\\\":\\\"/dev/shm\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"5120\\\",\\\"mounted_on\\\":\\\"/run/lock\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"3986972\\\",\\\"mounted_on\\\":\\\"/sys/fs/cgroup\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"488245288\\\",\\\"mounted_on\\\":\\\"/vagrant\\\",\\\"name\\\":\\\"vagrant\\\"},{\\\"kb_size\\\":\\\"797392\\\",\\\"mounted_on\\\":\\\"/run/user/1000\\\",\\\"name\\\":\\\"tmpfs\\\"}],\\\"memory\\\":{\\\"swap_total\\\":\\\"1003516kB\\\",\\\"total\\\":\\\"7973944kB\\\"},\\\"network\\\":{\\\"interfaces\\\":[{\\\"ipv4\\\":\\\"10.0.2.15\\\",\\\"ipv4-network\\\":\\\"10.0.2.0/24\\\",\\\"ipv6\\\":\\\"fe80::a00:27ff:fec2:be11\\\",\\\"ipv6-network\\\":\\\"fe80::/64\\\",\\\"macaddress\\\":\\\"08:00:27:c2:be:11\\\",\\\"name\\\":\\\"eth0\\\"},{\\\"ipv4\\\":\\\"192.168.122.1\\\",\\\"ipv4-network\\\":\\\"192.168.122.0/24\\\",\\\"macaddress\\\":\\\"52:54:00:6f:1c:bf\\\",\\\"name\\\":\\\"virbr0\\\"}],\\\"ipaddress\\\":\\\"10.0.2.15\\\",\\\"ipaddressv6\\\":\\\"fe80::a00:27ff:fec2:be11\\\",\\\"macaddress\\\":\\\"08:00:27:c2:be:11\\\"},\\\"platform\\\":{\\\"GOOARCH\\\":\\\"amd64\\\",\\\"GOOS\\\":\\\"linux\\\",\\\"goV\\\":\\\"1.16.7\\\",\\\"hardware_platform\\\":\\\"x86_64\\\",\\\"hostname\\\":\\\"vagrant\\\",\\\"kernel_name\\\":\\\"Linux\\\",\\\"kernel_release\\\":\\\"4.15.0-29-generic\\\",\\\"kernel_version\\\":\\\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\\\",\\\"machine\\\":\\\"x86_64\\\",\\\"os\\\":\\\"GNU/Linux\\\",\\\"processor\\\":\\\"x86_64\\\",\\\"pythonV\\\":\\\"2.7.15rc1\\\"}}\",\n        \"install_method\": {\n          \"installer_version\": \"install_script-1.7.1\",\n          \"tool\": \"install_script\",\n          \"tool_version\": \"install_script\"\n        },\n        \"macV\": [\n          \"Mac\",\n          \"Mac\"\n        ],\n        \"machine\": \"amd64\",\n        \"nixV\": [\n          \"Ubuntu\",\n          \"Ubuntu\"\n        ],\n        \"platform\": \"linux\",\n        \"processor\": \"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\n        \"pythonV\": \"3.8.11\",\n        \"socket-fqdn\": \"vagrant.vm.\",\n        \"socket-hostname\": \"vagrant\",\n        \"winV\": [\n          \"Windows\",\n          \"Windows\"\n        ]\n      },\n      \"metrics\": {\n        \"cpu\": 99,\n        \"iowait\": 3.2,\n        \"load\": 0.5\n      },\n      \"mute_timeout\": 29442737,\n      \"name\": \"i-hostname\",\n      \"sources\": [\n        \"aws\",\n        \"aws\"\n      ],\n      \"tags_by_source\": {\n        \"magna_\": [\n          \"test.example.com.host\",\n          \"test.example.com.host\"\n        ]\n      },\n      \"up\": true\n    },\n    {\n      \"aliases\": [\n        \"mycoolhost-1\",\n        \"mycoolhost-1\"\n      ],\n      \"apps\": [\n        \"agent\",\n        \"agent\"\n      ],\n      \"aws_name\": \"mycoolhost-1\",\n      \"host_name\": \"i-deadbeef\",\n      \"id\": 123456,\n      \"is_muted\": false,\n      \"last_reported_time\": 1565000000,\n      \"meta\": {\n        \"agent_checks\": [\n          [\n            \"ntp\",\n            \"ntp\",\n            \"ntp:d884b5186b651429\",\n            \"OK\",\n            \"\",\n            \"\"\n          ],\n          [\n            \"ntp\",\n            \"ntp\",\n            \"ntp:d884b5186b651429\",\n            \"OK\",\n            \"\",\n            \"\"\n          ]\n        ],\n        \"agent_version\": \"7.32.3\",\n        \"cpuCores\": 1,\n        \"fbsdV\": [\n          \"FreeBSD\",\n          \"FreeBSD\"\n        ],\n        \"gohai\": \"{\\\"cpu\\\":{\\\"cache_size\\\":\\\"8192 KB\\\",\\\"cpu_cores\\\":\\\"1\\\",\\\"cpu_logical_processors\\\":\\\"1\\\",\\\"family\\\":\\\"6\\\",\\\"mhz\\\":\\\"2712.000\\\",\\\"model\\\":\\\"142\\\",\\\"model_name\\\":\\\"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\\\",\\\"stepping\\\":\\\"10\\\",\\\"vendor_id\\\":\\\"GenuineIntel\\\"},\\\"filesystem\\\":[{\\\"kb_size\\\":\\\"3966896\\\",\\\"mounted_on\\\":\\\"/dev\\\",\\\"name\\\":\\\"udev\\\"},{\\\"kb_size\\\":\\\"797396\\\",\\\"mounted_on\\\":\\\"/run\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"64800356\\\",\\\"mounted_on\\\":\\\"/\\\",\\\"name\\\":\\\"/dev/mapper/vagrant--vg-root\\\"},{\\\"kb_size\\\":\\\"3986972\\\",\\\"mounted_on\\\":\\\"/dev/shm\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"5120\\\",\\\"mounted_on\\\":\\\"/run/lock\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"3986972\\\",\\\"mounted_on\\\":\\\"/sys/fs/cgroup\\\",\\\"name\\\":\\\"tmpfs\\\"},{\\\"kb_size\\\":\\\"488245288\\\",\\\"mounted_on\\\":\\\"/vagrant\\\",\\\"name\\\":\\\"vagrant\\\"},{\\\"kb_size\\\":\\\"797392\\\",\\\"mounted_on\\\":\\\"/run/user/1000\\\",\\\"name\\\":\\\"tmpfs\\\"}],\\\"memory\\\":{\\\"swap_total\\\":\\\"1003516kB\\\",\\\"total\\\":\\\"7973944kB\\\"},\\\"network\\\":{\\\"interfaces\\\":[{\\\"ipv4\\\":\\\"10.0.2.15\\\",\\\"ipv4-network\\\":\\\"10.0.2.0/24\\\",\\\"ipv6\\\":\\\"fe80::a00:27ff:fec2:be11\\\",\\\"ipv6-network\\\":\\\"fe80::/64\\\",\\\"macaddress\\\":\\\"08:00:27:c2:be:11\\\",\\\"name\\\":\\\"eth0\\\"},{\\\"ipv4\\\":\\\"192.168.122.1\\\",\\\"ipv4-network\\\":\\\"192.168.122.0/24\\\",\\\"macaddress\\\":\\\"52:54:00:6f:1c:bf\\\",\\\"name\\\":\\\"virbr0\\\"}],\\\"ipaddress\\\":\\\"10.0.2.15\\\",\\\"ipaddressv6\\\":\\\"fe80::a00:27ff:fec2:be11\\\",\\\"macaddress\\\":\\\"08:00:27:c2:be:11\\\"},\\\"platform\\\":{\\\"GOOARCH\\\":\\\"amd64\\\",\\\"GOOS\\\":\\\"linux\\\",\\\"goV\\\":\\\"1.16.7\\\",\\\"hardware_platform\\\":\\\"x86_64\\\",\\\"hostname\\\":\\\"vagrant\\\",\\\"kernel_name\\\":\\\"Linux\\\",\\\"kernel_release\\\":\\\"4.15.0-29-generic\\\",\\\"kernel_version\\\":\\\"#31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018\\\",\\\"machine\\\":\\\"x86_64\\\",\\\"os\\\":\\\"GNU/Linux\\\",\\\"processor\\\":\\\"x86_64\\\",\\\"pythonV\\\":\\\"2.7.15rc1\\\"}}\",\n        \"install_method\": {\n          \"installer_version\": \"install_script-1.7.1\",\n          \"tool\": \"install_script\",\n          \"tool_version\": \"install_script\"\n        },\n        \"macV\": [\n          \"Mac\",\n          \"Mac\"\n        ],\n        \"machine\": \"amd64\",\n        \"nixV\": [\n          \"Ubuntu\",\n          \"Ubuntu\"\n        ],\n        \"platform\": \"linux\",\n        \"processor\": \"Intel(R) Core(TM) i7-8559U CPU @ 2.70GHz\",\n        \"pythonV\": \"3.8.11\",\n        \"socket-fqdn\": \"vagrant.vm.\",\n        \"socket-hostname\": \"vagrant\",\n        \"winV\": [\n          \"Windows\",\n          \"Windows\"\n        ]\n      },\n      \"metrics\": {\n        \"cpu\": 99,\n        \"iowait\": 3.2,\n        \"load\": 0.5\n      },\n      \"mute_timeout\": 54283511,\n      \"name\": \"i-hostname\",\n      \"sources\": [\n        \"aws\",\n        \"aws\"\n      ],\n      \"tags_by_source\": {\n        \"non_4e8\": [\n          \"test.example.com.host\",\n          \"test.example.com.host\"\n        ],\n        \"officia__d4\": [\n          \"test.example.com.host\",\n          \"test.example.com.host\"\n        ]\n      },\n      \"up\": true\n    }\n  ],\n  \"total_matching\": 1,\n  \"total_returned\": 1\n}"
    },
    {
      "name": "Invalid Parameter Error",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/hosts?filter=tempor Ut sed velit&sort_field=tempor Ut sed velit&sort_dir=tempor Ut sed velit&start=-62147425&count=-62147425&from=-62147425&include_muted_hosts_data=true&include_hosts_metadata=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "hosts"
          ],
          "query": [
            {
              "key": "filter",
              "value": "tempor Ut sed velit",
              "description": "String to filter search results."
            },
            {
              "key": "sort_field",
              "value": "tempor Ut sed velit",
              "description": "Sort hosts by this field."
            },
            {
              "key": "sort_dir",
              "value": "tempor Ut sed velit",
              "description": "Direction of sort. Options include `asc` and `desc`."
            },
            {
              "key": "start",
              "value": "-62147425",
              "description": "Host result to start search from."
            },
            {
              "key": "count",
              "value": "-62147425",
              "description": "Number of hosts to return. Max 1000."
            },
            {
              "key": "from",
              "value": "-62147425",
              "description": "Number of seconds since UNIX epoch from which you want to search your hosts."
            },
            {
              "key": "include_muted_hosts_data",
              "value": "true",
              "description": "Include information on the muted status of hosts and when the mute expires."
            },
            {
              "key": "include_hosts_metadata",
              "value": "true",
              "description": "Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.)."
            }
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    },
    {
      "name": "Forbidden",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/hosts?filter=tempor Ut sed velit&sort_field=tempor Ut sed velit&sort_dir=tempor Ut sed velit&start=-62147425&count=-62147425&from=-62147425&include_muted_hosts_data=true&include_hosts_metadata=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "hosts"
          ],
          "query": [
            {
              "key": "filter",
              "value": "tempor Ut sed velit",
              "description": "String to filter search results."
            },
            {
              "key": "sort_field",
              "value": "tempor Ut sed velit",
              "description": "Sort hosts by this field."
            },
            {
              "key": "sort_dir",
              "value": "tempor Ut sed velit",
              "description": "Direction of sort. Options include `asc` and `desc`."
            },
            {
              "key": "start",
              "value": "-62147425",
              "description": "Host result to start search from."
            },
            {
              "key": "count",
              "value": "-62147425",
              "description": "Number of hosts to return. Max 1000."
            },
            {
              "key": "from",
              "value": "-62147425",
              "description": "Number of seconds since UNIX epoch from which you want to search your hosts."
            },
            {
              "key": "include_muted_hosts_data",
              "value": "true",
              "description": "Include information on the muted status of hosts and when the mute expires."
            },
            {
              "key": "include_hosts_metadata",
              "value": "true",
              "description": "Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.)."
            }
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/hosts?filter=tempor Ut sed velit&sort_field=tempor Ut sed velit&sort_dir=tempor Ut sed velit&start=-62147425&count=-62147425&from=-62147425&include_muted_hosts_data=true&include_hosts_metadata=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "hosts"
          ],
          "query": [
            {
              "key": "filter",
              "value": "tempor Ut sed velit",
              "description": "String to filter search results."
            },
            {
              "key": "sort_field",
              "value": "tempor Ut sed velit",
              "description": "Sort hosts by this field."
            },
            {
              "key": "sort_dir",
              "value": "tempor Ut sed velit",
              "description": "Direction of sort. Options include `asc` and `desc`."
            },
            {
              "key": "start",
              "value": "-62147425",
              "description": "Host result to start search from."
            },
            {
              "key": "count",
              "value": "-62147425",
              "description": "Number of hosts to return. Max 1000."
            },
            {
              "key": "from",
              "value": "-62147425",
              "description": "Number of seconds since UNIX epoch from which you want to search your hosts."
            },
            {
              "key": "include_muted_hosts_data",
              "value": "true",
              "description": "Include information on the muted status of hosts and when the mute expires."
            },
            {
              "key": "include_hosts_metadata",
              "value": "true",
              "description": "Include additional metadata about the hosts (agent_version, machine, platform, processor, etc.)."
            }
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    }
  ]
}