Skip to content

GET nodes

MattZK edited this page Nov 7, 2019 · 6 revisions

GET /nodes

GET a list of all public nodes.

HTTP Request

GET https://api.farmlab.team/nodes/

Request parameters

Name Value Default Required
limit number 3 No

Optional request headers

Name Value
Accept application/json
Authorization Bearer Token

Request body

Do not supply a body with this method.

Example

Request
GET https://api.farmlab.team/nodes
Response
[
    {
        "sensors": {
            "airtemp": {
                "value": 16.5,
                "timestamp": "2019-11-07T17:20:24.171Z"
            },
            "watertemp": {
                "value": 6.6,
                "timestamp": "2019-11-07T17:20:24.174Z"
            },
            "lightstr": {
                "value": 6015,
                "timestamp": "2019-11-07T17:20:24.178Z"
            },
            "airhumidity": {
                "value": 9.1,
                "timestamp": "2019-11-07T17:20:24.190Z"
            },
            "waterph": {
                "value": 5.3,
                "timestamp": "2019-11-07T17:20:24.192Z"
            }
        },
        "actuators": {
            "lightint": {
                "value": -1,
                "history": [],
                "timestamp": "2019-11-07T13:57:41.103Z"
            },
            "flowpump": {
                "value": -1,
                "history": [],
                "timestamp": "2019-11-07T13:57:41.103Z"
            },
            "foodpump": {
                "value": -1,
                "history": [],
                "timestamp": "2019-11-07T13:57:41.103Z"
            }
        },
        "status": true,
        "allowPublicStats": true,
        "members": [
            {
                "_id": "5dc422d53b1e220014ad3a6a",
                "firstname": "Administrator",
                "lastname": "Global"
            }
        ],
        "actions": [],
        "_id": "5dc422d53b1e220014ad3a6b",
        "label": "Development Node Alfa",
        "macAddress": "AA:AA:AA:AA:AA:AA",
        "liveSince": "2019-11-07T13:57:41.103Z"
    }
]

Remarks

This only returns nodes where the currently logged in user is part of a node's members.

Clone this wiki locally