databases
POST /v1/databases/{databaseId}/allowed-ips
Permit a source address or range to connect.
אימות
שלח מפתח API כטוקן Bearer. נקודת קצה זו אינה מציינת הרשאת ספציפית במפרט, לכן הקצה למפתח שלך את המינימום הנדרש ובדוק את התגובה במקום להניח הנחות.
נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.
נסה זאת
החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.
curl -X POST https://api.zinndigital.com/v1/databases/{databaseId}/allowed-ips \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "cidr": <string>, "description": <string> }'מחובר? קונסולת ה-API בלוח הבקרה שלך מזינה את מזהה הארגון האמיתי שלך ואת המפתח שלך, ומריצה את הבקשה מול ה-API הפיזי כך שתוכל לראות את התגובה בפועל. פתח נקודת קצה זו במסוף ה-API
פרטים
Gated on `databases.manage`. A bare address is normalised to a `/32` or `/128`. Refused with 422 for an address inside our own cluster network (which would let any pod — including another tenant's database — reach this one), for an unparseable value, for a missing description, and for `0.0.0.0/0` unless `acknowledge_public` is true.
פרמטרים
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
databaseId (path) | string | כן | — |
גוף הבקשה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
cidr | string | כן | An address or CIDR range. A bare address is normalised to `/32` or `/128`. |
description | string | כן | Required. An allow-list nobody can explain is one nobody dares prune later. |
acknowledge_public | boolean | לא | Required to add `0.0.0.0/0`. Opening a database to the whole internet is allowed but must never happen by pasting a value somebody half understood. |
תשובה
| שם | סוג | נדרש | מה זה |
|---|---|---|---|
id | string | כן | — |
cidr | string | כן | — |
description | string | כן | — |
created_at | string | לא | — |
שגיאות שנקודה קצה זו עשויה להחזיר
401 · 403 · 404 · 422