Skip to content

Commit 28ced40

Browse files
committed
docs(api): note the zone metadata permission on zone updates and who may list templates
1 parent 40ebe6c commit 28ced40

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

docs/api/endpoints.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ API v2 is the recommended version. All paths are prefixed with `/api/v2`.
4444
| `POST` | `/zones/{id}/owners` | Add owner(s), supports batch (v4.2.0+) |
4545
| `DELETE` | `/zones/{id}/owners/{user_id}` | Remove owner (v4.2.0+) |
4646

47+
From v4.2.6, v4.3.5, v4.4.1 and v4.5.0, changing a zone's `name`, `type` or `master` through
48+
`PUT /zones/{id}` requires the zone metadata permission (`zone_meta_edit_own` or
49+
`zone_meta_edit_others`), the same gate as the web edit form; record content permissions alone
50+
return `403`. A value that matches what is stored is not treated as a change, so clients that
51+
resend every field on update keep working.
52+
4753
#### Setting the serial policy on create (v4.5.0+)
4854

4955
`POST /zones` accepts an optional `soa_edit_api` string that sets the zone's
@@ -249,6 +255,10 @@ content against the record type and returns `400` with the validator message whe
249255
See [Record validation](../user-guide/dns-templates.md#record-validation) for the rules,
250256
including where MX and SRV priority belongs.
251257

258+
From the same releases, `GET /zone-templates` and `GET /zone-templates/{id}/records` are also
259+
readable with `zone_master_add` or `zone_slave_add`, matching the add-zone form, which offers
260+
templates to anyone who may add a zone. Writing a template still needs the template permissions.
261+
252262
## Health endpoints (v4.5.0+)
253263

254264
These sit outside the versioned API and outside the API key model. They take no

docs/user-guide/permissions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ templates above.
214214

215215
- Allows the user to create new zone templates
216216
- Also required to save an existing zone's records as a new template
217-
- Together with `zone_templ_edit`, gates access to the zone template list
217+
- Together with `zone_templ_edit`, gates access to the zone template list; from 4.2.6, 4.3.5, 4.4.1 and 4.5.0 the API template listing is also readable with `zone_master_add` or `zone_slave_add`
218218

219219
### zone_templ_edit
220220

0 commit comments

Comments
 (0)