Cyphi.Batches (Cyphi v0.1.0)
Provides API endpoints related to batches
Summary
Types
@type batch_crud_get_400_json_resp() :: %{message: String.t() | nil}
@type batch_crud_get_403_json_resp() :: %{message: String.t() | nil}
@type batch_crud_get_404_json_resp() :: %{message: String.t() | nil}
@type batch_crud_get_405_json_resp() :: %{message: String.t() | nil}
@type batch_crud_list_400_json_resp() :: %{message: String.t() | nil}
@type batch_crud_list_403_json_resp() :: %{message: String.t() | nil}
@type batch_crud_list_404_json_resp() :: %{message: String.t() | nil}
@type batch_crud_list_405_json_resp() :: %{message: String.t() | nil}
Functions
@spec batch_crud_get(id :: integer(), opts :: keyword()) :: {:ok, Cyphi.Batch.t()} | {:error, batch_crud_get_400_json_resp() | batch_crud_get_403_json_resp() | batch_crud_get_404_json_resp() | batch_crud_get_405_json_resp()}
Get batch
Return the batch with the specified ID. A batch represents a batch operation, and the status of a batch can be "Queued" (waiting to be run), "Running" (currently being processed), and "Finished" (finished processing). When you run an operation in batch mode, it returns the ID of its batch which you can then fetch with a GET to poll for its status and obtain the results of the operation once it has completed.
Note that "Finished" does not necessarily mean that the operation was successful. You should check the status of the structures in the response_bodies attribute to see the status of each individual operation.
Options
$include: Comma separated list of relationships to include in the results, taken from this list: user.
@spec batch_crud_list(opts :: keyword()) :: {:ok, [Cyphi.Batch.t()]} | {:error, batch_crud_list_400_json_resp() | batch_crud_list_403_json_resp() | batch_crud_list_404_json_resp() | batch_crud_list_405_json_resp()}
List batches
Return a list of batches. Each batch object represents a batch operation. The status of a batch can be "Queued" (waiting to be run), "Running" (currently being processed), and "Finished" (finished processing). When you run an operation in batch mode, it returns the ID of its batch which you can then fetch with a GET to poll for its status and obtain the results of the operation once it has completed.
Note that "Finished" does not necessarily mean that the operation was successful. You should check the status of the structures in the response_bodies attribute to see the status of each individual operation.
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, user_id, status.$include: Comma separated list of relationships to include in the results, taken from this list: user.$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.