3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00

Document system_of_measurement in /farm.json.

This commit is contained in:
Michael Stenta 2019-07-11 21:08:49 -04:00
parent b5cc5351ee
commit 9ece1b09e1

View file

@ -79,8 +79,9 @@ This should be used to replace `[AUTH]` in the `curl` examples that follow.
## /farm.json
farmOS provides an informational API endpoint at `/farm.json`, which includes
the farm name, URL, API version, information about the currently authenticated
user, and information about available entity types and bundles.
the farm name, URL, API version, the system of measurement used by the farm,
information about the currently authenticated user, and information about
available entity types and bundles.
For example:
@ -88,6 +89,7 @@ For example:
"name": "My Farm",
"url": "https://myfarm.mydomain.com",
"api_version": "1.0",
"system_of_measurement": "metric",
"user": {
"uid": "3",
"name": "My Username",
@ -104,6 +106,8 @@ For example:
}
}
The `system_of_measurement` with be either `metric` or `us`.
The `resources` section contains a list of entity types (aka "resource types")
that are available. Within each is a list of bundles (eg: "log types", "asset
types", etc). Each bundle contains information such as its translated `label`.