رفتن به محتوا
cloudhostمستندات
مرجع API

فایروال

فایروال هر پروژه: محافظت‌های همیشه روشن، و قاعده‌های رد، اجازه، ثبت و محدودیت درخواست بر اساس آدرس، کشور، مسیر، میزبان و هدر.

توضیح هر مسیر به انگلیسی است، همان متنی که مرجع از کد ساخته می‌شود. مسیرها، نام فیلدها و کدها همان‌اند که در درخواست می‌نویسید.
GET/v1/functions/{name}/firewall

The firewall#

Status (normal, or mitigating when a system mitigation stopped a request in the last ten minutes), the always-on system mitigations, the custom rules in the order they run, the plan's limits, the rule model and the country data's source and attribution.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200Firewall

  • activeboolean
  • statusstring

    one of normal, mitigating

  • systemFirewallMitigation[]
  • rulesFirewallRule[]
  • publishedboolean

    false when no rule is enabled

  • limitsobject
  • modelobject
  • geoipobject

    where the country of an address comes from: DB-IP IP to Country Lite, CC BY 4.0 (IP geolocation by DB-IP)

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/firewall" \
  -H "Authorization: Bearer $KEY"
POST/v1/functions/{name}/firewall/rules

Add a firewall rule#

Add a custom rule at position (0 runs first; default last). Published at once to every server; nothing restarts. The plan caps the rules and the rate limit rules per project.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

بدنهٔ درخواستapplication/json

  • namestringالزامی

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]الزامی

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstringالزامی

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • positioninteger

    0 runs first; default last

    at least 0

پاسخ

201FirewallRule

  • idstring

    pattern ^fwr_[a-z0-9]{12}$

  • positioninteger

    0 runs first

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring

    an email or key name

  • updated_bystring

خطاها

وضعیتتوضیح
400firewall_bad_rule, firewall_bad_condition, firewall_bad_regex, firewall_bad_rate, firewall_bad_position
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409firewall_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/firewall/rules" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","if":[[{"field":"ip","op":"in","values":["…"],"name":"my-api","neg":true}]],"action":"deny"}'
GET/v1/functions/{name}/firewall/rules/{id}

One firewall rule#

The rule.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstringمسیرالزامی

    the rule's id

    pattern ^fwr_[a-z0-9]{12}$

پاسخ

200FirewallRule

  • idstring

    pattern ^fwr_[a-z0-9]{12}$

  • positioninteger

    0 runs first

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring

    an email or key name

  • updated_bystring

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/firewall/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/functions/{name}/firewall/rules/{id}

Delete a firewall rule#

Delete a custom rule; the ones after it move up.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstringمسیرالزامی

    the rule's id

    pattern ^fwr_[a-z0-9]{12}$

پاسخ

200FirewallDeleted

  • deletedstring

    the rule's id

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/functions/my-api/firewall/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/functions/{name}/firewall/rules/{id}

Change a firewall rule#

Any of the rule's fields; the others stay. {"enabled": false} switches it off; if replaces its conditions.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstringمسیرالزامی

    the rule's id

    pattern ^fwr_[a-z0-9]{12}$

بدنهٔ درخواستapplication/json

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate

پاسخ

200FirewallRule

  • idstring

    pattern ^fwr_[a-z0-9]{12}$

  • positioninteger

    0 runs first

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring

    an email or key name

  • updated_bystring

خطاها

وضعیتتوضیح
400firewall_bad_rule, firewall_bad_condition, firewall_bad_regex, firewall_bad_rate
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409firewall_limit
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/functions/my-api/firewall/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","description":"…","enabled":true,"if":[[{"field":"ip","op":"in","values":["…"],"name":"my-api","neg":true}]],"action":"deny","rate":{"limit":1,"window":60,"key":"ip","then":"deny"}}'
PUT/v1/functions/{name}/firewall/order

Reorder the firewall rules#

Every rule id of the project once, in the new order (the first runs first). Answers with the firewall.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

بدنهٔ درخواستapplication/json

  • idsstring[]الزامی

    every rule id once, in the new order

پاسخ

200Firewall

  • activeboolean
  • statusstring

    one of normal, mitigating

  • systemFirewallMitigation[]
  • rulesFirewallRule[]
  • publishedboolean

    false when no rule is enabled

  • limitsobject
  • modelobject
  • geoipobject

    where the country of an address comes from: DB-IP IP to Country Lite, CC BY 4.0 (IP geolocation by DB-IP)

خطاها

وضعیتتوضیح
400firewall_bad_order
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/functions/my-api/firewall/order" \
  -H "Authorization: Bearer $KEY" \
  -d '{"ids":["…"]}'
POST/v1/functions/{name}/firewall/check

Test a request against the firewall#

What the rules would do with a request; nothing is sent to the project. Rate limits are not counted (one request is never over a limit).

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

بدنهٔ درخواستapplication/json

  • ipstringالزامی
  • countrystring

    two letters

  • methodstring

    default "GET"

  • pathstring

    default "/"

  • hoststring
  • user_agentstring
  • headersmap of string

