Skip to content

Instantly share code, notes, and snippets.

@RickCarlino

RickCarlino/api_docs.md Secret

Last active Apr 30, 2021
Embed
What would you like to do?

GET /

Notes: Documentation generated for the FarmBot Web App.

Response

Empty Response

GET /api/alerts

Response

[
  {
    "id": 2,
    "created_at": 1619800046,
    "updated_at": "2021-04-30T16:27:26.210Z",
    "priority": 100,
    "problem_tag": "api.user.not_welcomed",
    "slug": "9e2617ec-aa5b-41ec-b036-b4260f3d3328"
  }
]

GET /api/alerts/1

Response

{
  "id": 1,
  "created_at": 1619800046,
  "updated_at": "2021-04-30T16:27:26.154Z",
  "priority": 100,
  "problem_tag": "api.bulletin.unread",
  "slug": "095c20a7-52dc-4ad4-9a33-c67e49a6a781"
}

GET /api/corpus

Response

{
  "version": 20180209,
  "enums": [
    {
      "name": "ALLOWED_AXIS",
      "allowed_values": [
        "x",
        "y",
        "z",
        "all"
      ]
    },
    {
      "name": "ALLOWED_SPECIAL_VALUE",
      "allowed_values": [
        "current_location",
        "safe_height",
        "soil_height"
      ]
    },
    {
      "name": "ALLOWED_CHANNEL_NAMES",
      "allowed_values": [
        "ticker",
        "toast",
        "email",
        "espeak"
      ]
    },
    {
      "name"

POST /api/demo_account

Request

{
  "secret": "i7pbcbl9oxrtantl"
}

Response

{
}

PUT /api/device

Request

{
  "id": 19,
  "ota_hour": 12
}

Response

{
  "id": 19,
  "created_at": "2021-04-30T16:27:25.076Z",
  "updated_at": "2021-04-30T16:27:25.099Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Purple carrot",
  "ota_hour": 12,
  "ota_hour_utc": 5,
  "serial_number": "01b1c475e5e1fdce0e305ea5594ecba9",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Canada/Pacific",
  "tz_offset_hrs": -7
}

PUT /api/device

Request

{
  "id": 20,
  "name": "Annabelle Bayer CPA"
}

Response

{
  "id": 20,
  "created_at": "2021-04-30T16:27:25.134Z",
  "updated_at": "2021-04-30T16:27:25.157Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Annabelle Bayer CPA",
  "ota_hour": 3,
  "ota_hour_utc": 20,
  "serial_number": "38d28582a2c4ebaa84949402b70d2f5a",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "America/Dawson_Creek",
  "tz_offset_hrs": -7
}

PUT /api/device

Request

{
  "id": 21,
  "timezone": "Mexico/General"
}

Response

{
  "id": 21,
  "created_at": "2021-04-30T16:27:25.173Z",
  "updated_at": "2021-04-30T16:27:25.200Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Sun dried tomatoes",
  "ota_hour": 3,
  "ota_hour_utc": 22,
  "serial_number": "e85707940c5a28c8497e14fa01460fce",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Mexico/General",
  "tz_offset_hrs": -5
}

PUT /api/device

Request

{
  "id": 25,
  "mounted_tool_id": 0
}

Response

{
  "id": 25,
  "created_at": "2021-04-30T16:27:25.304Z",
  "updated_at": "2021-04-30T16:27:25.346Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Raspberry",
  "ota_hour": 3,
  "ota_hour_utc": 21,
  "serial_number": "4fa4d9a043ceeca0d5b65c5c975bece2",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "US/Mountain",
  "tz_offset_hrs": -6
}

PUT /api/device

Request

{
  "id": 26,
  "ota_hour": null
}

Response

{
  "id": 26,
  "created_at": "2021-04-30T16:27:25.360Z",
  "updated_at": "2021-04-30T16:27:25.383Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Sun dried tomatoes",
  "ota_hour": null,
  "ota_hour_utc": null,
  "serial_number": "5017926d6bea66dde5f6e66d3e87aae2",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Pacific/Chuuk",
  "tz_offset_hrs": 10
}

PUT /api/device

Request

{
  "id": 27,
  "mounted_tool_id": 9
}

Response

{
  "id": 27,
  "created_at": "2021-04-30T16:27:25.396Z",
  "updated_at": "2021-04-30T16:27:25.426Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": 9,
  "name": "Turnips",
  "ota_hour": 3,
  "ota_hour_utc": 11,
  "serial_number": "f4d6e1e136e46a2e58178348944158c7",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Asia/Makassar",
  "tz_offset_hrs": 8
}

GET /api/device

Response

{
  "id": 411,
  "created_at": "2021-04-30T16:27:58.080Z",
  "updated_at": "2021-04-30T16:27:58.080Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Kale",
  "ota_hour": 3,
  "ota_hour_utc": 6,
  "serial_number": "95feec20923d51fdaa08c9c759eeb3a7",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Asmara",
  "tz_offset_hrs": 3
}

POST /api/device

Request

{
  "user_id": 252
}

Response

{
  "id": 426,
  "created_at": "2021-04-30T16:27:58.698Z",
  "updated_at": "2021-04-30T16:27:58.698Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "FarmBot",
  "ota_hour": null,
  "ota_hour_utc": null,
  "serial_number": null,
  "throttled_at": null,
  "throttled_until": null,
  "timezone": null,
  "tz_offset_hrs": 0
}

POST /api/device

Request

{
  "user_id": 254,
  "name": "Carrot"
}

Response

{
  "id": 429,
  "created_at": "2021-04-30T16:27:58.785Z",
  "updated_at": "2021-04-30T16:27:58.785Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Carrot",
  "ota_hour": null,
  "ota_hour_utc": null,
  "serial_number": null,
  "throttled_at": null,
  "throttled_until": null,
  "timezone": null,
  "tz_offset_hrs": 0
}

GET /api/device

Response

{
  "id": 472,
  "created_at": "2021-04-30T16:28:05.968Z",
  "updated_at": "2021-04-30T16:28:05.968Z",
  "fbos_version": null,
  "fb_order_number": null,
  "last_saw_api": null,
  "setup_completed_at": null,
  "mounted_tool_id": null,
  "name": "Beetroot",
  "ota_hour": 3,
  "ota_hour_utc": 23,
  "serial_number": "4eb31ba2b79859b232100705684a051e",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "America/New_York",
  "tz_offset_hrs": -4
}

DELETE /api/device

Response

Empty Response

POST /api/device/reset

Request

{
  "password": "password456"
}

Response

{
  "ok": "OK"
}

POST /api/device/seed

Request

{
  "product_line": "express_1.0"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "express_xl_1.0"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "genesis_1.5"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "genesis_xl_1.4"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "none"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "genesis_1.4"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "genesis_1.2"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "genesis_xl_1.5"
}

Response

{
  "done": "Loading resources now."
}

POST /api/device/seed

Request

{
  "product_line": "genesis_1.3"
}

Response

{
  "done": "Loading resources now."
}

GET /api/device/sync

Response

{
  "devices": [
    [
      108,
      "2021-04-30T16:27:29.937Z"
    ]
  ],
  "farm_events": [
    [
      4,
      "2021-04-30T16:27:29.724Z"
    ]
  ],
  "farmware_envs": [
    [
      1,
      "2021-04-30T16:27:29.741Z"
    ]
  ],
  "farmware_installations": [
    [
      8,
      "2021-04-30T16:27:29.751Z"
    ]
  ],
  "peripherals": [
    [
      6,
      "2021-04-30T16:27:29.764Z"
    ]
  ],
  "pin_bindings": [
    [
      1,
      "2021-04-30T16:27:29.783Z"
    ]
  ],
  "points": [
    

POST /api/export_data

Response

{
  "export_created_at": "2021-04-30T16:27:36.964+00:00",
  "server_url": "//192.168.1.112:3000",
  "database_schema": 20210308191813,
  "tools": [

  ],
  "device": {
    "id": 176,
    "created_at": "2021-04-30T16:27:36.932Z",
    "updated_at": "2021-04-30T16:27:36.932Z",
    "fbos_version": null,
    "fb_order_number": null,
    "last_saw_api": null,
    "setup_completed_at": null,
    "mounted_tool_id": null,
    "name": "Beetroot",
    "ota_hour": 3,
    "ota_hour_utc": 19,
    "serial_numb

POST /api/export_data

Response

null

GET /api/farm_events

Response

[

]

GET /api/farm_events

Response

[
  {
    "id": 8,
    "created_at": "2021-04-30T16:27:36.678Z",
    "updated_at": "2021-04-30T16:27:36.678Z",
    "start_time": "2021-04-26T00:00:00.000Z",
    "end_time": "2023-04-30T16:27:36.631Z",
    "repeat": 5,
    "time_unit": "never",
    "executable_id": 53,
    "executable_type": "Sequence",
    "body": [

    ]
  },
  {
    "id": 9,
    "created_at": "2021-04-30T16:27:36.730Z",
    "updated_at": "2021-04-30T16:27:36.730Z",
    "start_time": "2021-04-25T00:00:00.000Z",
    "end_time":

(NOT OK) POST /api/farm_events

Notes: This is how you could create a FarmEvent that fires every 4 minutes.

Request

{
  "executable_id": 70,
  "executable_type": "Sequence",
  "start_time": "2021-04-30T16:28:40.848+00:00",
  "end_time": "2029-02-17T18:19:20.000Z",
  "repeat": 4,
  "time_unit": "minutely"
}

Response

{
  "occurrences": "Farm events can't have more than 500 occurrences (1026028 occurrences detected)."
}

POST /api/farm_events

Request

{
  "start_time": "2021-04-16T16:27:40.899+00:00",
  "time_unit": "never",
  "executable_id": 16,
  "executable_type": "Regimen",
  "end_time": "2017-06-05T18:34:00.000Z",
  "repeat": 1
}

Response

{
  "id": 19,
  "created_at": "2021-04-30T16:27:40.911Z",
  "updated_at": "2021-04-30T16:27:40.914Z",
  "start_time": "2021-04-16T16:27:40.899Z",
  "end_time": "2021-04-16T16:28:40.899Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 16,
  "executable_type": "Regimen",
  "body": [

  ]
}

GET /api/farm_events

Response

[
  {
    "id": 20,
    "created_at": "2021-04-30T16:27:40.964Z",
    "updated_at": "2021-04-30T16:27:40.968Z",
    "start_time": "2021-04-30T17:27:22.746Z",
    "end_time": "2021-04-30T17:28:22.746Z",
    "repeat": 1,
    "time_unit": "never",
    "executable_id": 17,
    "executable_type": "Regimen",
    "body": [

    ]
  }
]

POST /api/farm_events

Request

{
  "end_time": "2021-04-30T16:27:41.190+00:00",
  "time_unit": "never",
  "executable_id": 71,
  "executable_type": "Sequence",
  "repeat": 1
}

Response

{
  "id": 22,
  "created_at": "2021-04-30T16:27:41.198Z",
  "updated_at": "2021-04-30T16:27:41.202Z",
  "start_time": "2021-04-30T16:27:18.307Z",
  "end_time": "2021-04-30T16:28:18.307Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 71,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farm_events

Request

{
  "start_time": "2021-04-30T17:27:22.746+00:00",
  "next_time": "2017-06-05T18:33:04.342Z",
  "time_unit": "never",
  "executable_id": 20,
  "executable_type": "Regimen",
  "end_time": "2017-06-05T18:34:00.000Z",
  "repeat": 1,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "wow",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 31
          }
        }
      }
    }
  ]
}

Response

{
  "id": 23,
  "created_at": "2021-04-30T16:27:41.273Z",
  "updated_at": "2021-04-30T16:27:41.343Z",
  "start_time": "2021-04-30T17:27:22.746Z",
  "end_time": "2021-04-30T17:28:22.746Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 20,
  "executable_type": "Regimen",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "wow",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 31
          }
        }
   

POST /api/farm_events

Notes: This is how you could create a FarmEvent that fires every 4 days.

Request

{
  "executable_id": 72,
  "executable_type": "Sequence",
  "start_time": "2021-04-30T16:28:41.466+00:00",
  "end_time": "2021-05-30T16:27:41.466+00:00",
  "repeat": 4,
  "time_unit": "daily"
}

Response

{
  "id": 24,
  "created_at": "2021-04-30T16:27:41.478Z",
  "updated_at": "2021-04-30T16:27:41.482Z",
  "start_time": "2021-04-30T16:28:41.466Z",
  "end_time": "2021-05-30T16:27:41.466Z",
  "repeat": 4,
  "time_unit": "daily",
  "executable_id": 72,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/10

Request

{
  "body": [

  ]
}

Response

{
  "id": 10,
  "created_at": "2021-04-30T16:27:38.399Z",
  "updated_at": "2021-04-30T16:27:38.550Z",
  "start_time": "2021-04-25T00:00:00.000Z",
  "end_time": "2021-05-05T00:01:00.000Z",
  "repeat": 7,
  "time_unit": "hourly",
  "executable_id": 55,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/11

Request

{
  "id": 11,
  "farm_event": {
    "repeat": 66
  }
}

Response

{
  "id": 11,
  "created_at": "2021-04-30T16:27:38.647Z",
  "updated_at": "2021-04-30T16:27:38.670Z",
  "start_time": "2021-04-27T00:00:00.000Z",
  "end_time": "2021-05-03T00:01:00.000Z",
  "repeat": 9,
  "time_unit": "yearly",
  "executable_id": 56,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/12

Request

{
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "bar",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "x": 1,
            "y": 2,
            "z": 3
          }
        }
      }
    }
  ]
}

Response

{
  "id": 12,
  "created_at": "2021-04-30T16:27:38.756Z",
  "updated_at": "2021-04-30T16:27:38.853Z",
  "start_time": "2021-04-26T00:00:00.000Z",
  "end_time": "2021-05-03T00:01:00.000Z",
  "repeat": 6,
  "time_unit": "hourly",
  "executable_id": 57,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "bar",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "x": 1,
            "y": 2,
   

PATCH /api/farm_events/13

Request

{
  "body": null
}

Response

{
  "id": 13,
  "created_at": "2021-04-30T16:27:38.982Z",
  "updated_at": "2021-04-30T16:27:39.063Z",
  "start_time": "2021-04-28T00:00:00.000Z",
  "end_time": "2021-05-03T00:01:00.000Z",
  "repeat": 7,
  "time_unit": "daily",
  "executable_id": 58,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
    

PATCH /api/farm_events/14

Request

{
  "id": 14,
  "repeat": 1,
  "time_unit": "never"
}

Response

{
  "id": 14,
  "created_at": "2021-04-30T16:27:39.176Z",
  "updated_at": "2021-04-30T16:27:39.198Z",
  "start_time": "2021-04-27T00:00:00.000Z",
  "end_time": "2021-04-27T00:01:00.000Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 59,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/15

Request

{
  "body": null
}

Response

{
  "id": 15,
  "created_at": "2021-04-30T16:27:39.280Z",
  "updated_at": "2021-04-30T16:27:39.361Z",
  "start_time": "2021-04-27T00:00:00.000Z",
  "end_time": "2021-05-03T00:01:00.000Z",
  "repeat": 6,
  "time_unit": "hourly",
  "executable_id": 60,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
   

DELETE /api/farm_events/3

Response

Empty Response

GET /api/farm_events/35

Response

{
  "id": 35,
  "created_at": "2021-04-30T16:28:32.123Z",
  "updated_at": "2021-04-30T16:28:32.123Z",
  "start_time": "2021-04-26T00:00:00.000Z",
  "end_time": "2023-04-30T16:28:32.075Z",
  "repeat": 7,
  "time_unit": "daily",
  "executable_id": 217,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farmware_envs

Request

{
  "key": "Coffee Emoji",
  "value": "☕"
}

Response

{
  "id": 306,
  "device_id": 458,
  "key": "Coffee Emoji",
  "value": "☕",
  "created_at": "2021-04-30T16:28:03.315Z",
  "updated_at": "2021-04-30T16:28:03.315Z"
}

GET /api/farmware_envs

Response

[
  {
    "id": 307,
    "device_id": 459,
    "key": "Barrier",
    "value": "Growth",
    "created_at": "2021-04-30T16:28:03.346Z",
    "updated_at": "2021-04-30T16:28:03.346Z"
  },
  {
    "id": 308,
    "device_id": 459,
    "key": "Flash",
    "value": "Submission",
    "created_at": "2021-04-30T16:28:03.354Z",
    "updated_at": "2021-04-30T16:28:03.354Z"
  },
  {
    "id": 309,
    "device_id": 459,
    "key": "Pin Missile",
    "value": "Psybeam",
    "created_at": "2021-04-30T16:28:03.36

POST /api/farmware_envs

Request

{
  "key": "compund_data",
  "value": {
    "x": "y",
    "z": 300
  }
}

Response

{
  "id": 318,
  "device_id": 464,
  "key": "compund_data",
  "value": {
    "x": "y",
    "z": 300
  },
  "created_at": "2021-04-30T16:28:05.303Z",
  "updated_at": "2021-04-30T16:28:05.303Z"
}

DELETE /api/farmware_envs/312

Response

Empty Response

PUT /api/farmware_envs/313

Request

{
  "key": "tcirtsnoC",
  "value": "malS ydoB"
}

Response

{
  "device_id": 461,
  "key": "tcirtsnoC",
  "value": "malS ydoB",
  "id": 313,
  "created_at": "2021-04-30T16:28:03.474Z",
  "updated_at": "2021-04-30T16:28:03.490Z"
}

GET /api/farmware_envs/314

Response

{
  "id": 314,
  "device_id": 462,
  "key": "Hydro Pump",
  "value": "Pin Missile",
  "created_at": "2021-04-30T16:28:03.524Z",
  "updated_at": "2021-04-30T16:28:03.524Z"
}

DELETE /api/farmware_envs/all

Response

Empty Response

GET /api/farmware_installations

Response

[
  {
    "id": 12,
    "created_at": "2021-04-30T16:27:37.963Z",
    "updated_at": "2021-04-30T16:27:37.963Z",
    "url": "http://pfannerstill.io/yvette.casper/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 13,
    "created_at": "2021-04-30T16:27:37.980Z",
    "updated_at": "2021-04-30T16:27:37.980Z",
    "url": "http://marquardt.co/kimberley_marvin/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 14,
    "created_at": "2021-04

POST /api/farmware_installations

Request

{
  "url": "http://hessel.biz/aaron_kub/manifest.json"
}

Response

{
  "id": 15,
  "created_at": "2021-04-30T16:27:38.108Z",
  "updated_at": "2021-04-30T16:27:38.108Z",
  "url": "http://hessel.biz/aaron_kub/manifest.json",
  "package": null,
  "package_error": null
}

POST /api/farmware_installations/10/refresh

Response

{
  "id": 10,
  "created_at": "2021-04-30T16:27:37.854Z",
  "updated_at": "2021-04-30T16:27:37.854Z",
  "url": "http://mayert.name/brent.mckenzie/manifest.json",
  "package": null,
  "package_error": null
}

GET /api/farmware_installations/11

Response

{
  "id": 11,
  "created_at": "2021-04-30T16:27:37.893Z",
  "updated_at": "2021-04-30T16:27:37.893Z",
  "url": "http://kling-marvin.net/freddy.jones/manifest.json",
  "package": null,
  "package_error": null
}

DELETE /api/farmware_installations/9

Response

Empty Response

GET /api/fbos_config

Response

{
  "id": 6,
  "created_at": "2021-04-30T16:27:42.386Z",
  "updated_at": "2021-04-30T16:27:42.386Z",
  "device_id": 246,
  "disable_factory_reset": true,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "os_auto_update": true,
  "arduino_debug_messages": false,
  "firmware_path": null,
  "firmware_debug_log": false,
  "updat

PUT /api/fbos_config

Request

{
  "updated_at": "2021-04-28T16:27:42.463Z",
  "network_not_found_timer": 20
}

Response

{
  "id": 8,
  "created_at": "2021-04-30T16:27:42.458Z",
  "updated_at": "2021-04-28T16:27:42.463Z",
  "device_id": 248,
  "disable_factory_reset": true,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": 20,
  "firmware_hardware": null,
  "os_auto_update": true,
  "arduino_debug_messages": false,
  "firmware_path": null,
  "firmware_debug_log": false,
  "update_

PUT /api/fbos_config

Request

{
  "blah_blah_blah": true
}

Response

{
  "id": 9,
  "created_at": "2021-04-30T16:27:42.501Z",
  "updated_at": "2021-04-30T16:27:42.501Z",
  "device_id": 249,
  "disable_factory_reset": true,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "os_auto_update": true,
  "arduino_debug_messages": false,
  "firmware_path": null,
  "firmware_debug_log": false,
  "updat

PUT /api/fbos_config

Request

{
  "disable_factory_reset": false
}

Response

{
  "id": 11,
  "created_at": "2021-04-30T16:27:42.566Z",
  "updated_at": "2021-04-30T16:27:42.578Z",
  "device_id": 251,
  "disable_factory_reset": false,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "os_auto_update": true,
  "arduino_debug_messages": false,
  "firmware_path": null,
  "firmware_debug_log": false,
  "upd

PUT /api/fbos_config

Request

{
  "device_id": 99
}

Response

{
  "id": 12,
  "created_at": "2021-04-30T16:27:42.608Z",
  "updated_at": "2021-04-30T16:27:42.608Z",
  "device_id": 252,
  "disable_factory_reset": true,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "os_auto_update": true,
  "arduino_debug_messages": false,
  "firmware_path": null,
  "firmware_debug_log": false,
  "upda

DELETE /api/fbos_config

Response

Empty Response

POST /api/feedback

Request

{
  "message": "Example message",
  "slug": "Example slug"
}

Response

{
}

GET /api/firmware_config

Response

{
  "id": 2,
  "created_at": "2021-04-30T16:27:28.104Z",
  "updated_at": "2021-04-30T16:27:28.104Z",
  "device_id": 73,
  "encoder_enabled_x": 0,
  "encoder_enabled_y": 0,
  "encoder_enabled_z": 0,
  "encoder_invert_x": 0,
  "encoder_invert_y": 0,
  "encoder_invert_z": 0,
  "encoder_missed_steps_decay_x": 5,
  "encoder_missed_steps_decay_y": 5,
  "encoder_missed_steps_decay_z": 5,
  "encoder_missed_steps_max_x": 5,
  "encoder_missed_steps_max_y": 5,
  "encoder_missed_steps_max_z": 5,
  "encoder_

PUT /api/firmware_config

Request

{
  "pin_guard_5_time_out": 23,
  "firmware_debug_log": true,
  "firmware_input_log": true,
  "firmware_output_log": true
}

Response

{
  "id": 3,
  "created_at": "2021-04-30T16:27:28.151Z",
  "updated_at": "2021-04-30T16:27:28.167Z",
  "device_id": 74,
  "encoder_enabled_x": 0,
  "encoder_enabled_y": 0,
  "encoder_enabled_z": 0,
  "encoder_invert_x": 0,
  "encoder_invert_y": 0,
  "encoder_invert_z": 0,
  "encoder_missed_steps_decay_x": 5,
  "encoder_missed_steps_decay_y": 5,
  "encoder_missed_steps_decay_z": 5,
  "encoder_missed_steps_max_x": 5,
  "encoder_missed_steps_max_y": 5,
  "encoder_missed_steps_max_z": 5,
  "encoder_

PUT /api/firmware_config

Request

{
  "device_id": 99
}

Response

{
  "id": 4,
  "created_at": "2021-04-30T16:27:28.203Z",
  "updated_at": "2021-04-30T16:27:28.203Z",
  "device_id": 75,
  "encoder_enabled_x": 0,
  "encoder_enabled_y": 0,
  "encoder_enabled_z": 0,
  "encoder_invert_x": 0,
  "encoder_invert_y": 0,
  "encoder_invert_z": 0,
  "encoder_missed_steps_decay_x": 5,
  "encoder_missed_steps_decay_y": 5,
  "encoder_missed_steps_decay_z": 5,
  "encoder_missed_steps_max_x": 5,
  "encoder_missed_steps_max_y": 5,
  "encoder_missed_steps_max_z": 5,
  "encoder_

DELETE /api/firmware_config

Response

Empty Response

GET /api/first_party_farmwares

Response

[
  {
    "id": 1,
    "created_at": "2019-08-14 18:33:08.428306",
    "updated_at": "2019-08-14 18:33:08.428306",
    "url": "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/main/packages/take-photo/manifest_v2.json",
    "package": "take-photo",
    "package_error": null
  },
  {
    "id": 2,
    "created_at": "2019-08-14 18:33:08.428306",
    "updated_at": "2019-08-14 18:33:08.428306",
    "url": "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/main/package

GET /api/first_party_farmwares/2

Response

{
  "id": 2,
  "created_at": "2019-08-14 18:33:08.428306",
  "updated_at": "2019-08-14 18:33:08.428306",
  "url": "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/main/packages/camera-calibration/manifest_v2.json",
  "package": "camera-calibration",
  "package_error": null
}

GET /api/folders

Response

[
  {
    "id": 3,
    "created_at": "2021-04-30T16:27:28.758Z",
    "updated_at": "2021-04-30T16:27:28.758Z",
    "parent_id": null,
    "color": "red",
    "name": "parent"
  }
]

POST /api/folders

Request

{
  "parent_id": 8,
  "color": "blue",
  "name": "child"
}

Response

{
  "id": 9,
  "created_at": "2021-04-30T16:27:28.939Z",
  "updated_at": "2021-04-30T16:27:28.939Z",
  "parent_id": 8,
  "color": "blue",
  "name": "child"
}

GET /api/folders/4

Response

{
  "id": 4,
  "created_at": "2021-04-30T16:27:28.797Z",
  "updated_at": "2021-04-30T16:27:28.797Z",
  "parent_id": null,
  "color": "red",
  "name": "parent"
}

PATCH /api/folders/6

Request

{
  "name": "C",
  "color": "red",
  "parent_id": null
}

Response

{
  "id": 6,
  "created_at": "2021-04-30T16:27:28.836Z",
  "updated_at": "2021-04-30T16:27:28.849Z",
  "parent_id": null,
  "color": "red",
  "name": "C"
}

DELETE /api/folders/7

Response

Empty Response

GET /api/global_bulletins/Jicama

Response

{
  "id": 1,
  "created_at": "2021-04-30T16:27:37.297Z",
  "updated_at": "2021-04-30T16:27:37.297Z",
  "href": "https://farm.bot/blogs/news/pre-order-farmbot-genesis-xl-v1-5",
  "href_label": "Click here!",
  "slug": "Jicama",
  "title": null,
  "type": "info",
  "content": "we're now accepting pre-orders for Genesis XL v1.5!"
}

GET /api/global_config

Response

{
  "PING": "INITIAL_889f7bce04ea825263d01bc577f865af"
}

GET /api/global_config

Response

{
  "PING": "39317b9b4ba9adc040112573879fb6b9"
}

GET /api/images

Response

[
  {
    "id": 3,
    "created_at": "2021-04-30T16:27:27.653Z",
    "updated_at": "2021-04-30T16:27:27.653Z",
    "device_id": 67,
    "attachment_processed_at": null,
    "attachment_url": "http://192.168.1.112:3000/placeholder_farmbot.jpg?text=Processing...",
    "meta": {
      "x": 1,
      "y": 2,
      "z": 3
    }
  }
]

POST /api/images

Request

{
  "attachment_url": "https://cdn.shopify.com/s/files/1/2040/0289/files/FarmBot.io_Trimmed_Logo_Gray_on_Transparent_1_434x200.png?v=1525220371",
  "meta": {
    "x": 1,
    "z": 3
  }
}

Response

{
  "id": 4,
  "created_at": "2021-04-30T16:27:27.704Z",
  "updated_at": "2021-04-30T16:27:27.704Z",
  "device_id": 68,
  "attachment_processed_at": null,
  "attachment_url": "http://192.168.1.112:3000/placeholder_farmbot.jpg?text=Processing...",
  "meta": {
    "x": 1.0,
    "z": 3.0
  }
}

GET /api/images/1

Response

{
  "id": 1,
  "created_at": "2021-04-30T16:27:27.589Z",
  "updated_at": "2021-04-30T16:27:27.589Z",
  "device_id": 66,
  "attachment_processed_at": null,
  "attachment_url": "http://192.168.1.112:3000/placeholder_farmbot.jpg?text=Processing...",
  "meta": {
    "x": 1,
    "y": 2,
    "z": 3
  }
}

DELETE /api/images/5

Response

Empty Response

GET /api/logs

Response

[
  {
    "id": 6,
    "created_at": 1619799827,
    "updated_at": "2021-04-30T16:27:47.289Z",
    "channels": [
      "toast"
    ],
    "message": "e-enable collaborative channels",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "busy",
    "verbosity": 1,
    "x": 156.0,
    "y": -141.0,
    "z": 311.0
  },
  {
    "id": 7,
    "created_at": 1619799767,
    "updated_at": "2021-04-30T16:27:47.294Z",
    "channels": [
      "toast"
    ],
    "message": "ben

GET /api/logs

Response

[
  {
    "id": 181,
    "created_at": 1619800068,
    "updated_at": "2021-04-30T16:27:48.738Z",
    "channels": [

    ],
    "message": null,
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "info",
    "verbosity": 1,
    "x": null,
    "y": null,
    "z": null
  },
  {
    "id": 180,
    "created_at": 1619800068,
    "updated_at": "2021-04-30T16:27:48.734Z",
    "channels": [

    ],
    "message": null,
    "meta": null,
    "major_version": null,
    "min

POST /api/logs

Request

{
  "message": "HELLO"
}

Response

{
  "id": 187,
  "created_at": 1619800068,
  "updated_at": "2021-04-30T16:27:48.844Z",
  "channels": [

  ],
  "message": "HELLO",
  "meta": null,
  "major_version": null,
  "minor_version": null,
  "type": "info",
  "verbosity": 1,
  "x": null,
  "y": null,
  "z": null
}

POST /api/logs

Request

{
  "channels": [

  ],
  "major_version": 8,
  "message": "HELLO",
  "minor_version": 4,
  "type": "assertion",
  "verbosity": 1,
  "x": 0,
  "y": 0,
  "z": 0
}

Response

{
  "id": 204,
  "created_at": 1619800069,
  "updated_at": "2021-04-30T16:27:49.045Z",
  "channels": [

  ],
  "message": "HELLO",
  "meta": null,
  "major_version": 8,
  "minor_version": 4,
  "type": "assertion",
  "verbosity": 1,
  "x": 0.0,
  "y": 0.0,
  "z": 0.0
}

POST /api/logs

Request

{
  "channels": [

  ],
  "major_version": 8,
  "message": "HELLO",
  "minor_version": 4,
  "type": "success",
  "verbosity": 1,
  "x": 0,
  "y": 0,
  "z": 0
}

Response

{
  "id": 215,
  "created_at": 1619800069,
  "updated_at": "2021-04-30T16:27:49.542Z",
  "channels": [

  ],
  "message": "HELLO",
  "meta": null,
  "major_version": 8,
  "minor_version": 4,
  "type": "success",
  "verbosity": 1,
  "x": 0.0,
  "y": 0.0,
  "z": 0.0
}

POST /api/logs

Request

{
  "meta": {
    "x": 1,
    "y": 2,
    "z": 3,
    "type": "info"
  },
  "channels": [
    "fatal_email"
  ],
  "message": "KABOOOOMM - SYSTEM ERROR!"
}

Response

{
  "id": 221,
  "created_at": 1619800069,
  "updated_at": "2021-04-30T16:27:49.625Z",
  "channels": [
    "fatal_email"
  ],
  "message": "KABOOOOMM - SYSTEM ERROR!",
  "meta": null,
  "major_version": null,
  "minor_version": null,
  "type": "info",
  "verbosity": 1,
  "x": null,
  "y": null,
  "z": null
}

POST /api/logs

Request

{
  "created_at": 1619665789,
  "meta": {
    "x": 1,
    "y": 2,
    "z": 3,
    "type": "info"
  },
  "channels": [
    "toast"
  ],
  "message": "Hello, world!"
}

Response

{
  "id": 227,
  "created_at": 1619665789,
  "updated_at": "2021-04-30T16:27:49.722Z",
  "channels": [
    "toast"
  ],
  "message": "Hello, world!",
  "meta": null,
  "major_version": null,
  "minor_version": null,
  "type": "info",
  "verbosity": 1,
  "x": null,
  "y": null,
  "z": null
}

DELETE /api/logs/123

Notes: WARNING: All logs will be deleted upon request, regardless of the specific log id provided.

Response

Empty Response

DELETE /api/logs/all

Response

Empty Response

GET /api/logs/search

Request

{
  "x": "-10"
}

Response

[
  {
    "id": 16,
    "created_at": 1619799227,
    "updated_at": "2021-04-30T16:27:47.427Z",
    "channels": [
      "toast"
    ],
    "message": "This is -10.0",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "warn",
    "verbosity": 1,
    "x": -10.0,
    "y": 508.0,
    "z": 74.0
  }
]

GET /api/logs/search

Response

[

]

GET /api/logs/search

Response

[
  {
    "id": 51,
    "created_at": 1619797127,
    "updated_at": "2021-04-30T16:27:47.882Z",
    "channels": [
      "toast"
    ],
    "message": "seize value-added ROI",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "success",
    "verbosity": 1,
    "x": -96.0,
    "y": -716.0,
    "z": 209.0
  },
  {
    "id": 52,
    "created_at": 1619797067,
    "updated_at": "2021-04-30T16:27:47.889Z",
    "channels": [
      "toast"
    ],
    "message": "engage B

PUT /api/password_resets

Request

{
  "password": "xpassword123",
  "password_confirmation": "xpassword123",
  "fbos_version": {
    "version": "999.9.9",
    "segments": null
  },
  "id": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJuYW5uaWVfYmFydGVsbEB3YWx0ZXIuaW5mbyIsImlhdCI6MTYxOTgwMDA3NywianRpIjoiNzdiNGQyMjMtM2U0Mi00ZjQ2LWE4ZmUtMDk0NWViMzNkOTU4IiwiaXNzIjoiLy8xOTIuMTY4LjEuMTEyOjMwMDAiLCJleHAiOjE2MTk4ODY0NzcsImF1ZCI6IlBBU1NXT1JEX1JFU0VURVIifQ.gs-n1l3fmUKaoPwvqxpXgUgk9FSOJfCmIlQrn60kqY998DWesGrPTkyn9-AcjAACXc3b9fA1cW7oZfpn

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 236,
      "iat": 1619800077,
      "jti": "9f4f92a3-0c8a-4c7a-ab52-07c69aa3e703",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984077,
      "mqtt": "blooper.io",
      "bot": "device_398",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyMzYsImlhdCI6MTYxOTgwMDA3NywianRpIjoiOWY0ZjkyYTMtMGM4YS00YzdhLWFiNTItMDdjNj

POST /api/password_resets

Request

{
  "email": "merlin@powlowski.io"
}

Response

{
  "status": "Check your email!"
}

POST /api/peripherals

Request

{
  "pin": 13,
  "label": "LED"
}

Response

{
  "id": 7,
  "created_at": "2021-04-30T16:27:37.727Z",
  "updated_at": "2021-04-30T16:27:37.727Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

GET /api/peripherals

Response

[
  {
    "id": 12,
    "created_at": "2021-04-30T16:27:46.334Z",
    "updated_at": "2021-04-30T16:27:46.334Z",
    "pin": 8,
    "label": "MyString",
    "mode": 0
  },
  {
    "id": 13,
    "created_at": "2021-04-30T16:27:46.342Z",
    "updated_at": "2021-04-30T16:27:46.342Z",
    "pin": 9,
    "label": "MyString",
    "mode": 0
  }
]

PATCH /api/peripherals/1

Request

{
  "pin": 9
}

Response

{
  "id": 1,
  "created_at": "2021-04-30T16:27:24.747Z",
  "updated_at": "2021-04-30T16:27:24.774Z",
  "pin": 9,
  "label": "MyString",
  "mode": 0
}

DELETE /api/peripherals/5

Response

{
  "id": 5,
  "created_at": "2021-04-30T16:27:25.017Z",
  "updated_at": "2021-04-30T16:27:25.017Z",
  "pin": 5,
  "label": "wow",
  "mode": 0
}

GET /api/peripherals/8

Response

{
  "id": 8,
  "created_at": "2021-04-30T16:27:38.314Z",
  "updated_at": "2021-04-30T16:27:38.314Z",
  "pin": 7,
  "label": "MyString",
  "mode": 0
}

POST /api/pin_bindings

Request

{
  "pin_num": 4,
  "sequence_id": 154
}

Response

{
  "id": 18,
  "created_at": "2021-04-30T16:28:06.624Z",
  "updated_at": "2021-04-30T16:28:06.624Z",
  "device_id": 483,
  "sequence_id": 154,
  "special_action": null,
  "pin_num": 4,
  "binding_type": "standard"
}

GET /api/pin_bindings

Response

[
  {
    "id": 22,
    "created_at": "2021-04-30T16:28:06.864Z",
    "updated_at": "2021-04-30T16:28:06.864Z",
    "device_id": 486,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 20,
    "binding_type": "standard"
  },
  {
    "id": 23,
    "created_at": "2021-04-30T16:28:06.873Z",
    "updated_at": "2021-04-30T16:28:06.873Z",
    "device_id": 486,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 1,
    "binding_type": "standard"
  },
  {
    "id": 24,
 

PUT /api/pin_bindings/15

Request

{
  "pin_num": 4,
  "sequence_id": 153
}

Response

{
  "id": 15,
  "created_at": "2021-04-30T16:28:06.499Z",
  "updated_at": "2021-04-30T16:28:06.538Z",
  "device_id": 482,
  "sequence_id": 153,
  "special_action": null,
  "pin_num": 4,
  "binding_type": "standard"
}

GET /api/pin_bindings/19

Response

{
  "id": 19,
  "created_at": "2021-04-30T16:28:06.743Z",
  "updated_at": "2021-04-30T16:28:06.743Z",
  "device_id": 485,
  "sequence_id": null,
  "special_action": null,
  "pin_num": 0,
  "binding_type": "standard"
}

DELETE /api/pin_bindings/25

Response

Empty Response

GET /api/plant_templates

Response

[
  {
    "id": 20,
    "saved_garden_id": 26,
    "device_id": 450,
    "radius": 1.5,
    "x": 500.0,
    "y": 343.0,
    "z": 326.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "2021-04-30T16:28:00.361Z",
    "updated_at": "2021-04-30T16:28:00.361Z"
  },
  {
    "id": 21,
    "saved_garden_id": 27,
    "device_id": 450,
    "radius": 1.5,
    "x": 489.0,
    "y": 428.0,
    "z": 523.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "202

POST /api/plant_templates

Request

{
  "name": "Zucchini",
  "saved_garden_id": 35,
  "x": 1,
  "y": 2,
  "z": 3,
  "openfarm_slug": "tomato",
  "radius": 32
}

Response

{
  "id": 29,
  "saved_garden_id": 35,
  "device_id": 453,
  "radius": 32.0,
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "name": "Zucchini",
  "openfarm_slug": "tomato",
  "created_at": "2021-04-30T16:28:00.599Z",
  "updated_at": "2021-04-30T16:28:00.599Z"
}

DELETE /api/plant_templates/17

Response

Empty Response

PUT /api/plant_templates/23

Request

{
  "name": "Pumpkin",
  "x": 9,
  "y": 10,
  "z": 11,
  "openfarm_slug": "melon",
  "radius": 32
}

Response

{
  "device_id": 451,
  "radius": 32.0,
  "x": 9.0,
  "y": 10.0,
  "z": 11.0,
  "name": "Pumpkin",
  "openfarm_slug": "melon",
  "id": 23,
  "saved_garden_id": 29,
  "created_at": "2021-04-30T16:28:00.433Z",
  "updated_at": "2021-04-30T16:28:00.473Z"
}

PUT /api/plant_templates/26

Request

{
  "saved_garden_id": 33
}

Response

{
  "device_id": 452,
  "saved_garden_id": 33,
  "id": 26,
  "radius": 1.5,
  "x": 339.0,
  "y": 340.0,
  "z": 426.0,
  "name": "untitled",
  "openfarm_slug": "lettuce",
  "created_at": "2021-04-30T16:28:00.509Z",
  "updated_at": "2021-04-30T16:28:00.555Z"
}

GET /api/point_groups

Response

[
  {
    "id": 19,
    "created_at": "2021-04-30T16:28:00.647Z",
    "updated_at": "2021-04-30T16:28:00.647Z",
    "name": "PG test 0",
    "point_ids": [

    ],
    "sort_type": "xy_ascending",
    "criteria": {
      "day": {
        "op": "<",
        "days_ago": 0
      },
      "string_eq": {
      },
      "number_eq": {
      },
      "number_lt": {
      },
      "number_gt": {
      }
    }
  },
  {
    "id": 20,
    "created_at": "2021-04-30T16:28:00.700Z",
    "updated_at": "2021-04

POST /api/point_groups

Request

{
  "name": "Criteria group",
  "point_ids": [
    287,
    288,
    289
  ],
  "criteria": {
    "string_eq": {
      "openfarm_slug": [
        "carrot"
      ]
    },
    "number_eq": {
      "z": [
        24,
        25,
        26
      ]
    },
    "number_lt": {
      "x": 4,
      "y": 4
    },
    "number_gt": {
      "x": 1,
      "y": 1
    },
    "day": {
      "op": "<",
      "days_ago": 0
    }
  }
}

Response

{
  "id": 71,
  "created_at": "2021-04-30T16:28:31.936Z",
  "updated_at": "2021-04-30T16:28:31.936Z",
  "name": "Criteria group",
  "point_ids": [
    287,
    288,
    289
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
      "openfarm_slug": [
        "carrot"
      ]
    },
    "number_eq": {
      "z": [
        24,
        25,
        26
      ]
    },
    "number_lt": {
      "x": 4,
      "y": 4
    },
    "nu

POST /api/point_groups

Request

{
  "name": "this is a group",
  "point_ids": [
    290,
    291,
    292
  ]
}

Response

{
  "id": 72,
  "created_at": "2021-04-30T16:28:32.030Z",
  "updated_at": "2021-04-30T16:28:32.030Z",
  "name": "this is a group",
  "point_ids": [
    290,
    291,
    292
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

PUT /api/point_groups/1

Request

{
  "name": "new name",
  "point_ids": [
    20,
    21,
    22,
    18,
    19
  ]
}

Response

{
  "id": 1,
  "created_at": "2021-04-30T16:27:28.374Z",
  "updated_at": "2021-04-30T16:27:28.465Z",
  "name": "new name",
  "point_ids": [
    18,
    19,
    20,
    21,
    22
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

PUT /api/point_groups/2

Request

{
  "point_ids": [

  ],
  "criteria": {
    "string_eq": {
      "name": [
        "carrot"
      ]
    },
    "number_eq": {
      "x": [
        42,
        52,
        62
      ]
    },
    "number_lt": {
      "y": 8
    },
    "number_gt": {
      "z": 2
    },
    "day": {
      "op": ">",
      "days_ago": 10
    }
  }
}

Response

{
  "id": 2,
  "created_at": "2021-04-30T16:27:28.501Z",
  "updated_at": "2021-04-30T16:27:28.531Z",
  "name": "XYZ",
  "point_ids": [

  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": ">",
      "days_ago": 10
    },
    "string_eq": {
      "name": [
        "carrot"
      ]
    },
    "number_eq": {
      "x": [
        42,
        52,
        62
      ]
    },
    "number_lt": {
      "y": 8
    },
    "number_gt": {
      "z": 2
    }
  }
}

DELETE /api/point_groups/7

Response

Empty Response

GET /api/point_groups/8

Response

{
  "id": 8,
  "created_at": "2021-04-30T16:27:37.179Z",
  "updated_at": "2021-04-30T16:27:37.179Z",
  "name": "x",
  "point_ids": [

  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

GET /api/point_groups/9

Response

{
  "id": 9,
  "created_at": "2021-04-30T16:27:37.274Z",
  "updated_at": "2021-04-30T16:27:37.274Z",
  "name": "PointGroups#show test",
  "point_ids": [

  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

GET /api/points

Notes: If you want to see previously deleted points, add ?filter=old to the end of the URL.

Response

[
  {
    "id": 2,
    "created_at": "2021-04-30T16:27:26.293Z",
    "updated_at": "2021-04-30T16:27:26.293Z",
    "device_id": 50,
    "name": "new",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-04-30T16:27:26.293Z",
    "radius": 50.0
  }
]

GET /api/points

Notes: If you want to see previously deleted points alongside your active points, add ?filter=all to the end of the URL.

Request

{
  "filter": "all"
}

Response

[
  {
    "id": 3,
    "created_at": "2021-04-30T16:27:26.379Z",
    "updated_at": "2021-04-30T16:27:26.379Z",
    "device_id": 51,
    "name": "old",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-04-30T16:27:26.379Z",
    "radius": 50.0
  },
  {
    "id": 4,
    "created_at": "2021-04-30T16:27:26.389Z",
    "updated_at": "2021-04-30T16:27:26.389Z",
    "device_id": 51,
 

GET /api/points

Response

[
  {
    "id": 5,
    "created_at": "2021-04-30T16:27:26.437Z",
    "updated_at": "2021-04-30T16:27:26.437Z",
    "device_id": 52,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 463.0,
    "y": 488.0,
    "z": 502.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 6,
    "created_at": "2021-04-30T16:27:26.445Z",
    "updated_at": "2021-04-30T16:27:26.445Z",
    "device_id": 52,
    "name": "untitled",
    "pointer_type": "GenericPointe

GET /api/points

Notes: If you want to see previously deleted points, add ?filter=old to the end of the URL.

Request

{
  "filter": "old"
}

Response

[
  {
    "id": 9,
    "created_at": "2021-04-30T16:27:26.575Z",
    "updated_at": "2021-04-30T16:27:26.575Z",
    "device_id": 54,
    "name": "old",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-04-30T16:27:26.575Z",
    "radius": 50.0
  }
]

GET /api/points

Response

[
  {
    "id": 11,
    "created_at": "2021-04-30T16:27:26.640Z",
    "updated_at": "2021-04-30T16:27:26.640Z",
    "device_id": 55,
    "name": "Cabbage 0",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 0,
    "y": 0,
    "z": 0,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-04-30T16:27:26.640Z",
    "radius": 50.0
  },
  {
    "id": 12,
    "created_at": "2021-04-30T16:27:26.646Z",
    "updated_at": "2021-04-30T16:27:26.646Z",
    "device_id

GET /api/points

Response

[
  {
    "id": 14,
    "created_at": "2021-04-30T16:27:26.705Z",
    "updated_at": "2021-04-30T16:27:26.705Z",
    "device_id": 56,
    "name": "My TS",
    "pointer_type": "ToolSlot",
    "meta": {
    },
    "x": 0.0,
    "y": 0.0,
    "z": 0.0,
    "tool_id": null,
    "pullout_direction": 0,
    "gantry_mounted": false
  }
]

GET /api/points

Response

[
  {
    "id": 15,
    "created_at": "2021-04-30T16:27:26.788Z",
    "updated_at": "2021-04-30T16:27:26.788Z",
    "device_id": 57,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 250.0,
    "y": 23.0,
    "z": 70.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points

Request

{
  "x": 1,
  "y": 2,
  "z": 3,
  "radius": 3,
  "name": "YOLO",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  }
}

Response

{
  "id": 136,
  "created_at": "2021-04-30T16:27:59.560Z",
  "updated_at": "2021-04-30T16:27:59.560Z",
  "device_id": 435,
  "name": "YOLO",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  },
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "radius": 3.0,
  "discarded_at": null
}

POST /api/points

Request

{
  "pointer_type": "ToolSlot",
  "name": "foo",
  "x": 0,
  "y": 0,
  "z": 0
}

Response

{
  "id": 137,
  "created_at": "2021-04-30T16:27:59.613Z",
  "updated_at": "2021-04-30T16:27:59.613Z",
  "device_id": 436,
  "name": "foo",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 0,
  "gantry_mounted": false
}

POST /api/points

Request

{
  "x": 23,
  "y": 45,
  "pointer_type": "Weed"
}

Response

{
  "id": 138,
  "created_at": "2021-04-30T16:27:59.692Z",
  "updated_at": "2021-04-30T16:27:59.692Z",
  "device_id": 438,
  "name": "untitled",
  "pointer_type": "Weed",
  "meta": {
  },
  "x": 23.0,
  "y": 45.0,
  "z": 0.0,
  "radius": 25.0,
  "discarded_at": null,
  "plant_stage": "active"
}

POST /api/points

Request

{
  "x": 23,
  "y": 45,
  "name": "Put me in a salad",
  "pointer_type": "Plant",
  "openfarm_slug": "mung-bean",
  "planted_at": "\"2021-04-29T16:27:59.725+00:00\"",
  "plant_stage": "sprouted"
}

Response

{
  "id": 139,
  "created_at": "2021-04-29T16:27:59.725Z",
  "updated_at": "2021-04-30T16:27:59.733Z",
  "device_id": 439,
  "name": "Put me in a salad",
  "pointer_type": "Plant",
  "meta": {
  },
  "x": 23,
  "y": 45,
  "z": 0,
  "openfarm_slug": "mung-bean",
  "plant_stage": "sprouted",
  "planted_at": "2021-04-29T16:27:59.725Z",
  "radius": 25.0
}

POST /api/points

Request

{
  "name": "Fooo",
  "x": 4,
  "y": 5,
  "z": 6,
  "pointer_type": "ToolSlot"
}

Response

{
  "id": 140,
  "created_at": "2021-04-30T16:27:59.805Z",
  "updated_at": "2021-04-30T16:27:59.805Z",
  "device_id": 441,
  "name": "Fooo",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 4.0,
  "y": 5.0,
  "z": 6.0,
  "tool_id": null,
  "pullout_direction": 0,
  "gantry_mounted": false
}

POST /api/points

Request

{
  "pointer_type": "ToolSlot",
  "name": "foo",
  "x": 0,
  "y": 0,
  "z": 0,
  "pullout_direction": 1
}

Response

{
  "id": 141,
  "created_at": "2021-04-30T16:27:59.882Z",
  "updated_at": "2021-04-30T16:27:59.882Z",
  "device_id": 443,
  "name": "foo",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 1,
  "gantry_mounted": false
}

(NOT OK) POST /api/points

Notes: This is what happens when you post bad JSON

Response

{
  "error": "This is a JSON API. Please use a _valid_ JSON object or array. Validate JSON objects at https://jsonlint.com/"
}

POST /api/points

Request

{
  "x": 1,
  "y": 2,
  "z": 3,
  "radius": 3,
  "name": "test weed",
  "pointer_type": "Weed",
  "meta": {
    "foo": "BAR"
  }
}

Response

{
  "id": 143,
  "created_at": "2021-04-30T16:28:00.018Z",
  "updated_at": "2021-04-30T16:28:00.018Z",
  "device_id": 446,
  "name": "test weed",
  "pointer_type": "Weed",
  "meta": {
    "foo": "BAR"
  },
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "radius": 3.0,
  "discarded_at": null,
  "plant_stage": "active"
}

PUT /api/points/100

Request

{
  "id": 100,
  "x": 23,
  "y": 45,
  "name": "My Lettuce",
  "openfarm_slug": "limestone-lettuce"
}

Response

{
  "id": 100,
  "created_at": "2021-04-30T16:27:49.856Z",
  "updated_at": "2021-04-30T16:27:49.870Z",
  "device_id": 328,
  "name": "My Lettuce",
  "pointer_type": "Plant",
  "meta": {
  },
  "x": 23,
  "y": 45,
  "z": 0,
  "openfarm_slug": "limestone-lettuce",
  "plant_stage": "planned",
  "planted_at": "2021-04-30T16:27:49.856Z",
  "radius": 1.0
}

PUT /api/points/101

Request

{
  "x": 99,
  "y": 87,
  "z": 33,
  "radius": 55,
  "meta": {
    "foo": "BAR"
  }
}

Response

{
  "id": 101,
  "created_at": "2021-04-30T16:27:49.889Z",
  "updated_at": "2021-04-30T16:27:49.914Z",
  "device_id": 329,
  "name": "untitled",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  },
  "x": 99.0,
  "y": 87.0,
  "z": 33.0,
  "radius": 55.0,
  "discarded_at": null
}

PUT /api/points/103

Request

{
  "pullout_direction": 1
}

Response

{
  "id": 103,
  "created_at": "2021-04-30T16:27:49.954Z",
  "updated_at": "2021-04-30T16:27:49.968Z",
  "device_id": 330,
  "name": "untitled",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 1,
  "gantry_mounted": false
}

DELETE /api/points/121

Response

[
  {
    "id": 121,
    "created_at": "2021-04-30T16:27:58.842Z",
    "updated_at": "2021-04-30T16:27:58.842Z",
    "device_id": 430,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 509.0,
    "y": 249.0,
    "z": 247.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

DELETE /api/points/125

Response

[
  {
    "id": 125,
    "created_at": "2021-04-30T16:27:59.159Z",
    "updated_at": "2021-04-30T16:27:59.159Z",
    "device_id": 431,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 10,
    "y": 20,
    "z": 30,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": "2021-04-30T16:27:59.159Z",
    "radius": 1.0
  }
]

DELETE /api/points/128,129,130,131,132,133

Response

[
  {
    "id": 128,
    "created_at": "2021-04-30T16:27:59.339Z",
    "updated_at": "2021-04-30T16:27:59.339Z",
    "device_id": 432,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 152.0,
    "y": 174.0,
    "z": 63.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 129,
    "created_at": "2021-04-30T16:27:59.346Z",
    "updated_at": "2021-04-30T16:27:59.346Z",
    "device_id": 432,
    "name": "untitled",
    "pointer_type": "GenericP

GET /api/points/134

Response

{
  "id": 134,
  "created_at": "2021-04-30T16:27:59.461Z",
  "updated_at": "2021-04-30T16:27:59.461Z",
  "device_id": 433,
  "name": "untitled",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 0,
  "gantry_mounted": false
}

GET /api/points/135

Response

{
  "id": 135,
  "created_at": "2021-04-30T16:27:59.503Z",
  "updated_at": "2021-04-30T16:27:59.509Z",
  "device_id": 434,
  "name": "untitled",
  "pointer_type": "GenericPointer",
  "meta": {
  },
  "x": 189.0,
  "y": 429.0,
  "z": 323.0,
  "radius": 1.5,
  "discarded_at": "2021-04-30T16:27:59.509Z"
}

POST /api/points/search

Request

{
  "meta": {
    "created_by": "plant-detection"
  }
}

Response

[
  {
    "id": 54,
    "created_at": "2021-04-30T16:27:42.729Z",
    "updated_at": "2021-04-30T16:27:42.729Z",
    "device_id": 254,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "created_by": "plant-detection"
    },
    "x": 321.0,
    "y": 51.0,
    "z": 288.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 55,
    "created_at": "2021-04-30T16:27:42.736Z",
    "updated_at": "2021-04-30T16:27:42.736Z",
    "device_id": 254,
    "name": "unti

POST /api/points/search

Request

{
  "pointer_type": "Plant"
}

Response

[
  {
    "id": 58,
    "created_at": "2021-04-30T16:27:42.803Z",
    "updated_at": "2021-04-30T16:27:42.803Z",
    "device_id": 255,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 318,
    "y": 234,
    "z": 75,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": "2021-04-30T16:27:42.803Z",
    "radius": 1.5
  }
]

POST /api/points/search

Request

{
  "x": 23
}

Response

[
  {
    "id": 60,
    "created_at": "2021-04-30T16:27:42.870Z",
    "updated_at": "2021-04-30T16:27:42.870Z",
    "device_id": 257,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 23.0,
    "y": 236.0,
    "z": 65.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

{
  "openfarm_slug": "tomato"
}

Response

[
  {
    "id": 62,
    "created_at": "2021-04-30T16:27:42.913Z",
    "updated_at": "2021-04-30T16:27:42.913Z",
    "device_id": 258,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 390,
    "y": 355,
    "z": 508,
    "openfarm_slug": "tomato",
    "plant_stage": "planned",
    "planted_at": "2021-04-30T16:27:42.913Z",
    "radius": 1.5
  }
]

POST /api/points/search

Request

{
  "meta": {
    "foo1": 1
  }
}

Response

[
  {
    "id": 64,
    "created_at": "2021-04-30T16:27:42.954Z",
    "updated_at": "2021-04-30T16:27:42.954Z",
    "device_id": 259,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "foo1": "1"
    },
    "x": 35.0,
    "y": 370.0,
    "z": 277.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

{
  "created_by": "plant-detection"
}

Response

[

]

POST /api/points/search

Request

{
  "plant_stage": "harvested"
}

Response

[
  {
    "id": 67,
    "created_at": "2021-04-30T16:27:43.029Z",
    "updated_at": "2021-04-30T16:27:43.029Z",
    "device_id": 261,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 128,
    "y": 369,
    "z": 180,
    "openfarm_slug": "lettuce",
    "plant_stage": "harvested",
    "planted_at": "2021-04-30T16:27:43.029Z",
    "radius": 1.5
  }
]

GET /api/public_key

Response

Empty Response

GET /api/regimens

Response

[

]

GET /api/regimens

Response

[
  {
    "id": 3,
    "created_at": "2021-04-30T16:27:25.750Z",
    "updated_at": "2021-04-30T16:27:25.750Z",
    "name": "e0b70e359d85622d682d6710a06c7f98",
    "color": null,
    "device_id": 33,
    "body": [

    ],
    "regimen_items": [

    ]
  }
]

POST /api/regimens

Request

{
  "name": "Pinsir Spearow Gengar",
  "color": "gray",
  "regimen_items": [
    {
      "time_offset": 123,
      "sequence_id": 133
    }
  ]
}

Response

{
  "id": 30,
  "created_at": "2021-04-30T16:27:54.899Z",
  "updated_at": "2021-04-30T16:27:54.906Z",
  "name": "Pinsir Spearow Gengar",
  "color": "gray",
  "device_id": 370,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 12,
      "created_at": "2021-04-30T16:27:54.903Z",
      "updated_at": "2021-04-30T16:27:54.903Z",
      "regimen_id": 30,
      "sequence_id": 133,
      "time_offset": 123
    }
  ]
}

POST /api/regimens

Request

{
  "device": {
    "id": 373,
    "name": "Potatoes",
    "max_log_count": 1000,
    "max_images_count": 450,
    "timezone": "America/Knox_IN",
    "last_saw_api": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2021-04-30T16:27:55.017Z",
    "updated_at": "2021-04-30T16:27:55.017Z",
    "serial_number": "83abc4f31030fa3227af61ecb802cc30",
    "mqtt_rate_limit_email_sent_at": null,
    "ota_hour": 3,
    "fi

Response

{
  "id": 31,
  "created_at": "2021-04-30T16:27:55.109Z",
  "updated_at": "2021-04-30T16:27:55.191Z",
  "name": "specs",
  "color": "red",
  "device_id": 372,
  "body": [
    {
      "kind": "parameter_declaration",
      "args": {
        "label": "parent",
        "default_value": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
            "z": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 13,
      "created_at":

POST /api/regimens

Request

{
  "device": {
    "id": 375,
    "name": "Cornichons",
    "max_log_count": 1000,
    "max_images_count": 450,
    "timezone": "Etc/GMT-12",
    "last_saw_api": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2021-04-30T16:27:55.271Z",
    "updated_at": "2021-04-30T16:27:55.271Z",
    "serial_number": "f8fcd263c4a7eb6c4b75167e2b03226c",
    "mqtt_rate_limit_email_sent_at": null,
    "ota_hour": 3,
    "first

Response

{
  "id": 32,
  "created_at": "2021-04-30T16:27:55.366Z",
  "updated_at": "2021-04-30T16:27:55.431Z",
  "name": "specs",
  "color": "red",
  "device_id": 374,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
            "z": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 14,
      "created_at": "2

PUT /api/regimens/10

Request

{
  "id": 10,
  "name": "something new",
  "color": "blue",
  "regimen_items": [
    {
      "time_offset": 1555500000,
      "sequence_id": 23
    },
    {
      "time_offset": 864300000,
      "sequence_id": 23
    },
    {
      "time_offset": 950700000,
      "sequence_id": 23
    }
  ]
}

Response

{
  "id": 10,
  "created_at": "2021-04-30T16:27:31.249Z",
  "updated_at": "2021-04-30T16:27:31.317Z",
  "name": "something new",
  "color": "blue",
  "device_id": 127,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 5,
      "created_at": "2021-04-30T16:27:31.307Z",
      "updated_at": "2021-04-30T16:27:31.307Z",
      "regimen_id": 10,
      "sequence_id": 23,
      "time_offset": 1555500000
    },
    {
      "id": 6,
      "created_at": "2021-04-30T16:27:31.309Z",
      "updated_at":

GET /api/regimens/35

Response

{
  "id": 35,
  "created_at": "2021-04-30T16:28:34.252Z",
  "updated_at": "2021-04-30T16:28:34.252Z",
  "name": "642e3ffd3d625325d98c2020cf55ec55",
  "color": null,
  "device_id": 524,
  "body": [

  ],
  "regimen_items": [

  ]
}

DELETE /api/regimens/6

Response

Empty Response

PUT /api/regimens/8

Request

{
  "id": 8,
  "name": "something new",
  "color": "blue",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 22
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "time_offset": 950700000,
      "sequence_id": 21
    }
  ]
}

Response

{
  "id": 8,
  "created_at": "2021-04-30T16:27:30.729Z",
  "updated_at": "2021-04-30T16:27:31.108Z",
  "name": "something new",
  "color": "blue",
  "device_id": 125,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 22
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 4,
      "created_at": "2021-04-30T16:27:31.099Z",
      

GET /api/releases

Request

{
  "channel": "stable",
  "platform": "rpi3"
}

Response

{
  "id": 37,
  "created_at": "2021-04-30T16:28:31.537Z",
  "updated_at": "2021-04-30T16:28:31.537Z",
  "image_url": "gopher://localhost:3000/b",
  "version": "1.2.3-rc7",
  "platform": "rpi3",
  "channel": "stable",
  "dot_img_url": null
}

POST /api/rmq/resource

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNDMsImlhdCI6MTYxOTgwMDExNiwianRpIjoiZDZmZTMyNTUtMTFmMy00MjZlLTkzNTktMjM3Y2EwOTIyNzZhIiwiaXNzIjoiLy8xOTIuMTY4LjEuMTEyOjMwMDAiLCJleHAiOjE2MjQ5ODQxMTYsIm1xdHQiOiJibG9vcGVyLmlvIiwiYm90IjoiZGV2aWNlXzUzNCIsInZob3N0IjoiLyIsIm1xdHRfd3MiOiJ3czovL2Jsb29wZXIuaW86MzAwMi93cyJ9.FaPvvXzyi3BJLRdwPVjTq2H4GTsZoiRu6pwtzBJewwCUK1uxhecj8FTKWl9GSfoQcOw2WTOpFG-y-PsbIFB9qm7lshgt8YCik0Nvia0qnvj9j2FHirdZN-Gxggt9tIDsi6D-PIUblqD3eCiB_SzwZ

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozMzQsImlhdCI6MTYxOTgwMDExNCwianRpIjoiOTc2NTQ5NGEtNmU3ZC00Y2NjLTg2ZGUtN2UxMjU5MzNjNGRkIiwiaXNzIjoiLy8xOTIuMTY4LjEuMTEyOjMwMDAiLCJleHAiOjE2MjQ5ODQxMTQsIm1xdHQiOiJibG9vcGVyLmlvIiwiYm90IjoiZGV2aWNlXzUyNSIsInZob3N0IjoiLyIsIm1xdHRfd3MiOiJ3czovL2Jsb29wZXIuaW86MzAwMi93cyJ9.W_6Z8LoYtzUIFy2yvDUlq3WYpWnzPEWSmvvaXzP3rqABzPaej6nzMbKhNmB3WzDRps_TgO2XbYORSeQuu7lwc4QlcLbuC_XUY8Zz0ypBVeoKWZefSqUcGcLs_g4pog6btqZsPQ6THoziylmseRlFj

Response

Empty Response

POST /api/rmq/topic

Request

{
  "permission": "read",
  "routing_key": "demos.d3f91ygdrajxn8jk",
  "username": "farmbot_demo"
}

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNDEsImlhdCI6MTYxOTgwMDExNiwianRpIjoiNGJjZmNlOGUtZjM2ZC00MmM5LTg4MzEtZTJjN2QyZDFiOGI2IiwiaXNzIjoiLy8xOTIuMTY4LjEuMTEyOjMwMDAiLCJleHAiOjE2MjQ5ODQxMTYsIm1xdHQiOiJibG9vcGVyLmlvIiwiYm90IjoiZGV2aWNlXzUzMiIsInZob3N0IjoiLyIsIm1xdHRfd3MiOiJ3czovL2Jsb29wZXIuaW86MzAwMi93cyJ9.hF6EmXL7oZZPtP8Nb9bajcwxmsTTahzemfsa96J_CoYBAcWY9OUVB-JS39zGg5MtIXRFJMsafZ67FXpp03HdNdi3BS37Z-mhjCFamcEBsxMz9CG9m_6r7rMTzpznLpdcy8xixAO2wEjmIYG844Ik9

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNDIsImlhdCI6MTYxOTgwMDExNiwianRpIjoiODNiYTY1YTQtMjdmZC00MDA3LWE3YjktNTAwMmE3NDM1ZGEzIiwiaXNzIjoiLy8xOTIuMTY4LjEuMTEyOjMwMDAiLCJleHAiOjE2MjQ5ODQxMTYsIm1xdHQiOiJibG9vcGVyLmlvIiwiYm90IjoiZGV2aWNlXzUzMyIsInZob3N0IjoiLyIsIm1xdHRfd3MiOiJ3czovL2Jsb29wZXIuaW86MzAwMi93cyJ9.lgCrl8w3LmXY2ZYXeAyDEPjQkmtqpgUqyXSxyTv_LDh9WLDsQIRImLgOGvaI9uMgvUYVcp7ebEHVNOutXQy7DghFbbZ_NBv5VIkjYBWcHbHqtXM7WzaroFtazyWp3S8TbzAwQjXhchwGSXG_K63dh

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozMzksImlhdCI6MTYxOTgwMDExNSwianRpIjoiNTAyMDkwMzAtYTE3Yi00ODFjLTlhZGUtNTY0MDFlMzVkOTliIiwiaXNzIjoiLy8xOTIuMTY4LjEuMTEyOjMwMDAiLCJleHAiOjE2MjQ5ODQxMTUsIm1xdHQiOiJibG9vcGVyLmlvIiwiYm90IjoiZGV2aWNlXzUzMCIsInZob3N0IjoiLyIsIm1xdHRfd3MiOiJ3czovL2Jsb29wZXIuaW86MzAwMi93cyJ9.BWWFkw9jtITMD6LAoMY4udCZ4i0sSGwKGOdkD5sL5HqTZhee45nL3yYT8Tl_0V1VLO6XN0xQVDRIJ0vG2Gw6IQRzy-A8tWsYMyg8Vx371AjFSfSxscazuG59_HpTVscsGXvZaU5LOKPz1b2yFXPyc

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "kajJZtm23ry0rsWj",
  "username": "farmbot_demo"
}

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "37161cedcd8d5d63",
  "username": "admin"
}

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "37161cedcd8d5d63",
  "username": "admin"
}

Response

Empty Response

POST /api/rmq/vhost

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNDAsImlhdCI6MTYxOTgwMDExNiwianRpIjoiMjU5NDk5NzQtZDQ4OS00YWE4LWJkMDktMTVlNzk2NDBjYTkxIiwiaXNzIjoiLy8xOTIuMTY4LjEuMTEyOjMwMDAiLCJleHAiOjE2MjQ5ODQxMTYsIm1xdHQiOiJibG9vcGVyLmlvIiwiYm90IjoiZGV2aWNlXzUzMSIsInZob3N0IjoiLyIsIm1xdHRfd3MiOiJ3czovL2Jsb29wZXIuaW86MzAwMi93cyJ9.BZZhmNCK0gqpfP2OAPCYHgtMOiU6GaUUrC75fZP8zVMW35BqbcYM8KAAazqKKjA-vJOl3qjqmkGC3eTrNrtQwCmUNOikdZPyFirbt__3YahxtERQm9iLJOcnf6bFImV7j5d19dGhZVunIUpSx5CBc

Response

Empty Response

GET /api/saved_gardens

Response

[
  {
    "id": 4,
    "name": "Caeneus",
    "device_id": 131,
    "created_at": "2021-04-30T16:27:31.825Z",
    "updated_at": "2021-04-30T16:27:31.825Z"
  },
  {
    "id": 5,
    "name": "Hercules",
    "device_id": 131,
    "created_at": "2021-04-30T16:27:31.830Z",
    "updated_at": "2021-04-30T16:27:31.830Z"
  },
  {
    "id": 6,
    "name": "Castor",
    "device_id": 131,
    "created_at": "2021-04-30T16:27:31.835Z",
    "updated_at": "2021-04-30T16:27:31.835Z"
  }
]

POST /api/saved_gardens

Request

{
  "name": "Raspberry"
}

Response

{
  "id": 7,
  "name": "Raspberry",
  "device_id": 132,
  "created_at": "2021-04-30T16:27:31.875Z",
  "updated_at": "2021-04-30T16:27:31.875Z"
}

DELETE /api/saved_gardens/11

Response

Empty Response

POST /api/saved_gardens/2/apply

Response

Empty Response

PATCH /api/saved_gardens/3/apply

Response

Empty Response

PUT /api/saved_gardens/8

Request

{
  "name": "Dried Chinese Broccoli"
}

Response

{
  "device_id": 133,
  "name": "Dried Chinese Broccoli",
  "id": 8,
  "created_at": "2021-04-30T16:27:31.902Z",
  "updated_at": "2021-04-30T16:27:31.924Z"
}

POST /api/saved_gardens/snapshot

Response

Empty Response

GET /api/sensor_readings

Response

[
  {
    "id": 6,
    "created_at": "2021-04-30T16:27:56.225Z",
    "updated_at": "2021-04-30T16:27:56.226Z",
    "mode": 0,
    "pin": 482,
    "value": 380,
    "x": 335.0,
    "y": 364.0,
    "z": 220.0,
    "read_at": "2021-04-30T16:27:56.225Z"
  },
  {
    "id": 7,
    "created_at": "2021-04-30T16:26:56.231Z",
    "updated_at": "2021-04-30T16:27:56.232Z",
    "mode": 0,
    "pin": 154,
    "value": 281,
    "x": 149.0,
    "y": 136.0,
    "z": 186.0,
    "read_at": "2021-04-30T16:26:56.231

POST /api/sensor_readings

Request

{
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1,
  "z": 2,
  "mode": 1,
  "read_at": "2021-04-30T11:27:56.419+00:00"
}

Response

{
  "id": 17,
  "created_at": "2021-04-30T16:27:56.429Z",
  "updated_at": "2021-04-30T16:27:56.429Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2021-04-30T11:27:56.419Z"
}

GET /api/sensor_readings

Response

[
  {
    "id": 18,
    "created_at": "2021-04-30T16:27:56.475Z",
    "updated_at": "2021-04-30T16:27:56.475Z",
    "mode": 0,
    "pin": 50,
    "value": 158,
    "x": 397.0,
    "y": 11.0,
    "z": 335.0,
    "read_at": "2021-04-30T16:27:56.475Z"
  }
]

GET /api/sensor_readings

Request

{
  "page": "2",
  "per": "5"
}

Response

[
  {
    "id": 43,
    "created_at": "2021-04-30T16:27:56.689Z",
    "updated_at": "2021-04-30T16:27:56.689Z",
    "mode": 0,
    "pin": 316,
    "value": 112,
    "x": 310.0,
    "y": 83.0,
    "z": 448.0,
    "read_at": "2021-04-30T16:27:56.689Z"
  },
  {
    "id": 42,
    "created_at": "2021-04-30T16:27:56.682Z",
    "updated_at": "2021-04-30T16:27:56.682Z",
    "mode": 0,
    "pin": 77,
    "value": 496,
    "x": 102.0,
    "y": 493.0,
    "z": 355.0,
    "read_at": "2021-04-30T16:27:56.682

POST /api/sensor_readings

Request

{
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1,
  "z": 2,
  "mode": 1
}

Response

{
  "id": 49,
  "created_at": "2021-04-30T16:27:56.787Z",
  "updated_at": "2021-04-30T16:27:56.787Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2021-04-30T16:27:56.786Z"
}

DELETE /api/sensor_readings/16

Response

Empty Response

GET /api/sensor_readings/50

Response

{
  "id": 50,
  "created_at": "2021-04-30T16:27:56.995Z",
  "updated_at": "2021-04-30T16:27:56.995Z",
  "mode": 0,
  "pin": 363,
  "value": 83,
  "x": 20.0,
  "y": 238.0,
  "z": 314.0,
  "read_at": "2021-04-30T16:27:56.995Z"
}

POST /api/sensors

Request

{
  "pin": 13,
  "label": "LED",
  "mode": 0
}

Response

{
  "id": 6,
  "created_at": "2021-04-30T16:27:36.282Z",
  "updated_at": "2021-04-30T16:27:36.282Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

GET /api/sensors

Response

[
  {
    "id": 7,
    "created_at": "2021-04-30T16:27:36.326Z",
    "updated_at": "2021-04-30T16:27:36.326Z",
    "pin": 6,
    "label": "MyString",
    "mode": 1
  },
  {
    "id": 8,
    "created_at": "2021-04-30T16:27:36.333Z",
    "updated_at": "2021-04-30T16:27:36.333Z",
    "pin": 7,
    "label": "MyString",
    "mode": 1
  }
]

DELETE /api/sensors/10

Response

{
  "id": 10,
  "created_at": "2021-04-30T16:27:36.439Z",
  "updated_at": "2021-04-30T16:27:36.439Z",
  "pin": 9,
  "label": "The old label",
  "mode": 1
}

GET /api/sensors/5

Response

{
  "id": 5,
  "created_at": "2021-04-30T16:27:36.240Z",
  "updated_at": "2021-04-30T16:27:36.240Z",
  "pin": 5,
  "label": "MyString",
  "mode": 1
}

PUT /api/sensors/9

Request

{
  "label": "The new label"
}

Response

{
  "id": 9,
  "created_at": "2021-04-30T16:27:36.377Z",
  "updated_at": "2021-04-30T16:27:36.394Z",
  "pin": 8,
  "label": "The new label",
  "mode": 1
}

POST /api/sequences

Request

{
  "args": {
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "variable_declaration",
          "args": {
            "label": "parent",
            "data_value": {
              "kind": "coordinate",
              "args": {
                "x": 50,
                "y": 50,
                "z": 50
              }
            }
          }
        }
      ]
    }
  },
  "color": "gray",
  "name": "MOVE V3 QA",
  "kind": "sequ

Response

{
  "id": 25,
  "created_at": "2021-04-30T16:27:32.232Z",
  "updated_at": "2021-04-30T16:27:32.232Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "variable_declaration",
          "args": {
            "label": "parent",
            "data_value": {
              "kind": "coordinate",
              "args": {
                "x": 50,
                "y": 50,
       

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "body": [

  ],
  "args": {
    "foo": "BAR"
  }
}

Response

{
  "id": 26,
  "created_at": "2021-04-30T16:27:32.941Z",
  "updated_at": "2021-04-30T16:27:32.941Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "pinned": false,
  "kind": "sequence",
  "body": [

  ]
}

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "location": {
          "kind": "coordinate",
          "args": {
            "x": 1,
            "y": 2,
            "z": 3
          }
        },
        "offset": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
            "z": 0
          }
        },
        "speed": 4
      },
      "uuid": "6fc58f69-9075-42fc-a06c-3ca699980a33"
    },
    {
    

Response

{
  "id": 29,
  "created_at": "2021-04-30T16:27:33.176Z",
  "updated_at": "2021-04-30T16:27:33.176Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "pinned": false,
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 4,
        "location": {
          "kind": "coordinate",
          "args": {
          

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "body": [

  ]
}

Response

{
  "id": 30,
  "created_at": "2021-04-30T16:27:33.433Z",
  "updated_at": "2021-04-30T16:27:33.433Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "pinned": false,
  "kind": "sequence",
  "body": [

  ]
}

POST /api/sequences

Request

{
  "name": "v. important sequence",
  "body": [

  ],
  "pinned": true
}

Response

{
  "id": 32,
  "created_at": "2021-04-30T16:27:33.548Z",
  "updated_at": "2021-04-30T16:27:33.548Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "v. important sequence",
  "pinned": true,
  "kind": "sequence",
  "body": [

  ]
}

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "args": {
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "parameter_declaration",
          "args": {
            "label": "parent",
            "default_value": {
              "kind": "coordinate",
              "args": {
                "x": 0,
                "y": 0,
                "z": 0
              }
            }
          }
        },
        {
          "kind": "variable_declaration"

Response

{
  "id": 34,
  "created_at": "2021-04-30T16:27:33.723Z",
  "updated_at": "2021-04-30T16:27:33.723Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "parameter_declaration",
          "args": {
            "label": "parent",
            "default_value": {
              "kind": "coordinate",
              "args": {
                "x": 0,
                "y": 0,
     

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "location": {
          "kind": "point",
          "args": {
            "pointer_type": "GenericPointer",
            "pointer_id": 42
          }
        },
        "offset": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
            "z": 0
          }
        },
        "speed": 100
      }
    }
  ]
}

Response

{
  "id": 36,
  "created_at": "2021-04-30T16:27:34.250Z",
  "updated_at": "2021-04-30T16:27:34.250Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "pinned": false,
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 100,
        "location": {
          "kind": "point",
          "args": {
            "

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "location": {
          "kind": "coordinate",
          "args": {
            "x": 1,
            "y": 2,
            "z": 3
          }
        },
        "offset": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
            "z": 0
          }
        },
        "speed": 4
      }
    },
    {
      "kind": "move_absolute",
      "args": {
        "lo

Response

{
  "id": 39,
  "created_at": "2021-04-30T16:27:34.468Z",
  "updated_at": "2021-04-30T16:27:34.468Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "pinned": false,
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 4,
        "location": {
          "kind": "coordinate",
          "args": {
          

GET /api/sequences

Response

[
  {
    "id": 143,
    "created_at": "2021-04-30T16:28:00.908Z",
    "updated_at": "2021-04-30T16:28:00.937Z",
    "folder_id": null,
    "args": {
      "version": 20180209,
      "locals": {
        "kind": "scope_declaration",
        "args": {
        }
      }
    },
    "color": "red",
    "name": "Ergonomic methodical encryption",
    "pinned": false,
    "kind": "sequence",
    "body": [

    ]
  },
  {
    "id": 144,
    "created_at": "2021-04-30T16:28:00.951Z",
    "updated_at": "202

PATCH /api/sequences/146

Request

{
  "sequence": {
    "name": "pinned",
    "pinned": true,
    "args": {
    },
    "body": [

    ]
  }
}

Response

{
  "id": 146,
  "created_at": "2021-04-30T16:28:05.424Z",
  "updated_at": "2021-04-30T16:28:05.520Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "blue",
  "name": "pinned",
  "pinned": true,
  "kind": "sequence",
  "body": [

  ]
}

PATCH /api/sequences/148

Request

{
  "id": 148,
  "sequence": {
    "name": "no",
    "args": {
      "locals": {
        "kind": "scope_declaration",
        "args": {
        },
        "body": [
          {
            "kind": "parameter_declaration",
            "args": {
              "label": "parent",
              "default_value": {
                "kind": "coordinate",
                "args": {
                  "x": 9,
                  "y": 9,
                  "z": 9
                }
              }
            }
 

Response

{
  "id": 148,
  "created_at": "2021-04-30T16:28:05.650Z",
  "updated_at": "2021-04-30T16:28:05.768Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "parameter_declaration",
          "args": {
            "label": "parent",
            "default_value": {
              "kind": "coordinate",
              "args": {
                "x": 9,
                "y": 9,
    

DELETE /api/sequences/44

Response

Empty Response

DELETE /api/sequences/45

Response

Empty Response

GET /api/sequences/48

Response

{
  "id": 48,
  "created_at": "2021-04-30T16:27:35.489Z",
  "updated_at": "2021-04-30T16:27:35.515Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "green",
  "name": "Multi-lateral composite productivity",
  "pinned": false,
  "kind": "sequence",
  "body": [

  ]
}

GET /api/storage_auth

Response

{
  "verb": "POST",
  "url": "//storage.googleapis.com/YOU_MUST_CONFIG_GOOGLE_CLOUD_STORAGE/",
  "form_data": {
    "key": "temp1/e8d6b1c3-96e8-41b9-b571-377a20c706e5.jpg",
    "acl": "public-read",
    "Content-Type": "image/jpeg",
    "policy": "GCS NOT SETUP!",
    "signature": "GCS NOT SETUP!",
    "GoogleAccessId": "GCS NOT SETUP!",
    "file": "REPLACE_THIS_WITH_A_BINARY_JPEG_FILE"
  },
  "instructions": "Send a 'from-data' request to the URL provided.Then POST the resulting URL as an 'att

GET /api/storage_auth

Response

{
  "verb": "POST",
  "url": "//192.168.1.112:3000/direct_upload/",
  "form_data": {
    "key": "temp/7e467bef-3dc8-439c-878b-4183f1a210fb.jpg",
    "acl": "public-read",
    "Content-Type": "image/jpeg",
    "policy": "N/A",
    "signature": "N/A",
    "GoogleAccessId": "N/A",
    "file": "REPLACE_THIS_WITH_A_BINARY_JPEG_FILE"
  },
  "instructions": "Send a 'from-data' request to the URL provided.Then POST the resulting URL as an 'attachment_url' (json) to api/images/."
}

POST /api/tokens

Request

{
  "user": {
    "email": "dee.homenick@schamberger-dietrich.co",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "human",
      "sub": 130,
      "iat": 1619800057,
      "jti": "e556b0d0-af77-4aea-8f2c-7983fa40b519",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984057,
      "mqtt": "blooper.io",
      "bot": "device_182",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodW1hbiIsInN1YiI6MTMwLCJpYXQiOjE2MTk4MDAwNTcsImp0aSI6ImU1NTZiMGQwLWFmNzctNGFlYS04ZjJjLTc5ODNmYTQw

POST /api/tokens

Request

{
  "user": {
    "email": "santos.osinski@larkin-koch.net",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 131,
      "iat": 1619800057,
      "jti": "38d2ed1f-61f8-4f49-95c1-286d6c10653a",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984057,
      "mqtt": "blooper.io",
      "bot": "device_183",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxMzEsImlhdCI6MTYxOTgwMDA1NywianRpIjoiMzhkMmVkMWYtNjFmOC00ZjQ5LTk1YzEtMjg2ZD

POST /api/tokens

Request

{
  "user": {
    "email": "minna@dubuque.org",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 132,
      "iat": 1619800057,
      "jti": "46e252ab-1912-4227-9c7c-757743ffdcf1",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984057,
      "mqtt": "blooper.io",
      "bot": "device_184",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxMzIsImlhdCI6MTYxOTgwMDA1NywianRpIjoiNDZlMjUyYWItMTkxMi00MjI3LTljN2MtNzU3Nz

POST /api/tokens

Request

{
  "user": {
    "email": "venita_klocko@breitenberg.net",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "bot",
      "sub": 133,
      "iat": 1619800057,
      "jti": "28787e4b-0484-4beb-ab30-b56ca6319e8e",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984057,
      "mqtt": "blooper.io",
      "bot": "device_185",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJib3QiLCJzdWIiOjEzMywiaWF0IjoxNjE5ODAwMDU3LCJqdGkiOiIyODc4N2U0Yi0wNDg0LTRiZWItYWIzMC1iNTZjYTYzMTllOG

POST /api/tokens

Request

{
  "user": {
    "email": "gonzalo.welch@spinka-kris.net",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 134,
      "iat": 1619800057,
      "jti": "4a4a3533-4d12-4a18-a6ec-30399ae943e2",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984057,
      "mqtt": "blooper.io",
      "bot": "device_186",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxMzQsImlhdCI6MTYxOTgwMDA1NywianRpIjoiNGE0YTM1MzMtNGQxMi00YTE4LWE2ZWMtMzAzOT

POST /api/tokens

Request

{
  "user": {
    "email": "joleen_kuvalis@schimmel-zemlak.name",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 136,
      "iat": 1619800057,
      "jti": "3eb51757-b689-4ce4-a861-9c231cd5e9b3",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984057,
      "mqtt": "blooper.io",
      "bot": "device_188",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxMzYsImlhdCI6MTYxOTgwMDA1NywianRpIjoiM2ViNTE3NTctYjY4OS00Y2U0LWE4NjEtOWMyMz

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 361,
      "iat": 1619800119,
      "jti": "092905e9-3d9a-466e-a631-492601cd1fcc",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984119,
      "mqtt": "blooper.io",
      "bot": "device_570",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNjEsImlhdCI6MTYxOTgwMDExOSwianRpIjoiMDkyOTA1ZTktM2Q5YS00NjZlLWE2MzEtNDkyNj

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 363,
      "iat": 1619800120,
      "jti": "ee73f188-3dd8-4032-b3c7-8f7187678445",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984119,
      "mqtt": "blooper.io",
      "bot": "device_572",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNjMsImlhdCI6MTYxOTgwMDEyMCwianRpIjoiZWU3M2YxODgtM2RkOC00MDMyLWIzYzctOGY3MT

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 365,
      "iat": 1619800120,
      "jti": "4ac97d6f-0fc2-458c-b3fe-4cef40bf2ddf",
      "iss": "//192.168.1.112:3000",
      "exp": 1624984120,
      "mqtt": "blooper.io",
      "bot": "device_574",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNjUsImlhdCI6MTYxOTgwMDEyMCwianRpIjoiNGFjOTdkNmYtMGZjMi00NThjLWIzZmUtNGNlZj

GET /api/tools

Response

[
  {
    "id": 21,
    "created_at": "2021-04-30T16:27:30.558Z",
    "updated_at": "2021-04-30T16:27:30.558Z",
    "name": "StaryuMetapod",
    "status": "active"
  }
]

POST /api/tools

Request

{
  "tool_slot_id": 284,
  "name": "wow"
}

Response

{
  "id": 121,
  "created_at": "2021-04-30T16:28:31.047Z",
  "updated_at": "2021-04-30T16:28:31.047Z",
  "name": "wow",
  "status": "inactive"
}

GET /api/tools/19

Response

{
  "id": 19,
  "created_at": "2021-04-30T16:27:30.028Z",
  "updated_at": "2021-04-30T16:27:30.028Z",
  "name": "PorygonSeaking",
  "status": "active"
}

PUT /api/tools/62

Request

{
  "name": "Hi!"
}

Response

{
  "id": 62,
  "created_at": "2021-04-30T16:27:52.699Z",
  "updated_at": "2021-04-30T16:27:52.723Z",
  "name": "Hi!",
  "status": "active"
}

DELETE /api/tools/67

Response

{
  "id": 67,
  "created_at": "2021-04-30T16:27:58.270Z",
  "updated_at": "2021-04-30T16:27:58.270Z",
  "name": "RhydonWeedle",
  "status": "inactive"
}

DELETE /api/tools/69

Response

{
  "id": 69,
  "created_at": "2021-04-30T16:27:58.382Z",
  "updated_at": "2021-04-30T16:27:58.382Z",
  "name": "AerodactylVenomoth",
  "status": "inactive"
}

DELETE /api/users

Request

{
  "password": "B60fP9a00MlV"
}

Response

{
  "id": null,
  "priority": 0,
  "attempts": 0,
  "handler": "--- !ruby/object:Delayed::PerformableMethod\nobject: !ruby/object:User\n  concise_attributes:\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: id\n    value_before_type_cast: 218\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: device_id\n    value_before_type_cast: 379\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: name\n    value_before_type_cast: Otto Feil CPA\n  - !ruby/object

PATCH /api/users

Request

{
  "email": "rick@rick.com",
  "name": "Ricky McRickerson",
  "format": "json"
}

Response

{
  "id": 220,
  "created_at": "2021-04-30T16:27:55.862Z",
  "updated_at": "2021-04-30T16:27:55.877Z",
  "name": "Ricky McRickerson",
  "email": "rick@rick.com"
}

GET /api/users

Response

[
  {
    "id": 222,
    "created_at": "2021-04-30T16:27:55.930Z",
    "updated_at": "2021-04-30T16:27:55.930Z",
    "name": "The Hon. Johnnie Volkman",
    "email": "damon@wintheiser.info"
  }
]

PATCH /api/users

Request

{
  "password": "PiU20xLnU75827",
  "new_password": "123456789",
  "new_password_confirmation": "123456789",
  "format": "json"
}

Response

{
  "id": 223,
  "created_at": "2021-04-30T16:27:55.965Z",
  "updated_at": "2021-04-30T16:27:56.005Z",
  "name": "Leda Vandervort III",
  "email": "winona@mcglynn.info"
}

POST /api/users

Request

{
  "password_confirmation": "Password123",
  "password": "Password123",
  "email": "thaddeus@treutel.name",
  "name": "Frank"
}

Response

{
  "message": "Check your email!"
}

POST /api/users/control_certificate

Request

{
  "email": "luther.schiller@swift-kuhn.name",
  "password": "password456"
}

Response

Empty Response

GET /api/web_app_config

Response

{
  "id": 9,
  "created_at": "2021-04-30T16:27:57.795Z",
  "updated_at": "2021-04-30T16:27:57.795Z",
  "device_id": 405,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_ax

PUT /api/web_app_config

Request

{
  "info_log": 23,
  "bot_origin_quadrant": -1
}

Response

{
  "id": 10,
  "created_at": "2021-04-30T16:27:57.833Z",
  "updated_at": "2021-04-30T16:27:57.847Z",
  "device_id": 406,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_a

PUT /api/web_app_config

Request

{
  "info_log": 23,
  "bot_origin_quadrant": -1,
  "internal_use": "null"
}

Response

{
  "id": 11,
  "created_at": "2021-04-30T16:27:57.886Z",
  "updated_at": "2021-04-30T16:27:57.903Z",
  "device_id": 407,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_a

PUT /api/web_app_config

Request

{
  "device_id": 99
}

Response

{
  "id": 12,
  "created_at": "2021-04-30T16:27:57.943Z",
  "updated_at": "2021-04-30T16:27:57.943Z",
  "device_id": 408,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_a

DELETE /api/web_app_config

Response

Empty Response

POST /api/webcam_feeds

Request

{
  "name": "name1",
  "url": "url1"
}

Response

{
  "id": 2,
  "created_at": "2021-04-30T16:27:29.153Z",
  "updated_at": "2021-04-30T16:27:29.153Z",
  "url": "url1",
  "name": "name1"
}

GET /api/webcam_feeds

Response

[
  {
    "id": 12,
    "created_at": "2021-04-30T16:28:05.809Z",
    "updated_at": "2021-04-30T16:28:05.809Z",
    "url": "0",
    "name": "feed 0"
  },
  {
    "id": 13,
    "created_at": "2021-04-30T16:28:05.814Z",
    "updated_at": "2021-04-30T16:28:05.814Z",
    "url": "1",
    "name": "feed 1"
  }
]

GET /api/webcam_feeds/1

Response

{
  "id": 1,
  "created_at": "2021-04-30T16:27:27.475Z",
  "updated_at": "2021-04-30T16:27:27.475Z",
  "url": "Url!",
  "name": "Name!"
}

PATCH /api/webcam_feeds/11

Request

{
  "url": "/foo.jpg",
  "name": "ok"
}

Response

{
  "id": 11,
  "created_at": "2021-04-30T16:27:57.730Z",
  "updated_at": "2021-04-30T16:27:57.747Z",
  "url": "/foo.jpg",
  "name": "ok"
}

DELETE /api/webcam_feeds/14

Response

Empty Response

GET /api/wizard_step_results

Response

[
  {
    "id": 1,
    "created_at": "2021-04-30T16:27:30.237Z",
    "updated_at": "2021-04-30T16:27:30.237Z",
    "answer": true,
    "outcome": "Mist",
    "slug": "Kakuna"
  },
  {
    "id": 2,
    "created_at": "2021-04-30T16:27:30.242Z",
    "updated_at": "2021-04-30T16:27:30.242Z",
    "answer": false,
    "outcome": "Sleep Powder",
    "slug": "Graveler"
  },
  {
    "id": 3,
    "created_at": "2021-04-30T16:27:30.246Z",
    "updated_at": "2021-04-30T16:27:30.246Z",
    "answer": false,
 

POST /api/wizard_step_results

Request

{
  "slug": "MY_SLUG"
}

Response

{
  "id": 7,
  "created_at": "2021-04-30T16:27:30.372Z",
  "updated_at": "2021-04-30T16:27:30.372Z",
  "answer": null,
  "outcome": null,
  "slug": "MY_SLUG"
}

PATCH /api/wizard_step_results/5

Request

{
  "slug": "MY_SLUG"
}

Response

{
  "id": 5,
  "created_at": "2021-04-30T16:27:30.284Z",
  "updated_at": "2021-04-30T16:27:30.296Z",
  "answer": true,
  "outcome": "Whirlwind",
  "slug": "MY_SLUG"
}

DELETE /api/wizard_step_results/6

Response

Empty Response

GET /app/nope.jpg

Request

{
  "path": "nope.jpg"
}

Response

Empty Response

POST /csp_reports

Response

{
  "problem": "Crashed while parsing report"
}

POST /csp_reports.json

Response

{
}

POST /direct_upload

Request

{
  "file": "fake_file",
  "key": "fake_key"
}

Response

Empty Response

GET /os

Response

Empty Response

GET /tos_update

Response

Empty Response

GET /verify/3393ab0c-eef1-4804-8567-1783df9f53a5

Request

{
  "token": "3393ab0c-eef1-4804-8567-1783df9f53a5"
}

Response

Empty Response

GET /verify/6bfeb2ab-f841-45d2-9551-13105f5042b0

Request

{
  "token": "6bfeb2ab-f841-45d2-9551-13105f5042b0"
}

Response

Empty Response
@creimers

This comment has been minimized.

Copy link

@creimers creimers commented Jul 24, 2017

@RickCarlino Are there any plans of exposing all of farmbot's functionality through one single API? Right now it seems to me that I would have difficulties to e.g. write a sequence executing a farmware that measures soil moisture once a day in different spots and writes the values and the locations to a database. I could trigger the pin reading through the sequence builder or celery script, but then don't know how to obtain that value.

@phrohdoh

This comment has been minimized.

Copy link

@phrohdoh phrohdoh commented Aug 3, 2017

👍 to @creimers' comment.

A high-level, all-encompassing API would allow customizations and integrations to flourish.

@gabrielburnworth

This comment has been minimized.

Copy link

@gabrielburnworth gabrielburnworth commented Aug 4, 2017

Raising an issue is a more appropriate place for requests like these. Issues are more visible and are the expected location for feature and help requests. The forum is an option for less technical requests, (i.e. using or suggesting a frontend feature).

You can write a sequence to measure soil moisture in different spots and schedule it to run in a farm event, all from the frontend. Saving soil moisture data to the database is a planned feature mentioned in the documentation.

By nature, this project has multiple parts and therefore requires multiple APIs. This page is for the backend API, which is the high-level API. Celery Script documentation is available on the FarmBotJS Celery Script wiki page. Farmware development documentation is also available. Other lower-level APIs are available for other parts of the project, which can be found in the relevant repositories (such as the Arduino firmware).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment