Accessing our APIs
All Environment Canterbury Application Programming Interfaces (APIs) require authentication and authorisation to access them.
This allows Environment Canterbury to:
Monitor usage of our APIs
Identify who is using our APIs
Apply appropriate rate limiting to requests
Allow access to be revoked in case of malicious use
You can request access by creating a user on our developer data portal, creating a subscription to one of our products which will give you a subscription key which needs to be provided as an HTTP header in any requests to Environment Canterbury's APIs.
What is a product?
A product is a grouping of one or more APIs. Each product has its own usage quota. You must subscribe to a product to begin to use the product's APIs.
What is a subscription?
A subscription allows access for a developer to a product and the published APIs in that product.
A subscription is represented by a subscription key which must be provided when making requests to Environment Canterbury's APIs. Requests made without a subscription key will be rejected.
Get a subscription key
To get a subscription key you must:
First sign up to the developer data portal
Go to the products page, choose an API you wish to consume, enter a product subscription name and click subscribe
From the user profile page get the subscription key for the newly created subscription
Use your subscription key
The subscription key needs to be added to the headers of any requests you make to the Environment Canterbury APIs as this key-value pair.
Ocp-Apim-Subscription-Key: "YOUR UNIQUE KEY"
The subscription key needs to be kept private, not embedded in any client code where someone could extract the key and make requests on your behalf.
Limits are applied at the user level, and restrict usage to:
50,000 API calls per month
10 gigabyte of bandwidth per month
A maximum of 50 calls per minute
Additionally, each API will return no more than 500,000 nodes in a single request.