پاسخ

200FirewallVerdict

  • outcomestring

    one of allowed, denied, rate_limited

  • rulestring | null
  • rule_namestring | null
  • loggedobject[]
  • statusinteger

    403, 429, or 0 when allowed

  • notestring

خطاها

وضعیتتوضیح
400firewall_bad_check
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/functions/my-api/firewall/check" \
  -H "Authorization: Bearer $KEY" \
  -d '{"ip":"…"}'
GET/v1/functions/{name}/firewall/metrics

Firewall metrics#

Requests allowed, denied, logged and rate limited over time, hits per rule (every rule and system mitigation, with no hits too), and the top 20 addresses and countries the firewall stopped. Counts are kept 31 days.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • rangestringکوئری

    1h (1-minute steps), 24h (15 minutes, the default) or 7d (2 hours)

    one of 1h, 24h, 7d · default "24h"

پاسخ

200FirewallMetrics

  • rangestring
  • stepstring
  • totalsobject
  • seriesobject[]
  • rulesobject[]
  • ipsobject[]
  • countriesobject[]
  • notestring

خطاها

وضعیتتوضیح
400bad_range
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/firewall/metrics" \
  -H "Authorization: Bearer $KEY"
GET/v1/functions/{name}/firewall/audit

Firewall changes#

The firewall's rule changes, newest first, with who, when and the before and after. Page with before (the next of the last page).

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • beforeintegerکوئری

    only entries older than this id

    at least 1

  • limitintegerکوئری

    how many (default 50)

    1–200 · default 50

پاسخ

200FirewallAudit

  • entriesobject[]
    • idinteger
    • atstring (date-time)
    • actorstring
    • actionstring

      one of rule.create, rule.update, rule.enable, rule.disable, rule.delete, rule.reorder

    • rule_idstring
    • namestring
    • beforeany
    • afterany
  • nextinteger | null

    the before of the next page

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/functions/my-api/firewall/audit" \
  -H "Authorization: Bearer $KEY"
GET/v1/apps/{name}/firewall

The firewall#

Status (normal, or mitigating when a system mitigation stopped a request in the last ten minutes), the always-on system mitigations, the custom rules in the order they run, the plan's limits, the rule model and the country data's source and attribution.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

پاسخ

200Firewall

  • activeboolean
  • statusstring

    one of normal, mitigating

  • systemFirewallMitigation[]
  • rulesFirewallRule[]
  • publishedboolean

    false when no rule is enabled

  • limitsobject
  • modelobject
  • geoipobject

    where the country of an address comes from: DB-IP IP to Country Lite, CC BY 4.0 (IP geolocation by DB-IP)

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/firewall" \
  -H "Authorization: Bearer $KEY"
POST/v1/apps/{name}/firewall/rules

Add a firewall rule#

Add a custom rule at position (0 runs first; default last). Published at once to every server; nothing restarts. The plan caps the rules and the rate limit rules per project.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

بدنهٔ درخواستapplication/json

  • namestringالزامی

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]الزامی

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstringالزامی

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • positioninteger

    0 runs first; default last

    at least 0

پاسخ

201FirewallRule

  • idstring

    pattern ^fwr_[a-z0-9]{12}$

  • positioninteger

    0 runs first

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring

    an email or key name

  • updated_bystring

خطاها

وضعیتتوضیح
400firewall_bad_rule, firewall_bad_condition, firewall_bad_regex, firewall_bad_rate, firewall_bad_position
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409firewall_limit
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/firewall/rules" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","if":[[{"field":"ip","op":"in","values":["…"],"name":"my-api","neg":true}]],"action":"deny"}'
GET/v1/apps/{name}/firewall/rules/{id}

One firewall rule#

The rule.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstringمسیرالزامی

    the rule's id

    pattern ^fwr_[a-z0-9]{12}$

پاسخ

200FirewallRule

  • idstring

    pattern ^fwr_[a-z0-9]{12}$

  • positioninteger

    0 runs first

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring

    an email or key name

  • updated_bystring

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/firewall/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
DELETE/v1/apps/{name}/firewall/rules/{id}

Delete a firewall rule#

Delete a custom rule; the ones after it move up.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstringمسیرالزامی

    the rule's id

    pattern ^fwr_[a-z0-9]{12}$

پاسخ

200FirewallDeleted

  • deletedstring

    the rule's id

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl -X DELETE "https://api.ibel.ai/v1/apps/my-api/firewall/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY"
PATCH/v1/apps/{name}/firewall/rules/{id}

Change a firewall rule#

Any of the rule's fields; the others stay. {"enabled": false} switches it off; if replaces its conditions.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • idstringمسیرالزامی

    the rule's id

    pattern ^fwr_[a-z0-9]{12}$

بدنهٔ درخواستapplication/json

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate

پاسخ

