Cyphi.Webhooks (Cyphi v0.1.0)
Provides API endpoints related to webhooks
Summary
Types
@type webhook_crud_create_400_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_create_403_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_create_404_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_create_405_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_create_batch_202_json_resp() :: %{batch_id: integer() | nil}
@type webhook_crud_create_batch_400_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_create_batch_403_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_create_batch_404_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_create_batch_405_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_delete_400_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_delete_403_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_delete_404_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_delete_405_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_get_400_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_get_403_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_get_404_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_get_405_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_list_400_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_list_403_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_list_404_json_resp() :: %{message: String.t() | nil}
@type webhook_crud_list_405_json_resp() :: %{message: String.t() | nil}
Functions
@spec webhook_crud_create(body :: map(), opts :: keyword()) :: {:ok, Cyphi.Webhook.t()} | {:error, webhook_crud_create_400_json_resp() | webhook_crud_create_403_json_resp() | webhook_crud_create_404_json_resp() | webhook_crud_create_405_json_resp()}
Create webhook
Create a webhook.
Request Body
Content Types: application/json
Here is the format of a request.
@spec webhook_crud_create_batch(body :: [map()], opts :: keyword()) :: {:ok, webhook_crud_create_batch_202_json_resp()} | {:error, webhook_crud_create_batch_400_json_resp() | webhook_crud_create_batch_403_json_resp() | webhook_crud_create_batch_404_json_resp() | webhook_crud_create_batch_405_json_resp()}
Create webhooks
Create one or more webhooks.
Request Body
Content Types: application/json
Here is the format of a request.
@spec webhook_crud_delete(id :: integer(), opts :: keyword()) :: :ok | {:error, webhook_crud_delete_400_json_resp() | webhook_crud_delete_403_json_resp() | webhook_crud_delete_404_json_resp() | webhook_crud_delete_405_json_resp()}
Delete a webhook
Delete a webhook.
@spec webhook_crud_get(id :: integer(), opts :: keyword()) :: {:ok, Cyphi.Webhook.t()} | {:error, webhook_crud_get_400_json_resp() | webhook_crud_get_403_json_resp() | webhook_crud_get_404_json_resp() | webhook_crud_get_405_json_resp()}
Get a webhook
Return a webhook.
@spec webhook_crud_list(opts :: keyword()) :: {:ok, [Cyphi.Webhook.t()]} | {:error, webhook_crud_list_400_json_resp() | webhook_crud_list_403_json_resp() | webhook_crud_list_404_json_resp() | webhook_crud_list_405_json_resp()}
List webhooks
Return a list of webhooks.
Options
$after: Used for fast paging by setting the value to the last object id. This cannot be used with the $order parameter.$count: If true, just return the number of list items in the form {'count' : number}.$filter: Filter using JSON structure, with attributes taken from this list: id, target_url, event.$limit: Limit the number of returned objects. The default is 10, the maximum is 100.$offset: Used for paging through a small dataset, and it can be used with the $order parameter. This cannot be used with the $after parameter.$order: Comma separated attribute names to sort by, taken from this list: id. Add :desc to the end of an attribute name for descending order. This cannot be used with the $after parameter.