OpenClawCases SDK for Elixir
openclawcases_sdk is the official Elixir SDK for the OpenClawCases API.
It helps developers retrieve historical case data, inspect individual case
records, and load aggregated reporting metrics.
The package is intentionally lightweight:
- typed public structs for clients, responses, and errors
-
a thin request layer built on
Req - convenience helpers for case and reporting endpoints
- package metadata prepared for Hex publishing
Installation
Add the dependency to your mix.exs:
def deps do
[
{:openclawcases_sdk, "~> 0.1.0"}
]
endThen fetch dependencies:
mix deps.getQuick Start
client =
OpenclawcasesSDK.new(
api_key: System.fetch_env!("OPENCLAWCASES_API_KEY")
)
{:ok, response} =
OpenclawcasesSDK.list_cases(client, params: %{limit: 20})
response.status
response.bodyBuilt-In Helpers
List historical cases:
OpenclawcasesSDK.list_cases(client, params: %{limit: 25, industry: "retail"})Fetch a case record:
OpenclawcasesSDK.get_case(client, "case_123")Load a named report:
OpenclawcasesSDK.get_report(client, "weekly-summary")Load aggregate statistics:
OpenclawcasesSDK.get_statistics(client, params: %{range: "90d"})Configuration
The client accepts these options:
:api_key- API key used for authenticated requests:base_url- defaults tohttps://openclawcases.com:api_key_header- defaults to"authorization":api_key_prefix- defaults to"Bearer":headers- additional request headers:receive_timeout- request timeout in milliseconds:req_options- rawReqoptions merged into each request
Generic Requests
You can still call lower-level helpers for endpoints not yet wrapped:
OpenclawcasesSDK.get(client, "/v1/datasets")OpenclawcasesSDK.request(client, :post, "/v1/reports/custom", body: %{group_by: ["industry"]})Publishing Notes
Before the next public release, update these items:
-
replace the
@source_url_placeholderinmix.exswith the public repository URL - align helper paths with the production OpenClawCases API contract
- expand tests around filters, pagination, and long-running report jobs
Official Links
- Homepage: https://openclawcases.com/
- Official documentation and support: https://openclawcases.com/
License
MIT