Skip to content

Instantly share code, notes, and snippets.

@RickCarlino RickCarlino/api_docs.md Secret
Last active Apr 4, 2020

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": 1586042415,
    "updated_at": "2020-04-04T23:20:15.764Z",
    "priority": 100,
    "problem_tag": "api.documentation.unread",
    "slug": "113965cc-47b7-4e4f-af77-0d1a2ab51a9d"
  }
]

GET /api/alerts/1

Response

{
  "id": 1,
  "created_at": 1586042415,
  "updated_at": "2020-04-04T23:20:15.703Z",
  "priority": 100,
  "problem_tag": "api.demo_account.in_use",
  "slug": "674c76ad-60be-4adc-96a8-1e7d837218dd"
}

GET /api/corpus

Response

{
  "version": 20180209,
  "enums": [
    {
      "name": "ALLOWED_AXIS",
      "allowed_values": [
        "x",
        "y",
        "z",
        "all"
      ]
    },
    {
      "name": "ALLOWED_CHANNEL_NAMES",
      "allowed_values": [
        "ticker",
        "toast",
        "email",
        "espeak"
      ]
    },
    {
      "name": "ALLOWED_MESSAGE_TYPES",
      "allowed_values": [
        "assertion",
        "busy",
        "debug",
        "error",
        "fun",
        "info",
    

POST /api/demo_account

Request

{
  "secret": "zcybzx1jmtmhp8np"
}

Response

{
}

DELETE /api/device

Response

Empty Response

GET /api/device

Response

{
  "id": 447,
  "created_at": "2020-04-04T23:20:40.275Z",
  "updated_at": "2020-04-04T23:20:40.275Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Green Pepper",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "220ea0f7133dd109ec06359efe61b0e0",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Portugal",
  "tz_offset_hrs": 1
}

POST /api/device

Request

{
  "user_id": 269,
  "name": "Kale"
}

Response

{
  "id": 451,
  "created_at": "2020-04-04T23:20:40.332Z",
  "updated_at": "2020-04-04T23:20:40.332Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Kale",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": null,
  "throttled_at": null,
  "throttled_until": null,
  "timezone": null,
  "tz_offset_hrs": 0
}

POST /api/device

Request

{
  "user_id": 271
}

Response

{
  "id": 454,
  "created_at": "2020-04-04T23:20:40.372Z",
  "updated_at": "2020-04-04T23:20:40.372Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "FarmBot",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": null,
  "throttled_at": null,
  "throttled_until": null,
  "timezone": null,
  "tz_offset_hrs": 0
}

GET /api/device

Response

{
  "id": 476,
  "created_at": "2020-04-04T23:20:41.653Z",
  "updated_at": "2020-04-04T23:20:41.653Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Eggplant",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "d13d6b445e71a905f41352170648563f",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "EST",
  "tz_offset_hrs": -5
}

PUT /api/device

Request

{
  "id": 539,
  "name": "Jeremy Mertz"
}

Response

{
  "id": 539,
  "created_at": "2020-04-04T23:20:45.566Z",
  "updated_at": "2020-04-04T23:20:45.579Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Jeremy Mertz",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "1fc668ed0f433ddac51ccb4e6e1a5be1",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Bamako",
  "tz_offset_hrs": 0
}

PUT /api/device

Request

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

Response

{
  "id": 541,
  "created_at": "2020-04-04T23:20:45.606Z",
  "updated_at": "2020-04-04T23:20:45.617Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Red cabbage",
  "needs_reset": false,
  "ota_hour": null,
  "serial_number": "d5023525e967b783683975e55d4046e6",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Asia/Pyongyang",
  "tz_offset_hrs": 9
}

PUT /api/device

Request

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

Response

{
  "id": 544,
  "created_at": "2020-04-04T23:20:45.646Z",
  "updated_at": "2020-04-04T23:20:45.666Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Garlic",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "5aaee76f8390252b8a330c158a777f77",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Asia/Oral",
  "tz_offset_hrs": 5
}

PUT /api/device

Request

{
  "id": 546,
  "mounted_tool_id": 129
}

Response

{
  "id": 546,
  "created_at": "2020-04-04T23:20:45.685Z",
  "updated_at": "2020-04-04T23:20:45.704Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": 129,
  "name": "English Spinach",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "a57af49ddb74cf4e33972911f7deeac1",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "America/Bahia_Banderas",
  "tz_offset_hrs": -6
}

PUT /api/device

Request

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

Response

{
  "id": 547,
  "created_at": "2020-04-04T23:20:45.712Z",
  "updated_at": "2020-04-04T23:20:45.726Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Beans",
  "needs_reset": false,
  "ota_hour": 12,
  "serial_number": "0b97e568a007b126287be6f8a34b6dfe",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Asia/Phnom_Penh",
  "tz_offset_hrs": 7
}

PUT /api/device

Request

{
  "id": 548,
  "timezone": "Africa/Tripoli"
}

Response

{
  "id": 548,
  "created_at": "2020-04-04T23:20:45.732Z",
  "updated_at": "2020-04-04T23:20:45.745Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Sweet Potato",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "d0dd1bd4895e86b770c5fcb863dafff6",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Tripoli",
  "tz_offset_hrs": 2
}

POST /api/device/reset

Request

{
  "password": "password456"
}

Response

{
  "ok": "OK"
}

POST /api/device/seed

Request

{
  "product_line": "genesis_1.5"
}

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_1.4"
}

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": "genesis_xl_1.5"
}

Response

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

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.3"
}

Response

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

POST /api/device/seed

Request

{
  "product_line": "none"
}

Response

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

GET /api/device/sync

Response

{
  "devices": [
    [
      474,
      "2020-04-04T23:20:41.525Z"
    ]
  ],
  "farm_events": [
    [
      41,
      "2020-04-04T23:20:41.552Z"
    ]
  ],
  "farmware_envs": [
    [
      318,
      "2020-04-04T23:20:41.556Z"
    ]
  ],
  "farmware_installations": [
    [
      21,
      "2020-04-04T23:20:41.560Z"
    ]
  ],
  "peripherals": [
    [
      52,
      "2020-04-04T23:20:41.567Z"
    ]
  ],
  "pin_bindings": [
    [
      47,
      "2020-04-04T23:20:41.571Z"
    ]
  ],
  "points": 

POST /api/device_cert

Request

{
  "tags": [
    "one_bad_one"
  ],
  "serial_number": "456"
}

Response

{
  "id": 484,
  "created_at": "2020-04-04T23:20:41.854Z",
  "updated_at": "2020-04-04T23:20:41.867Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Cos lettuce",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "456",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Juba",
  "tz_offset_hrs": 3
}

POST /api/device_cert

Request

{
  "tags": [
    "FOO:BAR",
    "BAR:BAZ"
  ],
  "serial_number": "456"
}

Response

{
  "id": 485,
  "created_at": "2020-04-04T23:20:41.873Z",
  "updated_at": "2020-04-04T23:20:41.886Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Radicchio",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "456",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "America/Mexico_City",
  "tz_offset_hrs": -6
}

POST /api/export_data

Response

null

POST /api/export_data

Response

{
  "export_created_at": "2020-04-04T23:20:45.121+00:00",
  "server_url": "//192.168.1.143:3000",
  "database_schema": 20200204192005,
  "tools": [

  ],
  "device": {
    "id": 527,
    "created_at": "2020-04-04T23:20:45.109Z",
    "updated_at": "2020-04-04T23:20:45.109Z",
    "fbos_version": null,
    "last_ota_checkup": null,
    "last_ota": null,
    "last_saw_api": null,
    "last_saw_mq": null,
    "mounted_tool_id": null,
    "name": "Purple carrot",
    "needs_reset": false,
    "ota_hou

POST /api/farm_events

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

Request

{
  "executable_id": 150,
  "executable_type": "Sequence",
  "start_time": "2020-04-04T23:21:35.083+00:00",
  "end_time": "2029-02-17T18:19:20.000Z",
  "repeat": 4,
  "time_unit": "minutely"
}

Response

{
  "id": 25,
  "created_at": "2020-04-04T23:20:35.087Z",
  "updated_at": "2020-04-04T23:20:35.089Z",
  "start_time": "2020-04-04T23:21:35.083Z",
  "end_time": "2029-02-17T18:19:20.000Z",
  "repeat": 4,
  "time_unit": "minutely",
  "executable_id": 150,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farm_events

Request

{
  "end_time": "2020-04-04T23:20:35.148+00:00",
  "time_unit": "never",
  "executable_id": 151,
  "executable_type": "Sequence",
  "repeat": 1
}

Response

{
  "id": 26,
  "created_at": "2020-04-04T23:20:35.152Z",
  "updated_at": "2020-04-04T23:20:35.154Z",
  "start_time": "2020-04-04T23:20:12.935Z",
  "end_time": "2020-04-04T23:21:12.935Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 151,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farm_events

Request

{
  "start_time": "2020-04-05T00:20:15.073+00:00",
  "next_time": "2017-06-05T18:33:04.342Z",
  "time_unit": "never",
  "executable_id": 18,
  "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": 96
          }
        }
      }
    }
  ]
}

Response

{
  "id": 27,
  "created_at": "2020-04-04T23:20:35.196Z",
  "updated_at": "2020-04-04T23:20:35.223Z",
  "start_time": "2020-04-05T00:20:15.073Z",
  "end_time": "2020-04-05T00:21:15.073Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 18,
  "executable_type": "Regimen",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "wow",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 96
          }
        }
   

