aboutsummaryrefslogtreecommitdiff
path: root/lib/exdatadog/search.ex
blob: 23e6fd636658a3e693f549b3a029824adeeae846 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
defmodule Exdatadog.Search do
  @moduledoc """
  Search for metrics or hosts in DataDog
  """

  import Exdatadog

  @doc """
  Search for entities in the last 24 hours in DataDog

  Available entities to search for are:

  * `hosts`

  * `metrics`

  """
  @spec search(binary, Exdatadog.Client.t) :: Exdatadog.response
  def search(query, client) do
    get("api/v1/search", client, [q: query])
  end

end