Managing n surfaces

Originally, the Farmbot manages only 1 flat surface. Their new projects and developments tend to raise the managed surface. This project works otherwise : manage several small surfaces moving vertically. (Plant Boxes)
Maybe, the solution exists in the present Fb software : the ‘garden’ API. (to be tested)

 

POST /api/saved_gardens

Request

{

  "name": "Kale"

}

Response

{

  "id": 31,

  "name": "Kale",

  "device_id": 383,

  "created_at": "2022-02-02T23:15:33.949Z",

  "updated_at": "2022-02-02T23:15:33.949Z"

}

GET /api/saved_gardens

Response

[

  {

    "id": 32,

    "name": "Andromeda",

    "device_id": 384,

    "created_at": "2022-02-02T23:15:33.978Z",

    "updated_at": "2022-02-02T23:15:33.978Z"

  },

  {

    "id": 33,

    "name": "Medea",

    "device_id": 384,

    "created_at": "2022-02-02T23:15:33.983Z",

    "updated_at": "2022-02-02T23:15:33.983Z"

  },

  {

    "id": 34,

    "name": "Arachne",

    "device_id": 384,

    "created_at": "2022-02-02T23:15:33.989Z",

    "updated_at": "2022-02-02T23:15:33.989Z"

  }

]

POST /api/saved_gardens/24/apply

Response

Empty Response

PATCH /api/saved_gardens/25/apply

Response

Empty Response

DELETE /api/saved_gardens/28

Response

Empty Response

PUT /api/saved_gardens/35

Request

{

  "name": "Onion"

}

Response

{

  "device_id": 385,

  "name": "Onion",

  "id": 35,

  "created_at": "2022-02-02T23:15:34.023Z",

  "updated_at": "2022-02-02T23:15:34.047Z"

}

POST /api/saved_gardens/snapshot

Response

Empty Response