The Zinc API

Zinc is basically an API and here is how you can manage its policies, zones and records.

You are encouraged to install django-rest-swagger, run zinc locally and explore the API at http://localhost:8080/swagger

Policies

Policies are read only trough the API. You can define them in the admin.

Policy listing

GET /policies HTTP/1.1

Policy detail

Example:

GET /policies/{id} HTTP/1.1
GET /policies/344b7bee-da33-4234-b645-805cc26adab0 HTTP/1.1
Content-Type: application/json

Zones

Zone listing

GET /zones/ HTTP/1.1

Zone creation

POST /zones/ HTTP/1.1

Args:

Argument Required Default Description
root required - The domain name of this zone. Trailing dot is optional.

Returns the newly created zone object.

Delete a zone

DELETE /zones/{zone_id}/ HTTP/1.1

Zone detail

GET /zones/{zone_id} HTTP/1.1

Example:

GET /zones/102 HTTP/1.1
Content-Type: application/json

Records

List records in a zone

GET /zones/{zone_id}/records HTTP/1.1

Example:

GET /zones/102/records HTTP/1.1
Content-Type: application/json

Create a record

POST /zones/{zone_id}/records HTTP/1.1

Args:

Argument Required Default Description
name required - The domain name (without the zone root).
type required - The record type. Must be either POLICY_ROUTED or a valid record type.
values required - List of values. Should be one IP for A, MX records, a policy id for POLICY_ROUTED, one or more domain names for NS records.
ttl optional 300 The TTL for DNS.

Delete a record

DELETE /zones/{zone_id}/records/{record_id} HTTP/1.1

Record detail

GET /zones/{zone_id}/records/{record_id} HTTP/1.1

Example:

GET /zones/102/records/Z6k504rwKzbamNZ1ZxLxRR4BKly04J HTTP/1.1
Content-Type: application/json

Update an existing record

PATCH /zones/{zone_id}/records/{record_id} HTTP/1.1

The type and name can't be changed. Missing attributes don't change.

Argument Required Default Description
values optional - List of values. Should be one IP for A, MX records, a policy id for POLICY_ROUTED, one or more domain names for NS records.
ttl optional - The TTL for DNS.