List mapping rules
curl --request GET \
--url https://app.hookie.ai/admin/api/projects/{pid}/rules \
--cookie hookie_session=const options = {method: 'GET', headers: {cookie: 'hookie_session='}};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/rules"
headers = {"cookie": "hookie_session="}
response = requests.get(url, headers=headers)
print(response.text){
"rules": [
{
"id": "<string>",
"name": "<string>",
"enabled": 0,
"conditions": "<string>",
"dataset": "<string>",
"mappings": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Rules
List mapping rules
Top-level alias: GET /admin/api/rules. Readable by any role.
GET
/
admin
/
api
/
projects
/
{pid}
/
rules
List mapping rules
curl --request GET \
--url https://app.hookie.ai/admin/api/projects/{pid}/rules \
--cookie hookie_session=const options = {method: 'GET', headers: {cookie: 'hookie_session='}};
fetch('https://app.hookie.ai/admin/api/projects/{pid}/rules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{pid}/rules"
headers = {"cookie": "hookie_session="}
response = requests.get(url, headers=headers)
print(response.text){
"rules": [
{
"id": "<string>",
"name": "<string>",
"enabled": 0,
"conditions": "<string>",
"dataset": "<string>",
"mappings": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>"
}Authorizations
sessionbearerAuth
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Path Parameters
Project id (UUID) belonging to the caller workspace.
Response
User-authored rules only (the auto-generated per-webhook mirror rules, which carry webhook_id, are excluded). Newest first. conditions and mappings come back as JSON-encoded strings exactly as stored, and enabled is 0 or 1.
Show child attributes
Show child attributes