Welcome to Water Restrictions, your go-to source for up-to-date information on water restrictions in your area.Water Restrictions LogoWater Restrictions

Overview

REST API providing programmatic access to water restriction data — the same API that powers this site.

The API is currently in a beta phase. Endpoints and data structures may change. Significant updates will be announced on the blog.

Getting started

Base URL: https://api.waterrestrictions.nz

The API accepts standard HTTP requests — see the endpoints for available resources.

By using the API, you agree to the terms of service.

Authentication

The API doesn't currently require authentication. This is likely to change in a future release — when it does, it'll be announced on the blog.

Rate limiting

Rate limits apply, but should be sufficient for typical usage. If you're making frequent requests, consider caching responses.

Pagination

Endpoints that return collections are paginated. Use page and pageSize query parameters to control pagination — defaults apply if omitted, but vary by endpoint. Responses include pagination metadata.

Errors

When something goes wrong, the API returns a Problem Details response. Most API error responses include an errors array:

{
  "errors": [
    { "code": "Error.Validation", "message": "Name is required.", "pointer": "name" },
    { "code": "Error.NotFound", "message": "The requested resource was not found." }
  ]
}

Validation errors include a pointer identifying the invalid field. Other errors omit pointer.

On this page