Reading rules: what may arrive while the owner reads
GET
/api/v1/reading-rules
const url = 'https://deck.example.com/api/v1/reading-rules';const options = {method: 'GET', headers: {cookie: 'qd_auth=<qd_auth>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://deck.example.com/api/v1/reading-rules \ --cookie qd_auth=<qd_auth>Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Media typeapplication/json
Array<object>
A “while I’m reading” rule: an item that matches every condition it sets gets through while the person reads. Conditions left out match anything; a rule must set at least one.
object
account
The mail account, or the Matrix room’s name.
string | null
enabled
required
boolean
from
The sender contains this (case doesn’t matter): @alertmanager:, no-reply@accounts.google.com.
string | null
id
required
integer format: int64
label
The item carries this Gmail label.
string | null
last_matched_at
string | null
match_count
required
integer format: int64
name
required
What it’s for, as the Rules screen shows it (“Critical alerts”).
string
source
gmail or matrix.
string | null
text_regex
An RE2 regular expression the subject and text are matched against: (?i)\(critical\).
string | null
Example
[ { "account": null, "from": null, "label": null, "source": null, "text_regex": null }]default
Section titled “default”An error, with its message.
Media typeapplication/json
Every error the REST API returns, with an HTTP status.
object
error
required
string
Example generated
{ "error": "example"}