GET /api/farm_events

Response

[
  {
    "id": 30,
    "created_at": "2020-04-04T23:20:35.311Z",
    "updated_at": "2020-04-04T23:20:35.313Z",
    "start_time": "2020-04-05T00:20:15.073Z",
    "end_time": "2020-04-05T00:21:15.073Z",
    "repeat": 1,
    "time_unit": "never",
    "executable_id": 22,
    "executable_type": "Regimen",
    "body": [

    ]
  }
]

POST /api/farm_events

Request

{
  "start_time": "2020-03-21T23:20:35.337+00:00",
  "time_unit": "never",
  "executable_id": 23,
  "executable_type": "Regimen",
  "end_time": "2017-06-05T18:34:00.000Z",
  "repeat": 1
}

Response

{
  "id": 31,
  "created_at": "2020-04-04T23:20:35.340Z",
  "updated_at": "2020-04-04T23:20:35.342Z",
  "start_time": "2020-03-21T23:20:35.337Z",
  "end_time": "2020-03-21T23:21:35.337Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 23,
  "executable_type": "Regimen",
  "body": [

  ]
}

GET /api/farm_events

Response

[

]

GET /api/farm_events

Response

[
  {
    "id": 39,
    "created_at": "2020-04-04T23:20:39.131Z",
    "updated_at": "2020-04-04T23:20:39.131Z",
    "start_time": "2020-03-29T00:00:00.000Z",
    "end_time": "2022-04-04T23:20:39.090Z",
    "repeat": 2,
    "time_unit": "weekly",
    "executable_id": 175,
    "executable_type": "Sequence",
    "body": [

    ]
  },
  {
    "id": 38,
    "created_at": "2020-04-04T23:20:39.108Z",
    "updated_at": "2020-04-04T23:20:39.108Z",
    "start_time": "2020-03-29T00:00:00.000Z",
    "end_ti

PATCH /api/farm_events/10

Request

{
  "body": null
}

Response

{
  "id": 10,
  "created_at": "2020-04-04T23:20:27.982Z",
  "updated_at": "2020-04-04T23:20:28.034Z",
  "start_time": "2020-03-29T00:00:00.000Z",
  "end_time": "2020-04-08T00:01:00.000Z",
  "repeat": 5,
  "time_unit": "weekly",
  "executable_id": 109,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
  

PATCH /api/farm_events/12

Request

{
  "body": [

  ]
}

Response

{
  "id": 12,
  "created_at": "2020-04-04T23:20:28.126Z",
  "updated_at": "2020-04-04T23:20:28.171Z",
  "start_time": "2020-04-01T00:00:00.000Z",
  "end_time": "2020-04-05T00:01:00.000Z",
  "repeat": 3,
  "time_unit": "yearly",
  "executable_id": 111,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/13

Request

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

Response

{
  "id": 13,
  "created_at": "2020-04-04T23:20:28.215Z",
  "updated_at": "2020-04-04T23:20:28.271Z",
  "start_time": "2020-03-29T00:00:00.000Z",
  "end_time": "2020-04-08T00:01:00.000Z",
  "repeat": 4,
  "time_unit": "hourly",
  "executable_id": 112,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "bar",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 3,
            "y": 2,
  

PATCH /api/farm_events/14

Request

{
  "body": null
}

Response

{
  "id": 14,
  "created_at": "2020-04-04T23:20:28.322Z",
  "updated_at": "2020-04-04T23:20:28.353Z",
  "start_time": "2020-04-02T00:00:00.000Z",
  "end_time": "2020-04-09T00:01:00.000Z",
  "repeat": 3,
  "time_unit": "yearly",
  "executable_id": 113,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
  

PATCH /api/farm_events/15

Request

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

Response

{
  "id": 15,
  "created_at": "2020-04-04T23:20:28.401Z",
  "updated_at": "2020-04-04T23:20:28.410Z",
  "start_time": "2020-03-30T00:00:00.000Z",
  "end_time": "2020-03-30T00:01:00.000Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 114,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/16

Request

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

Response

{
  "id": 16,
  "created_at": "2020-04-04T23:20:28.448Z",
  "updated_at": "2020-04-04T23:20:28.456Z",
  "start_time": "2020-03-29T00:00:00.000Z",
  "end_time": "2020-04-09T00:01:00.000Z",
  "repeat": 2,
  "time_unit": "minutely",
  "executable_id": 115,
  "executable_type": "Sequence",
  "body": [

  ]
}

GET /api/farm_events/33

Response

{
  "id": 33,
  "created_at": "2020-04-04T23:20:36.440Z",
  "updated_at": "2020-04-04T23:20:36.440Z",
  "start_time": "2020-03-30T00:00:00.000Z",
  "end_time": "2022-04-04T23:20:36.420Z",
  "repeat": 1,
  "time_unit": "monthly",
  "executable_id": 152,
  "executable_type": "Sequence",
  "body": [

  ]
}

DELETE /api/farm_events/4

Response

Empty Response

POST /api/farmware_envs

Request

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

Response

{
  "id": 5,
  "device_id": 438,
  "key": "Coffee Emoji",
  "value": "☕",
  "created_at": "2020-04-04T23:20:39.157Z",
  "updated_at": "2020-04-04T23:20:39.157Z"
}

GET /api/farmware_envs

Response

[
  {
    "id": 315,
    "device_id": 443,
    "key": "Dizzy Punch",
    "value": "Recover",
    "created_at": "2020-04-04T23:20:40.217Z",
    "updated_at": "2020-04-04T23:20:40.217Z"
  },
  {
    "id": 314,
    "device_id": 443,
    "key": "Amnesia",
    "value": "Bubble Beam",
    "created_at": "2020-04-04T23:20:40.214Z",
    "updated_at": "2020-04-04T23:20:40.214Z"
  },
  {
    "id": 313,
    "device_id": 443,
    "key": "Seismic Toss",
    "value": "Flash",
    "created_at": "2020-04-04T23:2

POST /api/farmware_envs

Request

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

Response

{
  "id": 317,
  "device_id": 445,
  "key": "compund_data",
  "value": {
    "x": "y",
    "z": 300
  },
  "created_at": "2020-04-04T23:20:40.257Z",
  "updated_at": "2020-04-04T23:20:40.257Z"
}

GET /api/farmware_envs/316

Response

{
  "id": 316,
  "device_id": 444,
  "key": "Bite",
  "value": "Constrict",
  "created_at": "2020-04-04T23:20:40.236Z",
  "updated_at": "2020-04-04T23:20:40.236Z"
}

DELETE /api/farmware_envs/6

Response

Empty Response

PUT /api/farmware_envs/7

Request

{
  "key": "tropeleT",
  "value": "kcattA irT"
}

Response

{
  "device_id": 440,
  "id": 7,
  "key": "tropeleT",
  "value": "kcattA irT",
  "created_at": "2020-04-04T23:20:39.195Z",
  "updated_at": "2020-04-04T23:20:39.201Z"
}

DELETE /api/farmware_envs/all

Response

Empty Response

GET /api/farmware_installations

Response

[
  {
    "id": 18,
    "created_at": "2020-04-04T23:20:35.403Z",
    "updated_at": "2020-04-04T23:20:35.403Z",
    "url": "http://jerde.name/mckinley/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 17,
    "created_at": "2020-04-04T23:20:35.399Z",
    "updated_at": "2020-04-04T23:20:35.399Z",
    "url": "http://ryanvonrueden.info/heather/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 16,
    "created_at": "2020-04-04T23:20:35.

POST /api/farmware_installations

Request

{
  "url": "http://rath.net/laria/manifest.json"
}

Response

{
  "id": 20,
  "created_at": "2020-04-04T23:20:35.443Z",
  "updated_at": "2020-04-04T23:20:35.443Z",
  "url": "http://rath.net/laria/manifest.json",
  "package": null,
  "package_error": null
}

GET /api/farmware_installations/14

Response

{
  "id": 14,
  "created_at": "2020-04-04T23:20:35.358Z",
  "updated_at": "2020-04-04T23:20:35.358Z",
  "url": "http://corkery.co/desiree_mante/manifest.json",
  "package": null,
  "package_error": null
}

POST /api/farmware_installations/15/refresh

Response

{
  "id": 15,
  "created_at": "2020-04-04T23:20:35.377Z",
  "updated_at": "2020-04-04T23:20:35.377Z",
  "url": "http://schuppe.info/shelby/manifest.json",
  "package": null,
  "package_error": null
}

DELETE /api/farmware_installations/19

Response

Empty Response

GET /api/fbos_config

Response

{
  "id": 11,
  "created_at": "2020-04-04T23:20:32.411Z",
  "updated_at": "2020-04-04T23:20:32.411Z",
  "device_id": 256,
  "auto_sync": true,
  "beta_opt_in": false,
  "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,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": 

PUT /api/fbos_config

Request

{
  "beta_opt_in": true,
  "disable_factory_reset": true
}

Response

{
  "id": 12,
  "created_at": "2020-04-04T23:20:32.429Z",
  "updated_at": "2020-04-04T23:20:32.436Z",
  "device_id": 257,
  "auto_sync": true,
  "beta_opt_in": true,
  "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,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": fa

PUT /api/fbos_config

Request

{
  "device_id": 99
}

Response

{
  "id": 14,
  "created_at": "2020-04-04T23:20:32.476Z",
  "updated_at": "2020-04-04T23:20:32.476Z",
  "device_id": 259,
  "auto_sync": true,
  "beta_opt_in": false,
  "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,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": 

PUT /api/fbos_config

Request

{
  "blah_blah_blah": true
}

Response

{
  "id": 15,
  "created_at": "2020-04-04T23:20:32.500Z",
  "updated_at": "2020-04-04T23:20:32.500Z",
  "device_id": 260,
  "auto_sync": true,
  "beta_opt_in": false,
  "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,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": 

DELETE /api/fbos_config

Response

Empty Response

GET /api/firmware_config

Response

{
  "id": 2,
  "created_at": "2020-04-04T23:20:15.485Z",
  "updated_at": "2020-04-04T23:20:15.485Z",
  "device_id": 6,
  "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_s

DELETE /api/firmware_config

Response

Empty Response

PUT /api/firmware_config

Request

{
  "pin_guard_5_time_out": 23
}

Response

{
  "id": 5,
  "created_at": "2020-04-04T23:20:15.557Z",
  "updated_at": "2020-04-04T23:20:15.566Z",
  "device_id": 8,
  "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_s

PUT /api/firmware_config

Request

{
  "device_id": 99
}

Response

{
  "id": 6,
  "created_at": "2020-04-04T23:20:15.589Z",
  "updated_at": "2020-04-04T23:20:15.589Z",
  "device_id": 9,
  "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_s

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/master/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/master/pac

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/master/packages/camera-calibration/manifest_v2.json",
  "package": "camera-calibration",
  "package_error": null
}

GET /api/folders

Response

[
  {
    "id": 1,
    "created_at": "2020-04-04T23:20:20.189Z",
    "updated_at": "2020-04-04T23:20:20.189Z",
    "parent_id": null,
    "color": "red",
    "name": "parent"
  }
]

POST /api/folders

Request

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

Response

{
  "id": 8,
  "created_at": "2020-04-04T23:20:20.299Z",
  "updated_at": "2020-04-04T23:20:20.299Z",
  "parent_id": 7,
  "color": "blue",
  "name": "child"
}

DELETE /api/folders/10

Response

Empty Response

PATCH /api/folders/5

Request

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

Response

{
  "id": 5,
  "created_at": "2020-04-04T23:20:20.230Z",
  "updated_at": "2020-04-04T23:20:20.236Z",
  "parent_id": null,
  "color": "red",
  "name": "C"
}

GET /api/folders/9

Response

{
  "id": 9,
  "created_at": "2020-04-04T23:20:20.313Z",
  "updated_at": "2020-04-04T23:20:20.313Z",
  "parent_id": null,
  "color": "red",
  "name": "parent"
}

GET /api/global_bulletins/Red%20Pepper

Response

{
  "id": 1,
  "created_at": "2020-04-04T23:20:19.271Z",
  "updated_at": "2020-04-04T23:20:19.271Z",
  "href": "https://farm.bot/blogs/news/pre-order-farmbot-genesis-xl-v1-5",
  "href_label": "Click here!",
  "slug": "Red Pepper",
  "title": null,
  "type": "info",
  "content": "we're now accepting pre-orders for Genesis XL v1.5!"
}

GET /api/global_config

Response

{
  "PING": "9f07146b1e5d00c99f1ab736033a2680"
}

GET /api/global_config

Response

{
  "PING": "9f07146b1e5d00c99f1ab736033a2680"
}

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": 3,
  "created_at": "2020-04-04T23:20:19.325Z",
  "updated_at": "2020-04-04T23:20:19.325Z",
  "device_id": 64,
  "attachment_processed_at": null,
  "attachment_url": "http://192.168.1.143:3000/placeholder_farmbot.jpg?text=Processing...",
  "meta": {
    "x": 1.0,
    "z": 3.0
  }
}

GET /api/images

Response

[
  {
    "id": 7,
    "created_at": "2020-04-04T23:20:19.516Z",
    "updated_at": "2020-04-04T23:20:19.516Z",
    "device_id": 67,
    "attachment_processed_at": null,
    "attachment_url": "http://192.168.1.143:3000/placeholder_farmbot.jpg?text=Processing...",
    "meta": {
      "x": 1,
      "y": 2,
      "z": 3
    }
  }
]

DELETE /api/images/4

Response

Empty Response

GET /api/images/5

Response

{
  "id": 5,
  "created_at": "2020-04-04T23:20:19.490Z",
  "updated_at": "2020-04-04T23:20:19.490Z",
  "device_id": 66,
  "attachment_processed_at": null,
  "attachment_url": "http://192.168.1.143:3000/placeholder_farmbot.jpg?text=Processing...",
  "meta": {
    "x": 1,
    "y": 2,
    "z": 3
  }
}

GET /api/logs

Response

[
  {
    "id": 15,
    "created_at": 1586041660,
    "updated_at": "2020-04-04T23:20:40.532Z",
    "channels": [
      "toast"
    ],
    "message": "deliver next-generation communities",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "warn",
    "verbosity": 1,
    "x": 102.0,
    "y": -697.0,
    "z": 515.0
  },
  {
    "id": 16,
    "created_at": 1586041600,
    "updated_at": "2020-04-04T23:20:40.535Z",
    "channels": [
      "toast"
    ],
    "message"

GET /api/logs

Response

[
  {
    "id": 190,
    "created_at": 1586042441,
    "updated_at": "2020-04-04T23:20:41.254Z",
    "channels": [

    ],
    "message": null,
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "info",
    "verbosity": 1,
    "x": null,
    "y": null,
    "z": null
  },
  {
    "id": 189,
    "created_at": 1586042441,
    "updated_at": "2020-04-04T23:20:41.251Z",
    "channels": [

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

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": 196,
  "created_at": 1586042441,
  "updated_at": "2020-04-04T23:20:41.295Z",
  "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

{
  "channels": [

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

Response

{
  "id": 202,
  "created_at": 1586042441,
  "updated_at": "2020-04-04T23:20:41.327Z",
  "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

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

Response

{
  "id": 208,
  "created_at": 1586042441,
  "updated_at": "2020-04-04T23:20:41.358Z",
  "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": 1585908161,
  "meta": {
    "x": 1,
    "y": 2,
    "z": 3,
    "type": "info"
  },
  "channels": [
    "toast"
  ],
  "message": "Hello, world!"
}

Response

{
  "id": 214,
  "created_at": 1585908161,
  "updated_at": "2020-04-04T23:20:41.412Z",
  "channels": [
    "toast"
  ],
  "message": "Hello, world!",
  "meta": null,
  "major_version": null,
  "minor_version": null,
  "type": "info",
  "verbosity": 1,
  "x": null,
  "y": null,
  "z": null
}

POST /api/logs

Request

{
  "message": "HELLO"
}

Response

{
  "id": 220,
  "created_at": 1586042441,
  "updated_at": "2020-04-04T23:20:41.447Z",
  "channels": [

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

DELETE /api/logs/all

Response

Empty Response

GET /api/logs/search

Response

[

]

GET /api/logs/search

Request

{
  "x": "-10"
}

Response

[
  {
    "id": 51,
    "created_at": 1586039500,
    "updated_at": "2020-04-04T23:20:40.786Z",
    "channels": [
      "toast"
    ],
    "message": "This is -10.0",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "warn",
    "verbosity": 1,
    "x": -10.0,
    "y": -715.0,
    "z": -11.0
  }
]

GET /api/logs/search

Response

[
  {
    "id": 60,
    "created_at": 1586038960,
    "updated_at": "2020-04-04T23:20:40.855Z",
    "channels": [
      "toast"
    ],
    "message": "deploy one-to-one e-markets",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "success",
    "verbosity": 1,
    "x": 100.0,
    "y": -295.0,
    "z": -619.0
  },
  {
    "id": 61,
    "created_at": 1586038900,
    "updated_at": "2020-04-04T23:20:40.857Z",
    "channels": [
      "toast"
    ],
    "message": "e

PUT /api/password_resets

Request

{
  "password": "xpassword123",
  "password_confirmation": "xpassword123",
  "fbos_version": {
    "version": "999.9.9",
    "segments": null
  },
  "id": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJtYXR0aGV3X2Zpc2hlckBrb25vcGVsc2tpd2VzdC5pbmZvIiwiaWF0IjoxNTg2MDQyNDM2LCJqdGkiOiJlYWRjNjM0YS0wMDAzLTQyNzQtOWY5Yy1mZmEyOTQ1YjdmZjIiLCJpc3MiOiIvLzE5Mi4xNjguMS4xNDM6MzAwMCIsImV4cCI6MTU4NjEyODgzNiwiYXVkIjoiUEFTU1dPUkRfUkVTRVRFUiJ9.sVuz815pW4ntQaVBSJT1zDuCAatzBPMgSj0zPmWLGIVnDik1USflongNvYMFCVyXECYYBK

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 225,
      "iat": 1586042436,
      "jti": "8166a41c-fd88-4717-992d-542752c7836b",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498436,
      "mqtt": "blooper.io",
      "bot": "device_383",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "e

POST /api/password_resets

Request

{
  "email": "ina@donnelly.biz"
}

Response

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

GET /api/peripherals

Response

[
  {
    "id": 2,
    "created_at": "2020-04-04T23:20:15.969Z",
    "updated_at": "2020-04-04T23:20:15.969Z",
    "pin": 2,
    "label": "MyString",
    "mode": 0
  },
  {
    "id": 1,
    "created_at": "2020-04-04T23:20:15.963Z",
    "updated_at": "2020-04-04T23:20:15.963Z",
    "pin": 1,
    "label": "MyString",
    "mode": 0
  }
]

POST /api/peripherals

Request

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

Response

{
  "id": 4,
  "created_at": "2020-04-04T23:20:19.856Z",
  "updated_at": "2020-04-04T23:20:19.856Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

DELETE /api/peripherals/45

Response

{
  "id": 45,
  "created_at": "2020-04-04T23:20:33.828Z",
  "updated_at": "2020-04-04T23:20:33.828Z",
  "pin": 11,
  "label": "wow",
  "mode": 0
}

GET /api/peripherals/46

Response

{
  "id": 46,
  "created_at": "2020-04-04T23:20:34.332Z",
  "updated_at": "2020-04-04T23:20:34.332Z",
  "pin": 12,
  "label": "MyString",
  "mode": 0
}

PATCH /api/peripherals/50

Request

{
  "pin": 9
}

Response

{
  "id": 50,
  "created_at": "2020-04-04T23:20:34.711Z",
  "updated_at": "2020-04-04T23:20:34.716Z",
  "pin": 9,
  "label": "MyString",
  "mode": 0
}

POST /api/pin_bindings

Request

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

Response

{
  "id": 14,
  "created_at": "2020-04-04T23:20:26.177Z",
  "updated_at": "2020-04-04T23:20:26.177Z",
  "device_id": 157,
  "sequence_id": 95,
  "special_action": null,
  "pin_num": 4,
  "binding_type": "standard"
}

GET /api/pin_bindings

Response

[
  {
    "id": 20,
    "created_at": "2020-04-04T23:20:26.269Z",
    "updated_at": "2020-04-04T23:20:26.269Z",
    "device_id": 159,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 0,
    "binding_type": "standard"
  },
  {
    "id": 19,
    "created_at": "2020-04-04T23:20:26.266Z",
    "updated_at": "2020-04-04T23:20:26.266Z",
    "device_id": 159,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 5,
    "binding_type": "standard"
  },
  {
    "id": 18,
  

GET /api/pin_bindings/21

Response

{
  "id": 21,
  "created_at": "2020-04-04T23:20:26.315Z",
  "updated_at": "2020-04-04T23:20:26.315Z",
  "device_id": 161,
  "sequence_id": null,
  "special_action": null,
  "pin_num": 0,
  "binding_type": "standard"
}

PUT /api/pin_bindings/24

Request

{
  "pin_num": 22,
  "sequence_id": 98
}

Response

{
  "id": 24,
  "created_at": "2020-04-04T23:20:26.374Z",
  "updated_at": "2020-04-04T23:20:26.393Z",
  "device_id": 162,
  "sequence_id": 98,
  "special_action": null,
  "pin_num": 22,
  "binding_type": "standard"
}

DELETE /api/pin_bindings/27

Response

Empty Response

GET /api/plant_templates

Response

[
  {
    "id": 22,
    "saved_garden_id": 31,
    "device_id": 302,
    "radius": 1.5,
    "x": 429.0,
    "y": 304.0,
    "z": 373.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "2020-04-04T23:20:34.786Z",
    "updated_at": "2020-04-04T23:20:34.786Z"
  },
  {
    "id": 21,
    "saved_garden_id": 30,
    "device_id": 302,
    "radius": 1.5,
    "x": 533.0,
    "y": 482.0,
    "z": 132.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "202

POST /api/plant_templates

Request

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

Response

{
  "id": 32,
  "saved_garden_id": 41,
  "device_id": 306,
  "radius": 32.0,
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "name": "Pumpkin",
  "openfarm_slug": "tomato",
  "created_at": "2020-04-04T23:20:34.945Z",
  "updated_at": "2020-04-04T23:20:34.945Z"
}

PUT /api/plant_templates/23

Request

{
  "saved_garden_id": 33
}

Response

{
  "device_id": 303,
  "id": 23,
  "saved_garden_id": 33,
  "radius": 1.5,
  "x": 417.0,
  "y": 139.0,
  "z": 357.0,
  "name": "untitled",
  "openfarm_slug": "lettuce",
  "created_at": "2020-04-04T23:20:34.809Z",
  "updated_at": "2020-04-04T23:20:34.839Z"
}

PUT /api/plant_templates/26

Request

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

Response

{
  "device_id": 304,
  "id": 26,
  "radius": 32.0,
  "x": 9.0,
  "y": 10.0,
  "z": 11.0,
  "name": "Cauliflower",
  "openfarm_slug": "melon",
  "saved_garden_id": 35,
  "created_at": "2020-04-04T23:20:34.855Z",
  "updated_at": "2020-04-04T23:20:34.871Z"
}

DELETE /api/plant_templates/29

Response

Empty Response

GET /api/point_groups

Response

[
  {
    "id": 4,
    "created_at": "2020-04-04T23:20:19.609Z",
    "updated_at": "2020-04-04T23:20:19.609Z",
    "name": "PG test 3",
    "point_ids": [
      18
    ],
    "sort_type": "xy_ascending",
    "criteria": {
      "day": {
        "op": "<",
        "days_ago": 0
      },
      "string_eq": {
      },
      "number_eq": {
      },
      "number_lt": {
      },
      "number_gt": {
      }
    }
  },
  {
    "id": 3,
    "created_at": "2020-04-04T23:20:19.600Z",
    "updated_at": "2

POST /api/point_groups

Request

{
  "name": "this is a group",
  "point_ids": [
    245,
    246,
    247
  ]
}

Response

{
  "id": 10,
  "created_at": "2020-04-04T23:20:36.068Z",
  "updated_at": "2020-04-04T23:20:36.068Z",
  "name": "this is a group",
  "point_ids": [
    245,
    246,
    247
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

POST /api/point_groups

Request

{
  "name": "Criteria group",
  "point_ids": [
    248,
    249,
    250
  ],
  "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": 11,
  "created_at": "2020-04-04T23:20:36.121Z",
  "updated_at": "2020-04-04T23:20:36.121Z",
  "name": "Criteria group",
  "point_ids": [
    248,
    249,
    250
  ],
  "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

DELETE /api/point_groups/12

Response

Empty Response

GET /api/point_groups/5

Response

{
  "id": 5,
  "created_at": "2020-04-04T23:20:19.913Z",
  "updated_at": "2020-04-04T23:20:19.913Z",
  "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/6

Response

{
  "id": 6,
  "created_at": "2020-04-04T23:20:19.957Z",
  "updated_at": "2020-04-04T23:20:19.957Z",
  "name": "PointGroups#show test",
  "point_ids": [

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

PUT /api/point_groups/8

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": 8,
  "created_at": "2020-04-04T23:20:30.711Z",
  "updated_at": "2020-04-04T23:20:30.728Z",
  "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
    }
  }
}

PUT /api/point_groups/9

Request

{
  "name": "new name",
  "point_ids": [
    200,
    201,
    202,
    198,
    199
  ]
}

Response

{
  "id": 9,
  "created_at": "2020-04-04T23:20:30.779Z",
  "updated_at": "2020-04-04T23:20:30.823Z",
  "name": "new name",
  "point_ids": [
    202,
    201,
    200,
    199,
    198
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

POST /api/points

Request

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

Response

{
  "id": 19,
  "created_at": "2020-04-04T23:20:19.642Z",
  "updated_at": "2020-04-04T23:20:19.642Z",
  "device_id": 73,
  "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

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

Response

{
  "id": 20,
  "created_at": "2020-04-04T23:20:19.662Z",
  "updated_at": "2020-04-04T23:20:19.662Z",
  "device_id": 74,
  "name": "test weed",
  "pointer_type": "Weed",
  "meta": {
    "foo": "BAR"
  },
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "radius": 3.0,
  "discarded_at": null
}

POST /api/points

Request

{
  "x": 23,
  "y": 45,
  "name": "Put me in a salad",
  "pointer_type": "Plant",
  "openfarm_slug": "mung-bean",
  "planted_at": "\"2020-04-03T23:20:19.679+00:00\"",
  "plant_stage": "sprouted"
}

Response

{
  "id": 21,
  "created_at": "2020-04-04T23:20:19.683Z",
  "updated_at": "2020-04-04T23:20:19.683Z",
  "device_id": 75,
  "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": "2020-04-03T23:20:19.679Z",
  "radius": 25.0
}

POST /api/points

Request

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

Response

{
  "id": 22,
  "created_at": "2020-04-04T23:20:19.704Z",
  "updated_at": "2020-04-04T23:20:19.704Z",
  "device_id": 76,
  "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

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

Response

{
  "id": 23,
  "created_at": "2020-04-04T23:20:19.752Z",
  "updated_at": "2020-04-04T23:20:19.752Z",
  "device_id": 79,
  "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": 1,
  "y": 2,
  "z": 3,
  "radius": 3,
  "name": "YOLO",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  }
}

Response

{
  "id": 25,
  "created_at": "2020-04-04T23:20:19.819Z",
  "updated_at": "2020-04-04T23:20:19.819Z",
  "device_id": 83,
  "name": "YOLO",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  },
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "radius": 3.0,
  "discarded_at": null
}

GET /api/points

Response

[
  {
    "id": 184,
    "created_at": "2020-04-04T23:20:28.960Z",
    "updated_at": "2020-04-04T23:20:28.960Z",
    "device_id": 215,
    "name": "Cabbage 2",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 2,
    "y": 2,
    "z": 2,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": null,
    "radius": 50.0
  },
  {
    "id": 183,
    "created_at": "2020-04-04T23:20:28.957Z",
    "updated_at": "2020-04-04T23:20:28.957Z",
    "device_id": 215,
    "name":

GET /api/points

Response

[
  {
    "id": 185,
    "created_at": "2020-04-04T23:20:28.984Z",
    "updated_at": "2020-04-04T23:20:28.984Z",
    "device_id": 216,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 455.0,
    "y": 152.0,
    "z": 458.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

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": 186,
    "created_at": "2020-04-04T23:20:29.013Z",
    "updated_at": "2020-04-04T23:20:29.013Z",
    "device_id": 217,
    "name": "old",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": null,
    "radius": 50.0
  }
]

GET /api/points

Response

[
  {
    "id": 188,
    "created_at": "2020-04-04T23:20:29.039Z",
    "updated_at": "2020-04-04T23:20:29.039Z",
    "device_id": 218,
    "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": 191,
    "created_at": "2020-04-04T23:20:29.064Z",
    "updated_at": "2020-04-04T23:20:29.064Z",
    "device_id": 219,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 480.0,
    "y": 323.0,
    "z": 199.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 190,
    "created_at": "2020-04-04T23:20:29.061Z",
    "updated_at": "2020-04-04T23:20:29.061Z",
    "device_id": 219,
    "name": "untitled",
    "pointer_type": "Generic

GET /api/points

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

Response

[
  {
    "id": 193,
    "created_at": "2020-04-04T23:20:29.098Z",
    "updated_at": "2020-04-04T23:20:29.098Z",
    "device_id": 220,
    "name": "new",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": null,
    "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": 195,
    "created_at": "2020-04-04T23:20:29.127Z",
    "updated_at": "2020-04-04T23:20:29.127Z",
    "device_id": 221,
    "name": "new",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": null,
    "radius": 50.0
  },
  {
    "id": 194,
    "created_at": "2020-04-04T23:20:29.124Z",
    "updated_at": "2020-04-04T23:20:29.124Z",
    "device_id": 221,
    "name": "old"

GET /api/points/1

Response

{
  "id": 1,
  "created_at": "2020-04-04T23:20:15.617Z",
  "updated_at": "2020-04-04T23:20:15.621Z",
  "device_id": 10,
  "name": "untitled",
  "pointer_type": "GenericPointer",
  "meta": {
  },
  "x": 401.0,
  "y": 494.0,
  "z": 200.0,
  "radius": 1.5,
  "discarded_at": "2020-04-04T23:20:15.620Z"
}

PUT /api/points/164

Request

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

Response

{
  "id": 164,
  "created_at": "2020-04-04T23:20:27.394Z",
  "updated_at": "2020-04-04T23:20:27.401Z",
  "device_id": 184,
  "name": "My Lettuce",
  "pointer_type": "Plant",
  "meta": {
  },
  "x": 23,
  "y": 45,
  "z": 0,
  "openfarm_slug": "limestone-lettuce",
  "plant_stage": "planned",
  "planted_at": null,
  "radius": 1.0
}

PUT /api/points/165

Request

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

Response

{
  "id": 165,
  "created_at": "2020-04-04T23:20:27.412Z",
  "updated_at": "2020-04-04T23:20:27.424Z",
  "device_id": 185,
  "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/167

Request

{
  "pullout_direction": 1
}

Response

{
  "id": 167,
  "created_at": "2020-04-04T23:20:27.444Z",
  "updated_at": "2020-04-04T23:20:27.450Z",
  "device_id": 186,
  "name": "untitled",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 1,
  "gantry_mounted": false
}

GET /api/points/2

Response

{
  "id": 2,
  "created_at": "2020-04-04T23:20:15.641Z",
  "updated_at": "2020-04-04T23:20:15.641Z",
  "device_id": 11,
  "name": "untitled",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 0,
  "gantry_mounted": false
}

DELETE /api/points/256,257,258,259,260,261

Response

[
  {
    "id": 256,
    "created_at": "2020-04-04T23:20:38.337Z",
    "updated_at": "2020-04-04T23:20:38.337Z",
    "device_id": 412,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 21.0,
    "y": 493.0,
    "z": 514.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 257,
    "created_at": "2020-04-04T23:20:38.342Z",
    "updated_at": "2020-04-04T23:20:38.342Z",
    "device_id": 412,
    "name": "untitled",
    "pointer_type": "GenericP

DELETE /api/points/264

Response

[
  {
    "id": 264,
    "created_at": "2020-04-04T23:20:38.569Z",
    "updated_at": "2020-04-04T23:20:38.569Z",
    "device_id": 413,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 10,
    "y": 20,
    "z": 30,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": null,
    "radius": 1.0
  }
]

DELETE /api/points/265

Response

[
  {
    "id": 265,
    "created_at": "2020-04-04T23:20:38.594Z",
    "updated_at": "2020-04-04T23:20:38.594Z",
    "device_id": 414,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 36.0,
    "y": 514.0,
    "z": 4.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

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

Response

[
  {
    "id": 168,
    "created_at": "2020-04-04T23:20:27.495Z",
    "updated_at": "2020-04-04T23:20:27.495Z",
    "device_id": 188,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "foo1": "1"
    },
    "x": 393.0,
    "y": 341.0,
    "z": 332.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

{
  "plant_stage": "harvested"
}

Response

[
  {
    "id": 171,
    "created_at": "2020-04-04T23:20:27.518Z",
    "updated_at": "2020-04-04T23:20:27.518Z",
    "device_id": 189,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 490,
    "y": 219,
    "z": 97,
    "openfarm_slug": "lettuce",
    "plant_stage": "harvested",
    "planted_at": null,
    "radius": 1.5
  }
]

POST /api/points/search

Request

{
  "openfarm_slug": "tomato"
}

Response

[
  {
    "id": 172,
    "created_at": "2020-04-04T23:20:27.537Z",
    "updated_at": "2020-04-04T23:20:27.537Z",
    "device_id": 190,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 153,
    "y": 104,
    "z": 381,
    "openfarm_slug": "tomato",
    "plant_stage": "planned",
    "planted_at": null,
    "radius": 1.5
  }
]

POST /api/points/search

Request

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

Response

[
  {
    "id": 175,
    "created_at": "2020-04-04T23:20:27.589Z",
    "updated_at": "2020-04-04T23:20:27.589Z",
    "device_id": 191,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "color": "red",
      "created_by": "plant-detection"
    },
    "x": 524.0,
    "y": 457.0,
    "z": 370.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 174,
    "created_at": "2020-04-04T23:20:27.586Z",
    "updated_at": "2020-04-04T23:20:27.586Z",
    "device_id

POST /api/points/search

Request

{
  "pointer_type": "Plant"
}

Response

[
  {
    "id": 178,
    "created_at": "2020-04-04T23:20:27.621Z",
    "updated_at": "2020-04-04T23:20:27.621Z",
    "device_id": 192,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 537,
    "y": 260,
    "z": 219,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": null,
    "radius": 1.5
  }
]

POST /api/points/search

Request

{
  "x": 23
}

Response

[
  {
    "id": 180,
    "created_at": "2020-04-04T23:20:27.652Z",
    "updated_at": "2020-04-04T23:20:27.652Z",
    "device_id": 194,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 23.0,
    "y": 230.0,
    "z": 444.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

{
  "created_by": "plant-detection"
}

Response

[

]

GET /api/public_key

Response

Empty Response

POST /api/regimens

Request

{
  "device": {
    "id": 25,
    "name": "Asparagus",
    "max_log_count": 1000,
    "max_images_count": 100,
    "timezone": "SystemV/CST6",
    "last_saw_api": null,
    "last_saw_mq": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2020-04-04T23:20:15.992Z",
    "updated_at": "2020-04-04T23:20:15.992Z",
    "serial_number": "f17106123342d1ef8934b2b61f11626f",
    "mqtt_rate_limit_email_sent_at": null,
    

Response

{
  "id": 1,
  "created_at": "2020-04-04T23:20:16.152Z",
  "updated_at": "2020-04-04T23:20:16.303Z",
  "name": "specs",
  "color": "red",
  "device_id": 24,
  "body": [
    {
      "kind": "parameter_declaration",
      "args": {
        "label": "parent",
        "default_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
            "x": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 1,
      "created_at": "2

POST /api/regimens

Request

{
  "name": "Grimer Gyarados Meowth",
  "color": "purple",
  "regimen_items": [
    {
      "time_offset": 123,
      "sequence_id": 2
    }
  ]
}

Response

{
  "id": 2,
  "created_at": "2020-04-04T23:20:16.431Z",
  "updated_at": "2020-04-04T23:20:16.434Z",
  "name": "Grimer Gyarados Meowth",
  "color": "purple",
  "device_id": 26,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 2,
      "created_at": "2020-04-04T23:20:16.432Z",
      "updated_at": "2020-04-04T23:20:16.432Z",
      "regimen_id": 2,
      "sequence_id": 2,
      "time_offset": 123
    }
  ]
}

POST /api/regimens

Request

{
  "device": {
    "id": 28,
    "name": "Brussels Sprouts",
    "max_log_count": 1000,
    "max_images_count": 100,
    "timezone": "Asia/Beirut",
    "last_saw_api": null,
    "last_saw_mq": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2020-04-04T23:20:16.474Z",
    "updated_at": "2020-04-04T23:20:16.474Z",
    "serial_number": "e8ea890257da4df325a6ab825d0fab3d",
    "mqtt_rate_limit_email_sent_at": null

Response

{
  "id": 3,
  "created_at": "2020-04-04T23:20:16.609Z",
  "updated_at": "2020-04-04T23:20:16.643Z",
  "name": "specs",
  "color": "red",
  "device_id": 27,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
            "x": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 3,
      "created_at": "2020

GET /api/regimens

Response

[
  {
    "id": 24,
    "created_at": "2020-04-04T23:20:36.301Z",
    "updated_at": "2020-04-04T23:20:36.301Z",
    "name": "51f9b8bd5ec438e6cc2e1c6e570d456e",
    "color": null,
    "device_id": 376,
    "body": [

    ],
    "regimen_items": [

    ]
  }
]

GET /api/regimens

Response

[

]

DELETE /api/regimens/30

Response

Empty Response

PUT /api/regimens/32

Request

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

Response

{
  "id": 32,
  "created_at": "2020-04-04T23:20:43.118Z",
  "updated_at": "2020-04-04T23:20:43.157Z",
  "name": "something new",
  "color": "blue",
  "device_id": 502,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 14,
      "created_at": "2020-04-04T23:20:43.152Z",
      "updated_at": "2020-04-04T23:20:43.152Z",
      "regimen_id": 32,
      "sequence_id": 191,
      "time_offset": 1555500000
    },
    {
      "id": 15,
      "created_at": "2020-04-04T23:20:43.152Z",
      "updated_a

PUT /api/regimens/34

Request

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

Response

{
  "id": 34,
  "created_at": "2020-04-04T23:20:43.232Z",
  "updated_at": "2020-04-04T23:20:43.320Z",
  "name": "something new",
  "color": "blue",
  "device_id": 504,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 123
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 17,
      "created_at": "2020-04-04T23:20:43.317Z",
   

GET /api/regimens/8

Response

{
  "id": 8,
  "created_at": "2020-04-04T23:20:27.689Z",
  "updated_at": "2020-04-04T23:20:27.689Z",
  "name": "45badaf49447189e0fb8af09d90fd0df",
  "color": null,
  "device_id": 196,
  "body": [

  ],
  "regimen_items": [

  ]
}

POST /api/rmq/resource

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjo4MywiaWF0IjoxNTg2MDQyNDI2LCJqdGkiOiI2MWM5MjM5Mi1mMjUxLTQzMWItOTM1Yy0yYjc2MDllOTVhNDkiLCJpc3MiOiIvLzE5Mi4xNjguMS4xNDM6MzAwMCIsImV4cCI6MTU4OTQ5ODQyNiwibXF0dCI6ImJsb29wZXIuaW8iLCJib3QiOiJkZXZpY2VfMTc2Iiwidmhvc3QiOiIvIiwibXF0dF93cyI6IndzOi8vYmxvb3Blci5pbzozMDAyL3dzIiwib3NfdXBkYXRlX3NlcnZlciI6Imh0dHA6Ly9leGFtcGxlLXNlcnZlci5jb20iLCJiZXRhX29zX3VwZGF0ZV9zZXJ2ZXIiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL0Zhcm1Cb3QvZmFybW

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.eyJhdWQiOiJ1bmtub3duIiwic3ViIjo3NywiaWF0IjoxNTg2MDQyNDI2LCJqdGkiOiJhYWQ2YWUyOS0yMzNhLTRiM2UtODcyOC1jY2UxYWJjYjFkZmUiLCJpc3MiOiIvLzE5Mi4xNjguMS4xNDM6MzAwMCIsImV4cCI6MTU4OTQ5ODQyNiwibXF0dCI6ImJsb29wZXIuaW8iLCJib3QiOiJkZXZpY2VfMTcwIiwidmhvc3QiOiIvIiwibXF0dF93cyI6IndzOi8vYmxvb3Blci5pbzozMDAyL3dzIiwib3NfdXBkYXRlX3NlcnZlciI6Imh0dHA6Ly9leGFtcGxlLXNlcnZlci5jb20iLCJiZXRhX29zX3VwZGF0ZV9zZXJ2ZXIiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL0Zhcm1Cb3QvZmFybW

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjo4NywiaWF0IjoxNTg2MDQyNDI3LCJqdGkiOiIzZTM5NjU2ZS02NTEwLTRkMGUtYTg1Ni1lODIxY2JiZWJhNmUiLCJpc3MiOiIvLzE5Mi4xNjguMS4xNDM6MzAwMCIsImV4cCI6MTU4OTQ5ODQyNywibXF0dCI6ImJsb29wZXIuaW8iLCJib3QiOiJkZXZpY2VfMTgwIiwidmhvc3QiOiIvIiwibXF0dF93cyI6IndzOi8vYmxvb3Blci5pbzozMDAyL3dzIiwib3NfdXBkYXRlX3NlcnZlciI6Imh0dHA6Ly9leGFtcGxlLXNlcnZlci5jb20iLCJiZXRhX29zX3VwZGF0ZV9zZXJ2ZXIiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL0Zhcm1Cb3QvZmFybW

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "V3ezw1GRCJiWsmPx",
  "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/user

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjo4NiwiaWF0IjoxNTg2MDQyNDI3LCJqdGkiOiJlZTBjM2RmZS0zZTU1LTQ1OWUtOGViNi05MDRiNDQ0YmRiMDciLCJpc3MiOiIvLzE5Mi4xNjguMS4xNDM6MzAwMCIsImV4cCI6MTU4OTQ5ODQyNywibXF0dCI6ImJsb29wZXIuaW8iLCJib3QiOiJkZXZpY2VfMTc5Iiwidmhvc3QiOiIvIiwibXF0dF93cyI6IndzOi8vYmxvb3Blci5pbzozMDAyL3dzIiwib3NfdXBkYXRlX3NlcnZlciI6Imh0dHA6Ly9leGFtcGxlLXNlcnZlci5jb20iLCJiZXRhX29zX3VwZGF0ZV9zZXJ2ZXIiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL0Zhcm1Cb3QvZmFybW

Response

Empty Response

POST /api/rmq/vhost

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjo4OSwiaWF0IjoxNTg2MDQyNDI3LCJqdGkiOiJjMjg1MDgwZC1hNGUyLTRlMmYtODAwOS0yMmRlODdmYTQxZjIiLCJpc3MiOiIvLzE5Mi4xNjguMS4xNDM6MzAwMCIsImV4cCI6MTU4OTQ5ODQyNywibXF0dCI6ImJsb29wZXIuaW8iLCJib3QiOiJkZXZpY2VfMTgyIiwidmhvc3QiOiIvIiwibXF0dF93cyI6IndzOi8vYmxvb3Blci5pbzozMDAyL3dzIiwib3NfdXBkYXRlX3NlcnZlciI6Imh0dHA6Ly9leGFtcGxlLXNlcnZlci5jb20iLCJiZXRhX29zX3VwZGF0ZV9zZXJ2ZXIiOiJodHRwczovL2FwaS5naXRodWIuY29tL3JlcG9zL0Zhcm1Cb3QvZmFybW

Response

Empty Response

POST /api/saved_gardens

Request

{
  "name": "Jicama"
}

Response

{
  "id": 18,
  "name": "Jicama",
  "device_id": 291,
  "created_at": "2020-04-04T23:20:34.184Z",
  "updated_at": "2020-04-04T23:20:34.184Z"
}

GET /api/saved_gardens

Response

[
  {
    "id": 24,
    "name": "Semele",
    "device_id": 293,
    "created_at": "2020-04-04T23:20:34.228Z",
    "updated_at": "2020-04-04T23:20:34.228Z"
  },
  {
    "id": 23,
    "name": "Thrace",
    "device_id": 293,
    "created_at": "2020-04-04T23:20:34.226Z",
    "updated_at": "2020-04-04T23:20:34.226Z"
  },
  {
    "id": 22,
    "name": "Odysseus",
    "device_id": 293,
    "created_at": "2020-04-04T23:20:34.223Z",
    "updated_at": "2020-04-04T23:20:34.223Z"
  }
]

PATCH /api/saved_gardens/15/apply

Response

Empty Response

POST /api/saved_gardens/17/apply

Response

Empty Response

DELETE /api/saved_gardens/19

Response

Empty Response

PUT /api/saved_gardens/25

Request

{
  "name": "English Spinach"
}

Response

{
  "device_id": 294,
  "id": 25,
  "name": "English Spinach",
  "created_at": "2020-04-04T23:20:34.246Z",
  "updated_at": "2020-04-04T23:20:34.257Z"
}

POST /api/saved_gardens/snapshot

Response

Empty Response

POST /api/sensor_readings

Request

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

Response

{
  "id": 10,
  "created_at": "2020-04-04T23:20:43.374Z",
  "updated_at": "2020-04-04T23:20:43.374Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2020-04-04T23:20:43.374Z"
}

GET /api/sensor_readings

Response

[
  {
    "id": 11,
    "created_at": "2020-04-04T23:20:43.388Z",
    "updated_at": "2020-04-04T23:20:43.389Z",
    "mode": 0,
    "pin": 306,
    "value": 840,
    "x": 100.0,
    "y": 29.0,
    "z": 219.0,
    "read_at": "2020-04-04T23:20:43.388Z"
  },
  {
    "id": 12,
    "created_at": "2020-04-04T23:19:43.391Z",
    "updated_at": "2020-04-04T23:20:43.391Z",
    "mode": 0,
    "pin": 520,
    "value": 751,
    "x": 50.0,
    "y": 384.0,
    "z": 133.0,
    "read_at": "2020-04-04T23:19:43.391

POST /api/sensor_readings

Request

{
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1,
  "z": 2,
  "mode": 1,
  "read_at": "2020-04-04T18:20:43.438+00:00"
}

Response

{
  "id": 21,
  "created_at": "2020-04-04T23:20:43.442Z",
  "updated_at": "2020-04-04T23:20:43.442Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2020-04-04T18:20:43.438Z"
}

GET /api/sensor_readings

Response

[
  {
    "id": 22,
    "created_at": "2020-04-04T23:20:43.485Z",
    "updated_at": "2020-04-04T23:20:43.485Z",
    "mode": 0,
    "pin": 208,
    "value": 898,
    "x": 481.0,
    "y": 426.0,
    "z": 219.0,
    "read_at": "2020-04-04T23:20:43.485Z"
  }
]

GET /api/sensor_readings

Request

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

Response

[
  {
    "id": 47,
    "created_at": "2020-04-04T23:20:43.593Z",
    "updated_at": "2020-04-04T23:20:43.593Z",
    "mode": 0,
    "pin": 372,
    "value": 681,
    "x": 456.0,
    "y": 312.0,
    "z": 372.0,
    "read_at": "2020-04-04T23:20:43.593Z"
  },
  {
    "id": 46,
    "created_at": "2020-04-04T23:20:43.591Z",
    "updated_at": "2020-04-04T23:20:43.591Z",
    "mode": 0,
    "pin": 245,
    "value": 581,
    "x": 442.0,
    "y": 298.0,
    "z": 121.0,
    "read_at": "2020-04-04T23:20:43.5

DELETE /api/sensor_readings/53

Response

Empty Response

GET /api/sensor_readings/9

Response

{
  "id": 9,
  "created_at": "2020-04-04T23:20:43.351Z",
  "updated_at": "2020-04-04T23:20:43.351Z",
  "mode": 0,
  "pin": 68,
  "value": 696,
  "x": 144.0,
  "y": 21.0,
  "z": 263.0,
  "read_at": "2020-04-04T23:20:43.351Z"
}

GET /api/sensors

Response

[
  {
    "id": 24,
    "created_at": "2020-04-04T23:20:44.929Z",
    "updated_at": "2020-04-04T23:20:44.929Z",
    "pin": 11,
    "label": "MyString",
    "mode": 1
  },
  {
    "id": 23,
    "created_at": "2020-04-04T23:20:44.926Z",
    "updated_at": "2020-04-04T23:20:44.926Z",
    "pin": 10,
    "label": "MyString",
    "mode": 1
  }
]

POST /api/sensors

Request

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

Response

{
  "id": 27,
  "created_at": "2020-04-04T23:20:45.001Z",
  "updated_at": "2020-04-04T23:20:45.001Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

PUT /api/sensors/25

Request

{
  "label": "The new label"
}

Response

{
  "id": 25,
  "created_at": "2020-04-04T23:20:44.955Z",
  "updated_at": "2020-04-04T23:20:44.961Z",
  "pin": 12,
  "label": "The new label",
  "mode": 1
}

GET /api/sensors/26

Response

{
  "id": 26,
  "created_at": "2020-04-04T23:20:44.981Z",
  "updated_at": "2020-04-04T23:20:44.981Z",
  "pin": 13,
  "label": "MyString",
  "mode": 1
}

DELETE /api/sensors/28

Response

{
  "id": 28,
  "created_at": "2020-04-04T23:20:45.023Z",
  "updated_at": "2020-04-04T23:20:45.023Z",
  "pin": 14,
  "label": "The old label",
  "mode": 1
}

GET /api/sequences

Response

[
  {
    "id": 154,
    "created_at": "2020-04-04T23:20:36.791Z",
    "updated_at": "2020-04-04T23:20:36.802Z",
    "folder_id": null,
    "args": {
      "version": 20180209,
      "locals": {
        "kind": "scope_declaration",
        "args": {
        }
      }
    },
    "color": "purple",
    "name": "Expanded 24/7 synergy",
    "kind": "sequence",
    "body": [

    ]
  },
  {
    "id": 153,
    "created_at": "2020-04-04T23:20:36.775Z",
    "updated_at": "2020-04-04T23:20:36.785Z",
    

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": "758eeb56-6391-4d48-a782-52385ce069bf"
    },
    {
    

Response

{
  "id": 181,
  "created_at": "2020-04-04T23:20:41.950Z",
  "updated_at": "2020-04-04T23:20:41.950Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 4,
        "offset": {
          "kind": "coordinate",
          "args": {
            "z": 0,
          

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": 184,
  "created_at": "2020-04-04T23:20:42.124Z",
  "updated_at": "2020-04-04T23:20:42.124Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 4,
        "offset": {
          "kind": "coordinate",
          "args": {
            "z": 0,
          

POST /api/sequences

Request

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

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

Response

{
  "id": 186,
  "created_at": "2020-04-04T23:20:42.445Z",
  "updated_at": "2020-04-04T23:20:42.445Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [

  ]
}

POST /api/sequences

Request

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

Response

{
  "id": 188,
  "created_at": "2020-04-04T23:20:42.873Z",
  "updated_at": "2020-04-04T23:20:42.873Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 100,
        "offset": {
          "kind": "coordinate",
          "args": {
            "z": 0,
        

POST /api/sequences

Request

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

  ]
}

Response

{
  "id": 189,
  "created_at": "2020-04-04T23:20:42.990Z",
  "updated_at": "2020-04-04T23:20:42.990Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "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": 190,
  "created_at": "2020-04-04T23:20:43.042Z",
  "updated_at": "2020-04-04T23:20:43.042Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "parameter_declaration",
          "args": {
            "label": "parent",
            "default_value": {
              "kind": "coordinate",
              "args": {
                "z": 0,
                "y": 0,
    

PATCH /api/sequences/101

Request

{
  "id": 101,
  "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": 101,
  "created_at": "2020-04-04T23:20:26.532Z",
  "updated_at": "2020-04-04T23:20:26.583Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "parameter_declaration",
          "args": {
            "label": "parent",
            "default_value": {
              "kind": "coordinate",
              "args": {
                "z": 9,
                "y": 9,
    

PATCH /api/sequences/103

Request

{
  "sequence": {
    "name": "Scare Birds",
    "args": {
    },
    "body": [

    ]
  }
}

Response

{
  "id": 103,
  "created_at": "2020-04-04T23:20:26.636Z",
  "updated_at": "2020-04-04T23:20:26.674Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "blue",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [

  ]
}

DELETE /api/sequences/137

Response

Empty Response

DELETE /api/sequences/138

Response

Empty Response

GET /api/sequences/140

Response

{
  "id": 140,
  "created_at": "2020-04-04T23:20:33.713Z",
  "updated_at": "2020-04-04T23:20:33.724Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "purple",
  "name": "Total next generation knowledge user",
  "kind": "sequence",
  "body": [

  ]
}

GET /api/storage_auth

Response

{
  "verb": "POST",
  "url": "//192.168.1.143:3000/direct_upload/",
  "form_data": {
    "key": "temp/31eb3a4f-0165-4421-a2f5-60bca2aa1bb5.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/."
}

GET /api/storage_auth

Response

{
  "verb": "POST",
  "url": "//storage.googleapis.com/YOU_MUST_CONFIG_GOOGLE_CLOUD_STORAGE/",
  "form_data": {
    "key": "temp1/77f2c250-c31a-4718-915c-c5e46a8cf41a.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/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 20,
      "iat": 1586042418,
      "jti": "11eb018d-8e37-4f23-a021-cfe94b371a44",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498417,
      "mqtt": "blooper.io",
      "bot": "device_50",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 23,
      "iat": 1586042418,
      "jti": "359ad694-3883-4a75-862b-9aef4b0547a0",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498418,
      "mqtt": "blooper.io",
      "bot": "device_53",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 24,
      "iat": 1586042418,
      "jti": "ce0502b4-2e97-4a81-9c2b-9e41d417eb8a",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498418,
      "mqtt": "blooper.io",
      "bot": "device_54",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

POST /api/tokens

Request

{
  "user": {
    "email": "harry_harvey@harber.co",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 291,
      "iat": 1586042441,
      "jti": "17dd6975-3fbf-4c54-9ae2-47cadeb8770a",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498441,
      "mqtt": "blooper.io",
      "bot": "device_477",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "e

POST /api/tokens

Request

{
  "user": {
    "email": "cheree.crooks@lemkerath.net",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 292,
      "iat": 1586042441,
      "jti": "ffb69bd5-de69-4685-ba07-81c8ea37e275",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498441,
      "mqtt": "blooper.io",
      "bot": "device_478",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "e

POST /api/tokens

Request

{
  "user": {
    "email": "burton@pfannerstill.com",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 293,
      "iat": 1586042441,
      "jti": "3272a531-3f4d-414c-bd00-8fa8ad145014",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498441,
      "mqtt": "blooper.io",
      "bot": "device_479",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "e

POST /api/tokens

Request

{
  "user": {
    "email": "rayna.pouros@hermistonschmeler.org",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "human",
      "sub": 294,
      "iat": 1586042441,
      "jti": "cad01fdf-47ae-4924-beb5-53d33a061688",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498441,
      "mqtt": "blooper.io",
      "bot": "device_480",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

POST /api/tokens

Request

{
  "user": {
    "email": "gary_beier@witting.io",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "bot",
      "sub": 295,
      "iat": 1586042441,
      "jti": "8eefc08d-bd49-4842-8315-f64c25f89e19",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498441,
      "mqtt": "blooper.io",
      "bot": "device_481",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "encod

POST /api/tokens

Request

{
  "user": {
    "email": "ru.cremin@breitenbergwiegand.io",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 296,
      "iat": 1586042441,
      "jti": "dab78013-845a-46f0-80d3-f8514dfbc881",
      "iss": "//192.168.1.143:3000",
      "exp": 1589498441,
      "mqtt": "blooper.io",
      "bot": "device_482",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "e

POST /api/tools

Request

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

Response

{
  "id": 6,
  "created_at": "2020-04-04T23:20:18.637Z",
  "updated_at": "2020-04-04T23:20:18.637Z",
  "name": "wow",
  "status": "inactive"
}

GET /api/tools

Response

[
  {
    "id": 102,
    "created_at": "2020-04-04T23:20:36.839Z",
    "updated_at": "2020-04-04T23:20:36.839Z",
    "name": "BulbasaurHitmonchan",
    "status": "active"
  }
]

PUT /api/tools/100

Request

{
  "name": "Hi!"
}

Response

{
  "id": 100,
  "created_at": "2020-04-04T23:20:36.557Z",
  "updated_at": "2020-04-04T23:20:36.565Z",
  "name": "Hi!",
  "status": "active"
}

GET /api/tools/111

Response

{
  "id": 111,
  "created_at": "2020-04-04T23:20:38.260Z",
  "updated_at": "2020-04-04T23:20:38.260Z",
  "name": "GengarSlowbro",
  "status": "active"
}

DELETE /api/tools/78

Response

{
  "id": 78,
  "created_at": "2020-04-04T23:20:31.431Z",
  "updated_at": "2020-04-04T23:20:31.431Z",
  "name": "ParasectWigglytuff",
  "status": "inactive"
}

DELETE /api/tools/80

Response

{
  "id": 80,
  "created_at": "2020-04-04T23:20:31.553Z",
  "updated_at": "2020-04-04T23:20:31.553Z",
  "name": "SpearowPorygon",
  "status": "inactive"
}

PATCH /api/users

Request

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

Response

{
  "id": 194,
  "created_at": "2020-04-04T23:20:35.644Z",
  "updated_at": "2020-04-04T23:20:35.662Z",
  "name": "Ricky McRickerson",
  "email": "shirley.schinner@kemmer.name"
}

PATCH /api/users

Request

{
  "password": "299Rw1Xw",
  "new_password": "123456789",
  "new_password_confirmation": "123456789",
  "format": "json"
}

Response

{
  "id": 196,
  "created_at": "2020-04-04T23:20:35.687Z",
  "updated_at": "2020-04-04T23:20:35.719Z",
  "name": "Madonna Carter",
  "email": "leta_mcclure@breitenbergmaggio.net"
}

GET /api/users

Response

[
  {
    "id": 202,
    "created_at": "2020-04-04T23:20:35.844Z",
    "updated_at": "2020-04-04T23:20:35.844Z",
    "name": "Suellen Bednar Sr.",
    "email": "wilford.spencer@veumschmeler.name"
  }
]

DELETE /api/users

Request

{
  "password": "Vi6EaMkL38"
}

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: encrypted_password\n    value_before_type_cast: \"$2a$04$iQCdt2evryTwFh9Wl2Jby.epXlRosBaEvc9TbxP8N1C4L//2w1Xrm\"\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: id\n    value_before_type_cast: 204\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    n

POST /api/users

Request

{
  "password_confirmation": "Password123",
  "password": "Password123",
  "email": "emery.cruickshank@ledner.info",
  "name": "Frank"
}

Response

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

POST /api/users/control_certificate

Request

{
  "email": "arlean@keebler.co",
  "password": "password456"
}

Response

Empty Response

POST /api/users/resend_verification

Request

{
  "email": "serena@williamsonkrajcik.name"
}

Response

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

PUT /api/web_app_config

Request

{
  "device_id": 99
}

Response

{
  "id": 12,
  "created_at": "2020-04-04T23:20:36.177Z",
  "updated_at": "2020-04-04T23:20:36.177Z",
  "device_id": 371,
  "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": false,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_

PUT /api/web_app_config

Request

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

Response

{
  "id": 13,
  "created_at": "2020-04-04T23:20:36.196Z",
  "updated_at": "2020-04-04T23:20:36.201Z",
  "device_id": 372,
  "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": false,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_

PUT /api/web_app_config

Request

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

Response

{
  "id": 14,
  "created_at": "2020-04-04T23:20:36.218Z",
  "updated_at": "2020-04-04T23:20:36.231Z",
  "device_id": 373,
  "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": false,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_

DELETE /api/web_app_config

Response

Empty Response

GET /api/web_app_config

Response

{
  "id": 18,
  "created_at": "2020-04-04T23:20:36.286Z",
  "updated_at": "2020-04-04T23:20:36.286Z",
  "device_id": 375,
  "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": false,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_

GET /api/webcam_feeds

Response

[
  {
    "id": 2,
    "created_at": "2020-04-04T23:20:15.414Z",
    "updated_at": "2020-04-04T23:20:15.414Z",
    "url": "1",
    "name": "feed 1"
  },
  {
    "id": 1,
    "created_at": "2020-04-04T23:20:15.409Z",
    "updated_at": "2020-04-04T23:20:15.409Z",
    "url": "0",
    "name": "feed 0"
  }
]

POST /api/webcam_feeds

Request

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

Response

{
  "id": 14,
  "created_at": "2020-04-04T23:20:34.751Z",
  "updated_at": "2020-04-04T23:20:34.751Z",
  "url": "url1",
  "name": "name1"
}

PATCH /api/webcam_feeds/15

Request

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

Response

{
  "id": 15,
  "created_at": "2020-04-04T23:20:34.960Z",
  "updated_at": "2020-04-04T23:20:34.965Z",
  "url": "/foo.jpg",
  "name": "ok"
}

GET /api/webcam_feeds/16

Response

{
  "id": 16,
  "created_at": "2020-04-04T23:20:41.845Z",
  "updated_at": "2020-04-04T23:20:41.845Z",
  "url": "Url!",
  "name": "Name!"
}

DELETE /api/webcam_feeds/9

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": "#<StringIO:0x0000555abed37340>",
  "key": "whatever/wow.jpg"
}

Response

Empty Response

GET /os

Response

Empty Response

GET /tos_update

Response

Empty Response

GET /verify/36a307b0-6625-4608-ab38-86079ed69409

Request

{
  "token": "36a307b0-6625-4608-ab38-86079ed69409"
}

Response

Empty Response

GET /verify/6f119371-f2c2-45ae-a5d3-e69d920a6a70

Request

{
  "token": "6f119371-f2c2-45ae-a5d3-e69d920a6a70"
}

Response

Empty Response
@creimers

This comment has been minimized.

Copy link

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 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 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
You can’t perform that action at this time.