Table of Contents

Authorisation

Pure Farming is built on the principal of "least privilege". This means that unless you have been explicitly granted access to data, you simply cannot see it.

Practically this will result in empty responses or "missing" data.
The Authorisation for data is not applied at the API level, it is core to how Pure Farming works - so if you are not seeing data that you expect to see please contact developer-support@purefarming.com.

This applies to all APIs and methods of retrieving data from Pure Farming.

Authentication

The mechanism by which the authorisation is applied, is through the use of OAuth2.0 JWT bearer tokens. These token are issued after a user authenticates themselves, and contain claims about the user and their permissions. At their core they represent a series of grants of permission to a User or an Organisation.

For more information on how to obtain a JWT token, see the Authentication documentation.

The authorisation header looks like below:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c