compute
PUT /v1/compute/servers/{serverId}/reverse-dns
Point one address's PTR at a hostname, or reset it.
احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز sites.restart باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد میشود، نه 404.
این نقطه پایانی هیچ شناسه سازمانی را دریافت نمیکند. کلید شما در حال حاضر سازمان مربوطه را مشخص میکند و پاسخ در همان محدوده ارائه میشود.
امتحان کنید
هر چیزی را که داخل براکتهای زاویهدار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.
curl -X PUT https://api.zinndigital.com/v1/compute/servers/{serverId}/reverse-dns \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "ip": <string> }'وارد شدهاید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر میکند و درخواست را روی API زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید
جزئیات
⛔ `ip` is required and is never inferred from the machine: a machine has an IPv4 and an IPv6 address with **different** default states, so "set the PTR of this server" is not a well-formed request. An empty `hostname` resets that address to the provider's own default, which is a real thing to want and is not the same as leaving it alone. ⛔⛔ **The hostname must resolve forward to this address, and that is checked before anything is written.** Receiving mail servers check forward-confirmed reverse DNS, so a PTR whose name does not point back is *worse* than the supplier's default: it looks configured on the screen and still fails delivery. A name that does not resolve at all is refused too — "we could not look it up" is not evidence the record exists. An `ip` the machine does not hold is `422`, and that refusal is the tenancy boundary: the provider would happily set a PTR for any address on the account, including another customer's. Requires `sites.restart`.
پارامترها
| نام | نوع | الزامی | چیست |
|---|---|---|---|
serverId (path) | Uuid | بله | The server's id, as `listComputeServers` reports it. **Ours** (UUIDv7), minted when the order row was written — never the provider's own identifier for the machine. |
بدنه درخواست
| نام | نوع | الزامی | چیست |
|---|---|---|---|
ip | string | بله | Which address to set. ⛔ Required and never inferred: a machine has an IPv4 and an IPv6 with different default states, so "set the PTR of this server" is not a well-formed reques… |
hostname | string | خیر | The name to point at. **Empty resets the address to the provider's own default**, which is a real thing to want and is not the same as leaving it alone. ⛔ A non-empty name must… |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
data | ComputeReverseDnsRecord[] | بله | — |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 404 · 422 · 429 · 503