200FirewallRule

  • idstring

    pattern ^fwr_[a-z0-9]{12}$

  • positioninteger

    0 runs first

  • namestring

    1–80 characters

  • descriptionstring

    up to 500 characters

  • enabledboolean

    default true

  • ifFirewallCondition[][]

    groups of conditions: the rule matches when every condition of at least one group matches (a flat list is one group)

    1–… items

  • actionstring

    deny: 403, the code does not run; allow: skip the rules after it; log: count and go on; rate_limit: needs rate

    one of deny, allow, log, rate_limit

  • rateFirewallRate
  • created_atstring (date-time)
  • updated_atstring (date-time)
  • created_bystring

    an email or key name

  • updated_bystring

خطاها

وضعیتتوضیح
400firewall_bad_rule, firewall_bad_condition, firewall_bad_regex, firewall_bad_rate
401unauthorized: missing, invalid, expired or revoked credential
404not_found
409firewall_limit
500internal: an unexpected failure

نمونه

curl -X PATCH "https://api.ibel.ai/v1/apps/my-api/firewall/rules/88e2fe1d-6d75-4de5-8c8f-27380ec66903" \
  -H "Authorization: Bearer $KEY" \
  -d '{"name":"my-api","description":"…","enabled":true,"if":[[{"field":"ip","op":"in","values":["…"],"name":"my-api","neg":true}]],"action":"deny","rate":{"limit":1,"window":60,"key":"ip","then":"deny"}}'
PUT/v1/apps/{name}/firewall/order

Reorder the firewall rules#

Every rule id of the project once, in the new order (the first runs first). Answers with the firewall.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
مالک، ادمین، توسعه‌دهنده

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

بدنهٔ درخواستapplication/json

  • idsstring[]الزامی

    every rule id once, in the new order

پاسخ

200Firewall

  • activeboolean
  • statusstring

    one of normal, mitigating

  • systemFirewallMitigation[]
  • rulesFirewallRule[]
  • publishedboolean

    false when no rule is enabled

  • limitsobject
  • modelobject
  • geoipobject

    where the country of an address comes from: DB-IP IP to Country Lite, CC BY 4.0 (IP geolocation by DB-IP)

خطاها

وضعیتتوضیح
400firewall_bad_order
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl -X PUT "https://api.ibel.ai/v1/apps/my-api/firewall/order" \
  -H "Authorization: Bearer $KEY" \
  -d '{"ids":["…"]}'
POST/v1/apps/{name}/firewall/check

Test a request against the firewall#

What the rules would do with a request; nothing is sent to the project. Rate limits are not counted (one request is never over a limit).

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

بدنهٔ درخواستapplication/json

  • ipstringالزامی
  • countrystring

    two letters

  • methodstring

    default "GET"

  • pathstring

    default "/"

  • hoststring
  • user_agentstring
  • headersmap of string

پاسخ

200FirewallVerdict

  • outcomestring

    one of allowed, denied, rate_limited

  • rulestring | null
  • rule_namestring | null
  • loggedobject[]
  • statusinteger

    403, 429, or 0 when allowed

  • notestring

خطاها

وضعیتتوضیح
400firewall_bad_check
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl -X POST "https://api.ibel.ai/v1/apps/my-api/firewall/check" \
  -H "Authorization: Bearer $KEY" \
  -d '{"ip":"…"}'
GET/v1/apps/{name}/firewall/metrics

Firewall metrics#

Requests allowed, denied, logged and rate limited over time, hits per rule (every rule and system mitigation, with no hits too), and the top 20 addresses and countries the firewall stopped. Counts are kept 31 days.

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • rangestringکوئری

    1h (1-minute steps), 24h (15 minutes, the default) or 7d (2 hours)

    one of 1h, 24h, 7d · default "24h"

پاسخ

200FirewallMetrics

  • rangestring
  • stepstring
  • totalsobject
  • seriesobject[]
  • rulesobject[]
  • ipsobject[]
  • countriesobject[]
  • notestring

خطاها

وضعیتتوضیح
400bad_range
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/firewall/metrics" \
  -H "Authorization: Bearer $KEY"
GET/v1/apps/{name}/firewall/audit

Firewall changes#

The firewall's rule changes, newest first, with who, when and the before and after. Page with before (the next of the last page).

دسترسی
کلید API یا نشست داشبورد
نقش‌ها
همهٔ نقش‌ها

پارامترها

  • namestringمسیرالزامی

    the function's or app's name

    pattern ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$ · up to 63 characters

  • beforeintegerکوئری

    only entries older than this id

    at least 1

  • limitintegerکوئری

    how many (default 50)

    1–200 · default 50

پاسخ

200FirewallAudit

  • entriesobject[]
    • idinteger
    • atstring (date-time)
    • actorstring
    • actionstring

      one of rule.create, rule.update, rule.enable, rule.disable, rule.delete, rule.reorder

    • rule_idstring
    • namestring
    • beforeany
    • afterany
  • nextinteger | null

    the before of the next page

خطاها

وضعیتتوضیح
401unauthorized: missing, invalid, expired or revoked credential
404not_found
500internal: an unexpected failure

نمونه

curl "https://api.ibel.ai/v1/apps/my-api/firewall/audit" \
  -H "Authorization: Bearer $KEY"