Query a workspace's email log
Runs a LogQL query over the workspace's email log, kept for 30 days, and returns Loki's answer unchanged. Streams carry `kind` (`delivery` or `auth`), and delivery lines `dir` (`in` or `out`) and `status` (`queued`, `delivered`, `deferred`, `bounced`, `rejected` or `spam`); auth lines `status` `ok` or `failed`. Each line is JSON with `from`, `to`, `subject`, `mailbox`, `code` and `reply` (the SMTP reply), `host` (the other server), `tls`, `size`, `score` (spam score) and `queue`. The path is Loki's own, so a Grafana data source can point here too. Needs the admin role.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
A LogQL query: a log query returns lines, a metric query such as sum by (status) (count_over_time({kind="delivery", dir="out"} [1h])) returns series
1 <= lengthStart of the range, as Unix seconds, Unix nanoseconds or RFC 3339; an hour before end when absent
End of the range; now when absent
Most lines to return for a log query, 100 when absent
backward, the default, returns the newest lines first
Value in
- "backward"
- "forward"
Seconds between points of a metric query, or a duration such as 1h
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/mail/loki/api/v1/query_range?query=string"{ "status": "string", "data": { "resultType": "string", "result": [ null ], "property1": null, "property2": null }, "errorType": "string", "error": "string", "property1": null, "property2": null}Create or change an alias PUT
Makes an address deliver to mailboxes of the workspace, replacing its targets if it exists. The address must be on a domain of the workspace with email on and not be a mailbox (409 `address_taken`). Forwarding to outside addresses isn't available yet: a target that isn't a mailbox of the workspace answers 400 `bad_target`. Needs the admin role.
List mail waiting to be delivered GET
Lists up to 100 messages from the workspace's domains that Cloady Mail hasn't delivered yet, with each recipient's last reply from the receiving server and the next attempt. Delivered mail leaves the queue. Needs the admin role.