ドキュメント本文へスキップ
API

ルールを取得する

1 つのルールの全体を、条件、アクション、発火回数とともに取得します。

GETapi.openemail.uk/rules/{id}

実際の呼び出しを、ご自身のキーで自分のワークスペースに対して実行します。

GET /rules/{id}

1 つのルールの全体を、条件、アクション、発火回数とともに取得します。

rules:read が必要です。id には rul_ プレフィックスが付きます。

curl
curl "$OE/rules/rul_7f3a1c94e05d3862c1f0a44b" -H "$AUTH"
レスポンス
{  "object": "rule",  "id": "rul_7f3a1c94e05d3862c1f0a44b",  "name": "Receipts to their own label",  "description": null,  "enabled": true,  "position": 0,  "match": "all",  "conditions": [    { "field": "from_domain", "op": "matches", "value": "*.stripe.com", "negate": false }  ],  "actions": [{ "type": "label", "value": "USER_RECEIPTS" }, { "type": "archive" }],  "stopProcessing": true,  "lastMatchedAt": "2026-08-29T11:04:12.000Z",  "matchCount": 148,  "createdAt": "2026-08-01T09:00:00.000Z",  "updatedAt": "2026-08-20T16:31:00.000Z"}

別の接続のルールは、403 ではなく rule_not_found、404 で、存在したことのない id と同じ応答になります。読めないメールボックス上にどの id が存在するかをキーに教えること自体が漏洩だからです。

これがルールの全体です。バージョンも履歴もありません。編集は上書きであり、ルールが「何をしたか」はメッセージごとに GET /rules/runs に記録されます。