Skip to content

Instantly share code, notes, and snippets.

@RickCarlino

RickCarlino/api_docs.md Secret

Last active Feb 7, 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": 7,
    "created_at": 1612728256,
    "updated_at": "2021-02-07T20:04:16.193Z",
    "priority": 100,
    "problem_tag": "api.user.not_welcomed",
    "slug": "e90b5065-9d29-4e3d-8831-537780440a90"
  }
]

GET /api/alerts/8

Response

{
  "id": 8,
  "created_at": 1612728256,
  "updated_at": "2021-02-07T20:04:16.229Z",
  "priority": 100,
  "problem_tag": "api.demo_account.in_use",
  "slug": "79e8f440-3077-46ea-85da-118fd9801a49"
}

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": "fti8pom2xhucztsh"
}

Response

{
}

DELETE /api/device

Response

Empty Response

PUT /api/device

Request

{
  "id": 279,
  "timezone": "Africa/Asmera"
}

Response

{
  "id": 279,
  "created_at": "2021-02-07T20:04:30.385Z",
  "updated_at": "2021-02-07T20:04:30.413Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Potatoes",
  "ota_hour": 3,
  "ota_hour_utc": 6,
  "serial_number": "1250da4cff7947fd91a61d8e427f48e5",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Asmera",
  "tz_offset_hrs": 3
}

PUT /api/device

Request

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

Response

{
  "id": 281,
  "created_at": "2021-02-07T20:04:30.463Z",
  "updated_at": "2021-02-07T20:04:30.496Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Beetroot",
  "ota_hour": 3,
  "ota_hour_utc": 22,
  "serial_number": "d7f7a6298fb29e58f7a8dcd31b16aa55",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "America/Eirunepe",
  "tz_offset_hrs": -5
}

PUT /api/device

Request

{
  "id": 282,
  "name": "Gayle Christiansen Esq."
}

Response

{
  "id": 282,
  "created_at": "2021-02-07T20:04:30.507Z",
  "updated_at": "2021-02-07T20:04:30.526Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Gayle Christiansen Esq.",
  "ota_hour": 3,
  "ota_hour_utc": 15,
  "serial_number": "47f31b7c706c461edda7fa2588803600",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Pacific/Tarawa",
  "tz_offset_hrs": 12
}

PUT /api/device

Request

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

Response

{
  "id": 283,
  "created_at": "2021-02-07T20:04:30.544Z",
  "updated_at": "2021-02-07T20:04:30.563Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Bean Shoots",
  "ota_hour": null,
  "ota_hour_utc": null,
  "serial_number": "9268ef63490e1efd28a9c8dcce111797",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Asia/Hebron",
  "tz_offset_hrs": 2
}

PUT /api/device

Request

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

Response

{
  "id": 286,
  "created_at": "2021-02-07T20:04:30.620Z",
  "updated_at": "2021-02-07T20:04:30.639Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Iceberg lettuce",
  "ota_hour": 12,
  "ota_hour_utc": 14,
  "serial_number": "a355eb9c46f6fd7c2afac85ea6b201f1",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Europe/Athens",
  "tz_offset_hrs": 2
}

PUT /api/device

Request

{
  "id": 288,
  "mounted_tool_id": 49
}

Response

{
  "id": 288,
  "created_at": "2021-02-07T20:04:30.674Z",
  "updated_at": "2021-02-07T20:04:30.702Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": 49,
  "name": "Kohlrabi",
  "ota_hour": 3,
  "ota_hour_utc": 4,
  "serial_number": "cc5bcd3d230dfe7db5b35062b05e3af1",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Europe/Zagreb",
  "tz_offset_hrs": 1
}

POST /api/device

Request

{
  "user_id": 303
}

Response

{
  "id": 480,
  "created_at": "2021-02-07T20:05:10.448Z",
  "updated_at": "2021-02-07T20:05:10.448Z",
  "fbos_version": null,
  "last_saw_api": 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": 305,
  "name": "Bean Shoots"
}

Response

{
  "id": 483,
  "created_at": "2021-02-07T20:05:10.534Z",
  "updated_at": "2021-02-07T20:05:10.534Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Bean Shoots",
  "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": 517,
  "created_at": "2021-02-07T20:05:14.086Z",
  "updated_at": "2021-02-07T20:05:14.086Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Jicama",
  "ota_hour": 3,
  "ota_hour_utc": 20,
  "serial_number": "5c3404f54f604e27950bd7b44a3510de",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Mexico/BajaSur",
  "tz_offset_hrs": -7
}

GET /api/device

Response

{
  "id": 558,
  "created_at": "2021-02-07T20:05:15.453Z",
  "updated_at": "2021-02-07T20:05:15.453Z",
  "fbos_version": null,
  "last_saw_api": null,
  "mounted_tool_id": null,
  "name": "Cucumber",
  "ota_hour": 3,
  "ota_hour_utc": 15,
  "serial_number": "089e5d5914d0ab444251a9cec6da3657",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Pacific/Wake",
  "tz_offset_hrs": 12
}

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

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": "express_xl_1.0"
}

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": "express_1.0"
}

Response

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

POST /api/device/seed

Request

{
  "product_line": "genesis_xl_1.5"
}

Response

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

GET /api/device/sync

Response

{
  "devices": [
    [
      270,
      "2021-02-07T20:04:30.134Z"
    ]
  ],
  "farm_events": [
    [
      23,
      "2021-02-07T20:04:29.978Z"
    ]
  ],
  "farmware_envs": [
    [
      318,
      "2021-02-07T20:04:29.982Z"
    ]
  ],
  "farmware_installations": [
    [
      13,
      "2021-02-07T20:04:29.991Z"
    ]
  ],
  "peripherals": [
    [
      14,
      "2021-02-07T20:04:30.004Z"
    ]
  ],
  "pin_bindings": [
    [
      12,
      "2021-02-07T20:04:30.014Z"
    ]
  ],
  "points": 

POST /api/export_data

Response

null

POST /api/export_data

Response

{
  "export_created_at": "2021-02-07T20:04:16.374+00:00",
  "server_url": "//10.11.1.235:3000",
  "database_schema": 20210201145935,
  "tools": [

  ],
  "device": {
    "id": 107,
    "created_at": "2021-02-07T20:04:16.356Z",
    "updated_at": "2021-02-07T20:04:16.356Z",
    "fbos_version": null,
    "last_saw_api": null,
    "mounted_tool_id": null,
    "name": "Celery",
    "ota_hour": 3,
    "ota_hour_utc": 21,
    "serial_number": "01c32741825b6e3a884d966707ced070",
    "throttled_at": null

(NOT OK) POST /api/farm_events

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

Request

{
  "executable_id": 7,
  "executable_type": "Sequence",
  "start_time": "2021-02-07T20:05:08.629+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 (1055494 occurrences detected)."
}

POST /api/farm_events

Request

{
  "start_time": "2021-01-24T20:04:08.695+00:00",
  "time_unit": "never",
  "executable_id": 7,
  "executable_type": "Regimen",
  "end_time": "2017-06-05T18:34:00.000Z",
  "repeat": 1
}

Response

{
  "id": 6,
  "created_at": "2021-02-07T20:04:08.703Z",
  "updated_at": "2021-02-07T20:04:08.706Z",
  "start_time": "2021-01-24T20:04:08.695Z",
  "end_time": "2021-01-24T20:05:08.695Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 7,
  "executable_type": "Regimen",
  "body": [

  ]
}

POST /api/farm_events

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

Request

{
  "executable_id": 8,
  "executable_type": "Sequence",
  "start_time": "2021-02-07T20:05:08.775+00:00",
  "end_time": "2021-03-09T20:04:08.775+00:00",
  "repeat": 4,
  "time_unit": "daily"
}

Response

{
  "id": 7,
  "created_at": "2021-02-07T20:04:08.783Z",
  "updated_at": "2021-02-07T20:04:08.786Z",
  "start_time": "2021-02-07T20:05:08.775Z",
  "end_time": "2021-03-09T20:04:08.775Z",
  "repeat": 4,
  "time_unit": "daily",
  "executable_id": 8,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farm_events

Request

{
  "end_time": "2021-02-07T20:04:08.912+00:00",
  "time_unit": "never",
  "executable_id": 9,
  "executable_type": "Sequence",
  "repeat": 1
}

Response

{
  "id": 9,
  "created_at": "2021-02-07T20:04:08.920Z",
  "updated_at": "2021-02-07T20:04:08.923Z",
  "start_time": "2021-02-07T20:04:02.089Z",
  "end_time": "2021-02-07T20:05:02.089Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 9,
  "executable_type": "Sequence",
  "body": [

  ]
}

GET /api/farm_events

Response

[
  {
    "id": 10,
    "created_at": "2021-02-07T20:04:08.963Z",
    "updated_at": "2021-02-07T20:04:08.966Z",
    "start_time": "2021-02-07T21:04:05.621Z",
    "end_time": "2021-02-07T21:05:05.621Z",
    "repeat": 1,
    "time_unit": "never",
    "executable_id": 9,
    "executable_type": "Regimen",
    "body": [

    ]
  }
]

POST /api/farm_events

Request

{
  "start_time": "2021-02-07T21:04:05.621+00:00",
  "next_time": "2017-06-05T18:33:04.342Z",
  "time_unit": "never",
  "executable_id": 10,
  "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": 11
          }
        }
      }
    }
  ]
}

Response

{
  "id": 11,
  "created_at": "2021-02-07T20:04:09.031Z",
  "updated_at": "2021-02-07T20:04:09.195Z",
  "start_time": "2021-02-07T21:04:05.621Z",
  "end_time": "2021-02-07T21:05:05.621Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 10,
  "executable_type": "Regimen",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "wow",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 11
          }
        }
   

GET /api/farm_events

Response

[
  {
    "id": 19,
    "created_at": "2021-02-07T20:04:22.161Z",
    "updated_at": "2021-02-07T20:04:22.161Z",
    "start_time": "2021-02-04T00:00:00.000Z",
    "end_time": "2023-02-07T20:04:22.051Z",
    "repeat": 7,
    "time_unit": "never",
    "executable_id": 68,
    "executable_type": "Sequence",
    "body": [

    ]
  },
  {
    "id": 18,
    "created_at": "2021-02-07T20:04:22.094Z",
    "updated_at": "2021-02-07T20:04:22.094Z",
    "start_time": "2021-02-02T00:00:00.000Z",
    "end_time

GET /api/farm_events

Response

[

]

DELETE /api/farm_events/15

Response

Empty Response

PATCH /api/farm_events/29

Request

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

Response

{
  "id": 29,
  "created_at": "2021-02-07T20:05:12.758Z",
  "updated_at": "2021-02-07T20:05:12.781Z",
  "start_time": "2021-02-02T00:00:00.000Z",
  "end_time": "2021-02-10T00:01:00.000Z",
  "repeat": 9,
  "time_unit": "yearly",
  "executable_id": 211,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/30

Request

{
  "body": [

  ]
}

Response

{
  "id": 30,
  "created_at": "2021-02-07T20:05:12.865Z",
  "updated_at": "2021-02-07T20:05:12.981Z",
  "start_time": "2021-02-05T00:00:00.000Z",
  "end_time": "2021-02-11T00:01:00.000Z",
  "repeat": 5,
  "time_unit": "daily",
  "executable_id": 212,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/31

Request

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

Response

{
  "id": 31,
  "created_at": "2021-02-07T20:05:13.082Z",
  "updated_at": "2021-02-07T20:05:13.110Z",
  "start_time": "2021-02-05T00:00:00.000Z",
  "end_time": "2021-02-05T00:01:00.000Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 213,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/32

Request

{
  "body": null
}

Response

{
  "id": 32,
  "created_at": "2021-02-07T20:05:13.200Z",
  "updated_at": "2021-02-07T20:05:13.286Z",
  "start_time": "2021-02-04T00:00:00.000Z",
  "end_time": "2021-02-04T00:01:00.000Z",
  "repeat": 9,
  "time_unit": "never",
  "executable_id": 214,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
   

PATCH /api/farm_events/33

Request

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

Response

{
  "id": 33,
  "created_at": "2021-02-07T20:05:13.404Z",
  "updated_at": "2021-02-07T20:05:13.487Z",
  "start_time": "2021-02-04T00:00:00.000Z",
  "end_time": "2021-02-11T00:01:00.000Z",
  "repeat": 10,
  "time_unit": "daily",
  "executable_id": 215,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "bar",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 3,
            "y": 2,
  

PATCH /api/farm_events/34

Request

{
  "body": null
}

Response

{
  "id": 34,
  "created_at": "2021-02-07T20:05:13.583Z",
  "updated_at": "2021-02-07T20:05:13.655Z",
  "start_time": "2021-02-03T00:00:00.000Z",
  "end_time": "2021-02-12T00:01:00.000Z",
  "repeat": 9,
  "time_unit": "yearly",
  "executable_id": 216,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
  

GET /api/farm_events/37

Response

{
  "id": 37,
  "created_at": "2021-02-07T20:05:13.896Z",
  "updated_at": "2021-02-07T20:05:13.896Z",
  "start_time": "2021-02-04T00:00:00.000Z",
  "end_time": "2023-02-07T20:05:13.857Z",
  "repeat": 5,
  "time_unit": "hourly",
  "executable_id": 219,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farmware_envs

Request

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

Response

{
  "id": 10,
  "device_id": 214,
  "key": "Coffee Emoji",
  "value": "☕",
  "created_at": "2021-02-07T20:04:25.358Z",
  "updated_at": "2021-02-07T20:04:25.358Z"
}

POST /api/farmware_envs

Request

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

Response

{
  "id": 11,
  "device_id": 215,
  "key": "compund_data",
  "value": {
    "x": "y",
    "z": 300
  },
  "created_at": "2021-02-07T20:04:25.388Z",
  "updated_at": "2021-02-07T20:04:25.388Z"
}

GET /api/farmware_envs

Response

[
  {
    "id": 16,
    "device_id": 216,
    "key": "Mist",
    "value": "Double Slap",
    "created_at": "2021-02-07T20:04:25.441Z",
    "updated_at": "2021-02-07T20:04:25.441Z"
  },
  {
    "id": 15,
    "device_id": 216,
    "key": "Poison Gas",
    "value": "Mega Kick",
    "created_at": "2021-02-07T20:04:25.436Z",
    "updated_at": "2021-02-07T20:04:25.436Z"
  },
  {
    "id": 14,
    "device_id": 216,
    "key": "Low Kick",
    "value": "Dragon Rage",
    "created_at": "2021-02-07T20:04:2

PUT /api/farmware_envs/317

Request

{
  "key": "evoM rorriM",
  "value": "yaR esufnoC"
}

Response

{
  "device_id": 218,
  "key": "evoM rorriM",
  "value": "yaR esufnoC",
  "id": 317,
  "created_at": "2021-02-07T20:04:27.258Z",
  "updated_at": "2021-02-07T20:04:27.270Z"
}

DELETE /api/farmware_envs/5

Response

Empty Response

GET /api/farmware_envs/6

Response

{
  "id": 6,
  "device_id": 212,
  "key": "Spore",
  "value": "Rage",
  "created_at": "2021-02-07T20:04:25.243Z",
  "updated_at": "2021-02-07T20:04:25.243Z"
}

DELETE /api/farmware_envs/all

Response

Empty Response

GET /api/farmware_installations

Response

[
  {
    "id": 8,
    "created_at": "2021-02-07T20:04:29.719Z",
    "updated_at": "2021-02-07T20:04:29.719Z",
    "url": "http://wyman.name/horacio_morissette/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 7,
    "created_at": "2021-02-07T20:04:29.712Z",
    "updated_at": "2021-02-07T20:04:29.712Z",
    "url": "http://reilly.io/contessa_corkery/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 6,
    "created_at": "2021-02-07T20

POST /api/farmware_installations

Request

{
  "url": "http://larson.io/galen/manifest.json"
}

Response

{
  "id": 10,
  "created_at": "2021-02-07T20:04:29.822Z",
  "updated_at": "2021-02-07T20:04:29.822Z",
  "url": "http://larson.io/galen/manifest.json",
  "package": null,
  "package_error": null
}

DELETE /api/farmware_installations/11

Response

Empty Response

POST /api/farmware_installations/12/refresh

Response

{
  "id": 12,
  "created_at": "2021-02-07T20:04:29.899Z",
  "updated_at": "2021-02-07T20:04:29.899Z",
  "url": "http://spencer.biz/wilson/manifest.json",
  "package": null,
  "package_error": null
}

GET /api/farmware_installations/9

Response

{
  "id": 9,
  "created_at": "2021-02-07T20:04:29.753Z",
  "updated_at": "2021-02-07T20:04:29.753Z",
  "url": "http://howe.net/giuseppe/manifest.json",
  "package": null,
  "package_error": null
}

GET /api/fbos_config

Response

{
  "id": 16,
  "created_at": "2021-02-07T20:04:55.155Z",
  "updated_at": "2021-02-07T20:04:55.155Z",
  "device_id": 361,
  "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

PUT /api/fbos_config

Request

{
  "disable_factory_reset": false
}

Response

{
  "id": 18,
  "created_at": "2021-02-07T20:04:55.218Z",
  "updated_at": "2021-02-07T20:04:55.229Z",
  "device_id": 363,
  "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

{
  "blah_blah_blah": true
}

Response

{
  "id": 19,
  "created_at": "2021-02-07T20:04:55.262Z",
  "updated_at": "2021-02-07T20:04:55.262Z",
  "device_id": 364,
  "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

PUT /api/fbos_config

Request

{
  "updated_at": "2021-02-05T20:04:55.294Z",
  "network_not_found_timer": 20
}

Response

{
  "id": 20,
  "created_at": "2021-02-07T20:04:55.289Z",
  "updated_at": "2021-02-05T20:04:55.294Z",
  "device_id": 365,
  "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

{
  "device_id": 99
}

Response

{
  "id": 21,
  "created_at": "2021-02-07T20:04:55.327Z",
  "updated_at": "2021-02-07T20:04:55.327Z",
  "device_id": 366,
  "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

PUT /api/firmware_config

Request

{
  "device_id": 99
}

Response

{
  "id": 14,
  "created_at": "2021-02-07T20:04:57.029Z",
  "updated_at": "2021-02-07T20:04:57.029Z",
  "device_id": 373,
  "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,
  "encode

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": 15,
  "created_at": "2021-02-07T20:04:57.071Z",
  "updated_at": "2021-02-07T20:04:57.086Z",
  "device_id": 374,
  "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,
  "encode

GET /api/firmware_config

Response

{
  "id": 17,
  "created_at": "2021-02-07T20:04:57.137Z",
  "updated_at": "2021-02-07T20:04:57.137Z",
  "device_id": 375,
  "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,
  "encode

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
}

POST /api/folders

Request

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

Response

{
  "id": 3,
  "created_at": "2021-02-07T20:04:28.747Z",
  "updated_at": "2021-02-07T20:04:28.747Z",
  "parent_id": 2,
  "color": "blue",
  "name": "child"
}

GET /api/folders

Response

[
  {
    "id": 8,
    "created_at": "2021-02-07T20:04:28.926Z",
    "updated_at": "2021-02-07T20:04:28.926Z",
    "parent_id": null,
    "color": "red",
    "name": "parent"
  }
]

PATCH /api/folders/5

Request

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

Response

{
  "id": 5,
  "created_at": "2021-02-07T20:04:28.781Z",
  "updated_at": "2021-02-07T20:04:28.793Z",
  "parent_id": null,
  "color": "red",
  "name": "C"
}

GET /api/folders/6

Response

{
  "id": 6,
  "created_at": "2021-02-07T20:04:28.819Z",
  "updated_at": "2021-02-07T20:04:28.819Z",
  "parent_id": null,
  "color": "red",
  "name": "parent"
}

DELETE /api/folders/9

Response

Empty Response

GET /api/global_bulletins/Peas

Response

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

GET /api/global_config

Response

{
  "PING": "57588e8afd23fd898baffbd1aa8a7f22"
}

GET /api/global_config

Response

{
  "PING": "57588e8afd23fd898baffbd1aa8a7f22"
}

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": 5,
  "created_at": "2021-02-07T20:04:14.101Z",
  "updated_at": "2021-02-07T20:04:14.101Z",
  "device_id": 89,
  "attachment_processed_at": null,
  "attachment_url": "http://10.11.1.235:3000/placeholder_farmbot.jpg?text=Processing...",
  "meta": {
    "x": 1.0,
    "z": 3.0
  }
}

GET /api/images

Response

[
  {
    "id": 9,
    "created_at": "2021-02-07T20:04:14.411Z",
    "updated_at": "2021-02-07T20:04:14.411Z",
    "device_id": 92,
    "attachment_processed_at": null,
    "attachment_url": "http://10.11.1.235:3000/placeholder_farmbot.jpg?text=Processing...",
    "meta": {
      "x": 1,
      "y": 2,
      "z": 3
    }
  }
]

DELETE /api/images/6

Response

Empty Response

GET /api/images/7

Response

{
  "id": 7,
  "created_at": "2021-02-07T20:04:14.363Z",
  "updated_at": "2021-02-07T20:04:14.363Z",
  "device_id": 91,
  "attachment_processed_at": null,
  "attachment_url": "http://10.11.1.235:3000/placeholder_farmbot.jpg?text=Processing...",
  "meta": {
    "x": 1,
    "y": 2,
    "z": 3
  }
}

GET /api/logs

Response

[
  {
    "id": 5,
    "created_at": 1612727956,
    "updated_at": "2021-02-07T20:04:16.444Z",
    "channels": [
      "toast"
    ],
    "message": "synthesize leading-edge interfaces",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "debug",
    "verbosity": 1,
    "x": -968.0,
    "y": -995.0,
    "z": 179.0
  },
  {
    "id": 6,
    "created_at": 1612727896,
    "updated_at": "2021-02-07T20:04:16.448Z",
    "channels": [
      "toast"
    ],
    "message":

POST /api/logs

Request

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

Response

{
  "id": 76,
  "created_at": 1612728257,
  "updated_at": "2021-02-07T20:04:17.103Z",
  "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

{
  "channels": [

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

Response

{
  "id": 88,
  "created_at": 1612728257,
  "updated_at": "2021-02-07T20:04:17.241Z",
  "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

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

Response

{
  "id": 94,
  "created_at": 1612593977,
  "updated_at": "2021-02-07T20:04:17.306Z",
  "channels": [
    "toast"
  ],
  "message": "Hello, world!",
  "meta": null,
  "major_version": null,
  "minor_version": null,
  "type": "info",
  "verbosity": 1,
  "x": null,
  "y": null,
  "z": null
}

GET /api/logs

Response

[
  {
    "id": 199,
    "created_at": 1612728257,
    "updated_at": "2021-02-07T20:04:17.850Z",
    "channels": [

    ],
    "message": null,
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "info",
    "verbosity": 1,
    "x": null,
    "y": null,
    "z": null
  },
  {
    "id": 198,
    "created_at": 1612728257,
    "updated_at": "2021-02-07T20:04:17.846Z",
    "channels": [

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

POST /api/logs

Request

{
  "message": "HELLO"
}

Response

{
  "id": 215,
  "created_at": 1612728258,
  "updated_at": "2021-02-07T20:04:18.397Z",
  "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": 226,
  "created_at": 1612728258,
  "updated_at": "2021-02-07T20:04:18.565Z",
  "channels": [

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

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": 15,
    "created_at": 1612727356,
    "updated_at": "2021-02-07T20:04:16.560Z",
    "channels": [
      "toast"
    ],
    "message": "This is -10.0",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "success",
    "verbosity": 1,
    "x": -10.0,
    "y": -228.0,
    "z": 521.0
  }
]

GET /api/logs/search

Response

[
  {
    "id": 24,
    "created_at": 1612726816,
    "updated_at": "2021-02-07T20:04:16.666Z",
    "channels": [
      "toast"
    ],
    "message": "redefine real-time e-tailers",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "success",
    "verbosity": 1,
    "x": -816.0,
    "y": 412.0,
    "z": 101.0
  },
  {
    "id": 25,
    "created_at": 1612726756,
    "updated_at": "2021-02-07T20:04:16.673Z",
    "channels": [
      "toast"
    ],
    "message": "e

GET /api/logs/search

Response

[

]

PUT /api/password_resets

Request

{
  "password": "xpassword123",
  "password_confirmation": "xpassword123",
  "fbos_version": {
    "version": "999.9.9",
    "segments": null
  },
  "id": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJjb3J5QGhhcnJpcy5uYW1lIiwiaWF0IjoxNjEyNzI4MjY4LCJqdGkiOiJjMDc1NWY3Zi03NzZhLTRjMmMtODVjZC1jY2ExNDY5YWE1OGUiLCJpc3MiOiIvLzEwLjExLjEuMjM1OjMwMDAiLCJleHAiOjE2MTI4MTQ2NjgsImF1ZCI6IlBBU1NXT1JEX1JFU0VURVIifQ.XWioN1bp-9VRom4-9DDETcagVPqTCgn-JCjDfUwhTF9S1suEzqePpuWtQUcEVT3XnGpibfdgFYFyYPKmCPucu-ypqjKcRH2w

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 182,
      "iat": 1612728268,
      "jti": "a9ee372c-84ab-4293-8ce2-805244ca8dbb",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184268,
      "mqtt": "blooper.io",
      "bot": "device_241",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxODIsImlhdCI6MTYxMjcyODI2OCwianRpIjoiYTllZTM3MmMtODRhYi00MjkzLThjZTItODA1MjQ0

POST /api/password_resets

Request

{
  "email": "adalberto.graham@bartell-casper.io"
}

Response

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

GET /api/peripherals

Response

[
  {
    "id": 16,
    "created_at": "2021-02-07T20:04:30.744Z",
    "updated_at": "2021-02-07T20:04:30.744Z",
    "pin": 13,
    "label": "MyString",
    "mode": 0
  },
  {
    "id": 15,
    "created_at": "2021-02-07T20:04:30.737Z",
    "updated_at": "2021-02-07T20:04:30.737Z",
    "pin": 12,
    "label": "MyString",
    "mode": 0
  }
]

POST /api/peripherals

Request

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

Response

{
  "id": 50,
  "created_at": "2021-02-07T20:05:01.606Z",
  "updated_at": "2021-02-07T20:05:01.606Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

DELETE /api/peripherals/13

Response

{
  "id": 13,
  "created_at": "2021-02-07T20:04:29.299Z",
  "updated_at": "2021-02-07T20:04:29.299Z",
  "pin": 10,
  "label": "wow",
  "mode": 0
}

PATCH /api/peripherals/2

Request

{
  "pin": 9
}

Response

{
  "id": 2,
  "created_at": "2021-02-07T20:04:06.851Z",
  "updated_at": "2021-02-07T20:04:06.865Z",
  "pin": 9,
  "label": "MyString",
  "mode": 0
}

GET /api/peripherals/51

Response

{
  "id": 51,
  "created_at": "2021-02-07T20:05:02.343Z",
  "updated_at": "2021-02-07T20:05:02.343Z",
  "pin": 14,
  "label": "MyString",
  "mode": 0
}

GET /api/pin_bindings

Response

[
  {
    "id": 33,
    "created_at": "2021-02-07T20:05:08.036Z",
    "updated_at": "2021-02-07T20:05:08.036Z",
    "device_id": 434,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 26,
    "binding_type": "standard"
  },
  {
    "id": 32,
    "created_at": "2021-02-07T20:05:08.029Z",
    "updated_at": "2021-02-07T20:05:08.029Z",
    "device_id": 434,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 18,
    "binding_type": "standard"
  },
  {
    "id": 31,

POST /api/pin_bindings

Request

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

Response

{
  "id": 34,
  "created_at": "2021-02-07T20:05:08.120Z",
  "updated_at": "2021-02-07T20:05:08.120Z",
  "device_id": 435,
  "sequence_id": 197,
  "special_action": null,
  "pin_num": 4,
  "binding_type": "standard"
}

DELETE /api/pin_bindings/25

Response

Empty Response

GET /api/pin_bindings/28

Response

{
  "id": 28,
  "created_at": "2021-02-07T20:05:07.949Z",
  "updated_at": "2021-02-07T20:05:07.949Z",
  "device_id": 433,
  "sequence_id": null,
  "special_action": null,
  "pin_num": 18,
  "binding_type": "standard"
}

PUT /api/pin_bindings/35

Request

{
  "pin_num": 20,
  "sequence_id": 198
}

Response

{
  "id": 35,
  "created_at": "2021-02-07T20:05:08.183Z",
  "updated_at": "2021-02-07T20:05:08.213Z",
  "device_id": 436,
  "sequence_id": 198,
  "special_action": null,
  "pin_num": 20,
  "binding_type": "standard"
}

POST /api/plant_templates

Request

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

Response

{
  "id": 18,
  "saved_garden_id": 25,
  "device_id": 487,
  "radius": 32.0,
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "name": "Cabbage",
  "openfarm_slug": "tomato",
  "created_at": "2021-02-07T20:05:10.682Z",
  "updated_at": "2021-02-07T20:05:10.682Z"
}

GET /api/plant_templates

Response

[
  {
    "id": 21,
    "saved_garden_id": 28,
    "device_id": 488,
    "radius": 1.5,
    "x": 208.0,
    "y": 224.0,
    "z": 493.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "2021-02-07T20:05:10.738Z",
    "updated_at": "2021-02-07T20:05:10.738Z"
  },
  {
    "id": 20,
    "saved_garden_id": 27,
    "device_id": 488,
    "radius": 1.5,
    "x": 255.0,
    "y": 462.0,
    "z": 32.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "2021

DELETE /api/plant_templates/22

Response

Empty Response

PUT /api/plant_templates/25

Request

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

Response

{
  "device_id": 490,
  "radius": 32.0,
  "x": 9.0,
  "y": 10.0,
  "z": 11.0,
  "name": "Potatoes",
  "openfarm_slug": "melon",
  "id": 25,
  "saved_garden_id": 32,
  "created_at": "2021-02-07T20:05:10.898Z",
  "updated_at": "2021-02-07T20:05:10.931Z"
}

PUT /api/plant_templates/28

Request

{
  "saved_garden_id": 36
}

Response

{
  "device_id": 491,
  "saved_garden_id": 36,
  "id": 28,
  "radius": 1.5,
  "x": 244.0,
  "y": 538.0,
  "z": 422.0,
  "name": "untitled",
  "openfarm_slug": "lettuce",
  "created_at": "2021-02-07T20:05:10.959Z",
  "updated_at": "2021-02-07T20:05:10.995Z"
}

POST /api/point_groups

Request

{
  "name": "Criteria group",
  "point_ids": [
    58,
    59,
    60
  ],
  "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": 10,
  "created_at": "2021-02-07T20:04:22.938Z",
  "updated_at": "2021-02-07T20:04:22.938Z",
  "name": "Criteria group",
  "point_ids": [
    58,
    59,
    60
  ],
  "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
    },
    "numbe

POST /api/point_groups

Request

{
  "name": "this is a group",
  "point_ids": [
    61,
    62,
    63
  ]
}

Response

{
  "id": 11,
  "created_at": "2021-02-07T20:04:23.015Z",
  "updated_at": "2021-02-07T20:04:23.015Z",
  "name": "this is a group",
  "point_ids": [
    61,
    62,
    63
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

GET /api/point_groups

Response

[
  {
    "id": 69,
    "created_at": "2021-02-07T20:05:14.518Z",
    "updated_at": "2021-02-07T20:05:14.518Z",
    "name": "PG test 0",
    "point_ids": [
      272,
      271
    ],
    "sort_type": "xy_ascending",
    "criteria": {
      "day": {
        "op": "<",
        "days_ago": 0
      },
      "string_eq": {
      },
      "number_eq": {
      },
      "number_lt": {
      },
      "number_gt": {
      }
    }
  },
  {
    "id": 70,
    "created_at": "2021-02-07T20:05:14.582Z",
    "u

PUT /api/point_groups/1

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": 1,
  "created_at": "2021-02-07T20:04:07.979Z",
  "updated_at": "2021-02-07T20:04:08.012Z",
  "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/2

Request

{
  "name": "new name",
  "point_ids": [
    16,
    17,
    18,
    14,
    15
  ]
}

Response

{
  "id": 2,
  "created_at": "2021-02-07T20:04:08.097Z",
  "updated_at": "2021-02-07T20:04:08.171Z",
  "name": "new name",
  "point_ids": [
    18,
    17,
    16,
    15,
    14
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

GET /api/point_groups/65

Response

{
  "id": 65,
  "created_at": "2021-02-07T20:05:10.156Z",
  "updated_at": "2021-02-07T20:05:10.156Z",
  "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/point_groups/66

Response

{
  "id": 66,
  "created_at": "2021-02-07T20:05:10.201Z",
  "updated_at": "2021-02-07T20:05:10.201Z",
  "name": "x",
  "point_ids": [

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

DELETE /api/point_groups/9

Response

Empty Response

POST /api/points

Request

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

Response

{
  "id": 50,
  "created_at": "2021-02-07T20:04:22.350Z",
  "updated_at": "2021-02-07T20:04:22.350Z",
  "device_id": 164,
  "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,
  "name": "Put me in a salad",
  "pointer_type": "Plant",
  "openfarm_slug": "mung-bean",
  "planted_at": "\"2021-02-06T20:04:22.375+00:00\"",
  "plant_stage": "sprouted"
}

Response

{
  "id": 51,
  "created_at": "2021-02-06T20:04:22.375Z",
  "updated_at": "2021-02-07T20:04:22.383Z",
  "device_id": 165,
  "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-02-06T20:04:22.375Z",
  "radius": 25.0
}

(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": "YOLO",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  }
}

Response

{
  "id": 52,
  "created_at": "2021-02-07T20:04:22.480Z",
  "updated_at": "2021-02-07T20:04:22.480Z",
  "device_id": 168,
  "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

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

Response

{
  "id": 53,
  "created_at": "2021-02-07T20:04:22.537Z",
  "updated_at": "2021-02-07T20:04:22.537Z",
  "device_id": 169,
  "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"
}

POST /api/points

Request

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

Response

{
  "id": 54,
  "created_at": "2021-02-07T20:04:22.662Z",
  "updated_at": "2021-02-07T20:04:22.662Z",
  "device_id": 172,
  "name": "foo",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 1,
  "gantry_mounted": false
}

POST /api/points

Request

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

Response

{
  "id": 55,
  "created_at": "2021-02-07T20:04:22.704Z",
  "updated_at": "2021-02-07T20:04:22.704Z",
  "device_id": 173,
  "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": 23,
  "y": 45,
  "pointer_type": "Weed"
}

Response

{
  "id": 56,
  "created_at": "2021-02-07T20:04:22.750Z",
  "updated_at": "2021-02-07T20:04:22.750Z",
  "device_id": 174,
  "name": "untitled",
  "pointer_type": "Weed",
  "meta": {
  },
  "x": 23.0,
  "y": 45.0,
  "z": 0.0,
  "radius": 25.0,
  "discarded_at": null,
  "plant_stage": "active"
}

GET /api/points

Response

[
  {
    "id": 226,
    "created_at": "2021-02-07T20:05:01.941Z",
    "updated_at": "2021-02-07T20:05:01.941Z",
    "device_id": 390,
    "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

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": 227,
    "created_at": "2021-02-07T20:05:01.981Z",
    "updated_at": "2021-02-07T20:05:01.981Z",
    "device_id": 391,
    "name": "old",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-02-07T20:05:01.981Z",
    "radius": 50.0
  },
  {
    "id": 228,
    "created_at": "2021-02-07T20:05:01.986Z",
    "updated_at": "2021-02-07T20:05:01.986Z",
    "device_id": 

GET /api/points

Response

[
  {
    "id": 229,
    "created_at": "2021-02-07T20:05:02.030Z",
    "updated_at": "2021-02-07T20:05:02.030Z",
    "device_id": 392,
    "name": "Cabbage 0",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 0,
    "y": 0,
    "z": 0,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-02-07T20:05:02.030Z",
    "radius": 50.0
  },
  {
    "id": 230,
    "created_at": "2021-02-07T20:05:02.036Z",
    "updated_at": "2021-02-07T20:05:02.036Z",
    "device

GET /api/points

Response

[
  {
    "id": 233,
    "created_at": "2021-02-07T20:05:02.119Z",
    "updated_at": "2021-02-07T20:05:02.119Z",
    "device_id": 394,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 539.0,
    "y": 111.0,
    "z": 437.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": 234,
    "created_at": "2021-02-07T20:05:02.184Z",
    "updated_at": "2021-02-07T20:05:02.184Z",
    "device_id": 395,
    "name": "old",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-02-07T20:05:02.184Z",
    "radius": 50.0
  }
]

GET /api/points

Response

[
  {
    "id": 236,
    "created_at": "2021-02-07T20:05:02.221Z",
    "updated_at": "2021-02-07T20:05:02.221Z",
    "device_id": 396,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 466.0,
    "y": 390.0,
    "z": 173.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 237,
    "created_at": "2021-02-07T20:05:02.228Z",
    "updated_at": "2021-02-07T20:05:02.228Z",
    "device_id": 396,
    "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": 240,
    "created_at": "2021-02-07T20:05:02.302Z",
    "updated_at": "2021-02-07T20:05:02.302Z",
    "device_id": 397,
    "name": "new",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2021-02-07T20:05:02.302Z",
    "radius": 50.0
  }
]

DELETE /api/points/214,215,216,217,218,219

Response

[
  {
    "id": 214,
    "created_at": "2021-02-07T20:04:55.699Z",
    "updated_at": "2021-02-07T20:04:55.699Z",
    "device_id": 370,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 427.0,
    "y": 327.0,
    "z": 252.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 215,
    "created_at": "2021-02-07T20:04:55.706Z",
    "updated_at": "2021-02-07T20:04:55.706Z",
    "device_id": 370,
    "name": "untitled",
    "pointer_type": "Generic

DELETE /api/points/220

Response

[
  {
    "id": 220,
    "created_at": "2021-02-07T20:04:55.786Z",
    "updated_at": "2021-02-07T20:04:55.786Z",
    "device_id": 371,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 525.0,
    "y": 485.0,
    "z": 72.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

DELETE /api/points/224

Response

[
  {
    "id": 224,
    "created_at": "2021-02-07T20:04:56.937Z",
    "updated_at": "2021-02-07T20:04:56.937Z",
    "device_id": 372,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 10,
    "y": 20,
    "z": 30,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": "2021-02-07T20:04:56.937Z",
    "radius": 1.0
  }
]

PUT /api/points/40

Request

{
  "pullout_direction": 1
}

Response

{
  "id": 40,
  "created_at": "2021-02-07T20:04:19.186Z",
  "updated_at": "2021-02-07T20:04:19.199Z",
  "device_id": 137,
  "name": "untitled",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 1,
  "gantry_mounted": false
}

PUT /api/points/41

Request

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

Response

{
  "id": 41,
  "created_at": "2021-02-07T20:04:19.221Z",
  "updated_at": "2021-02-07T20:04:19.244Z",
  "device_id": 138,
  "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/43

Request

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

Response

{
  "id": 43,
  "created_at": "2021-02-07T20:04:19.281Z",
  "updated_at": "2021-02-07T20:04:19.292Z",
  "device_id": 139,
  "name": "My Lettuce",
  "pointer_type": "Plant",
  "meta": {
  },
  "x": 23,
  "y": 45,
  "z": 0,
  "openfarm_slug": "limestone-lettuce",
  "plant_stage": "planned",
  "planted_at": "2021-02-07T20:04:19.281Z",
  "radius": 1.0
}

GET /api/points/70

Response

{
  "id": 70,
  "created_at": "2021-02-07T20:04:28.506Z",
  "updated_at": "2021-02-07T20:04:28.511Z",
  "device_id": 238,
  "name": "untitled",
  "pointer_type": "GenericPointer",
  "meta": {
  },
  "x": 149.0,
  "y": 451.0,
  "z": 515.0,
  "radius": 1.5,
  "discarded_at": "2021-02-07T20:04:28.511Z"
}

GET /api/points/71

Response

{
  "id": 71,
  "created_at": "2021-02-07T20:04:28.546Z",
  "updated_at": "2021-02-07T20:04:28.546Z",
  "device_id": 239,
  "name": "untitled",
  "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/search

Request

{
  "plant_stage": "harvested"
}

Response

[
  {
    "id": 279,
    "created_at": "2021-02-07T20:05:14.741Z",
    "updated_at": "2021-02-07T20:05:14.741Z",
    "device_id": 543,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 322,
    "y": 156,
    "z": 53,
    "openfarm_slug": "lettuce",
    "plant_stage": "harvested",
    "planted_at": "2021-02-07T20:05:14.741Z",
    "radius": 1.5
  }
]

POST /api/points/search

Request

{
  "pointer_type": "Plant"
}

Response

[
  {
    "id": 281,
    "created_at": "2021-02-07T20:05:14.815Z",
    "updated_at": "2021-02-07T20:05:14.815Z",
    "device_id": 544,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 352,
    "y": 433,
    "z": 292,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": "2021-02-07T20:05:14.815Z",
    "radius": 1.5
  }
]

POST /api/points/search

Request

{
  "openfarm_slug": "tomato"
}

Response

[
  {
    "id": 283,
    "created_at": "2021-02-07T20:05:14.864Z",
    "updated_at": "2021-02-07T20:05:14.864Z",
    "device_id": 546,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 480,
    "y": 410,
    "z": 339,
    "openfarm_slug": "tomato",
    "plant_stage": "planned",
    "planted_at": "2021-02-07T20:05:14.864Z",
    "radius": 1.5
  }
]

POST /api/points/search

Request

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

Response

[
  {
    "id": 285,
    "created_at": "2021-02-07T20:05:14.911Z",
    "updated_at": "2021-02-07T20:05:14.911Z",
    "device_id": 547,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "foo1": "1"
    },
    "x": 424.0,
    "y": 74.0,
    "z": 209.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

{
  "x": 23
}

Response

[
  {
    "id": 287,
    "created_at": "2021-02-07T20:05:14.988Z",
    "updated_at": "2021-02-07T20:05:14.988Z",
    "device_id": 548,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 23.0,
    "y": 358.0,
    "z": 485.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

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

Response

[
  {
    "id": 289,
    "created_at": "2021-02-07T20:05:15.049Z",
    "updated_at": "2021-02-07T20:05:15.049Z",
    "device_id": 549,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "created_by": "plant-detection"
    },
    "x": 124.0,
    "y": 93.0,
    "z": 379.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 290,
    "created_at": "2021-02-07T20:05:15.057Z",
    "updated_at": "2021-02-07T20:05:15.057Z",
    "device_id": 549,
    "name": "un

POST /api/points/search

Request

{
  "created_by": "plant-detection"
}

Response

[

]

GET /api/public_key

Response

Empty Response

POST /api/regimens

Request

{
  "device": {
    "id": 98,
    "name": "Zucchini",
    "max_log_count": 1000,
    "max_images_count": 450,
    "timezone": "Etc/GMT-14",
    "last_saw_api": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2021-02-07T20:04:15.593Z",
    "updated_at": "2021-02-07T20:04:15.593Z",
    "serial_number": "0967af5ccebf2ecec1acf16f15cf410e",
    "mqtt_rate_limit_email_sent_at": null,
    "ota_hour": 3,
    "first_sa

Response

{
  "id": 18,
  "created_at": "2021-02-07T20:04:15.666Z",
  "updated_at": "2021-02-07T20:04:15.738Z",
  "name": "specs",
  "color": "red",
  "device_id": 97,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
            "x": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 6,
      "created_at": "202

POST /api/regimens

Request

{
  "device": {
    "id": 102,
    "name": "Turnips",
    "max_log_count": 1000,
    "max_images_count": 450,
    "timezone": "Europe/Malta",
    "last_saw_api": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2021-02-07T20:04:15.911Z",
    "updated_at": "2021-02-07T20:04:15.911Z",
    "serial_number": "abb9537029c17907e6cc565851113991",
    "mqtt_rate_limit_email_sent_at": null,
    "ota_hour": 3,
    "first_

Response

{
  "id": 20,
  "created_at": "2021-02-07T20:04:15.985Z",
  "updated_at": "2021-02-07T20:04:16.043Z",
  "name": "specs",
  "color": "red",
  "device_id": 101,
  "body": [
    {
      "kind": "parameter_declaration",
      "args": {
        "label": "parent",
        "default_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
            "x": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 8,
      "created_at": 

POST /api/regimens

Request

{
  "name": "Eevee Koffing Persian",
  "color": "purple",
  "regimen_items": [
    {
      "time_offset": 123,
      "sequence_id": 51
    }
  ]
}

Response

{
  "id": 21,
  "created_at": "2021-02-07T20:04:16.155Z",
  "updated_at": "2021-02-07T20:04:16.160Z",
  "name": "Eevee Koffing Persian",
  "color": "purple",
  "device_id": 103,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 9,
      "created_at": "2021-02-07T20:04:16.157Z",
      "updated_at": "2021-02-07T20:04:16.157Z",
      "regimen_id": 21,
      "sequence_id": 51,
      "time_offset": 123
    }
  ]
}

GET /api/regimens

Response

[

]

GET /api/regimens

Response

[
  {
    "id": 25,
    "created_at": "2021-02-07T20:04:29.112Z",
    "updated_at": "2021-02-07T20:04:29.112Z",
    "name": "7190514b4269cffdfe8a4f4d686a2ec8",
    "color": null,
    "device_id": 256,
    "body": [

    ],
    "regimen_items": [

    ]
  }
]

DELETE /api/regimens/2

Response

Empty Response

PUT /api/regimens/28

Request

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

Response

{
  "id": 28,
  "created_at": "2021-02-07T20:05:09.554Z",
  "updated_at": "2021-02-07T20:05:09.648Z",
  "name": "something new",
  "color": "blue",
  "device_id": 469,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 12,
      "created_at": "2021-02-07T20:05:09.632Z",
      "updated_at": "2021-02-07T20:05:09.632Z",
      "regimen_id": 28,
      "sequence_id": 202,
      "time_offset": 1555500000
    },
    {
      "id": 13,
      "created_at": "2021-02-07T20:05:09.635Z",
      "updated_a

PUT /api/regimens/30

Request

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

Response

{
  "id": 30,
  "created_at": "2021-02-07T20:05:09.841Z",
  "updated_at": "2021-02-07T20:05:10.048Z",
  "name": "something new",
  "color": "blue",
  "device_id": 471,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 120
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 15,
      "created_at": "2021-02-07T20:05:10.041Z",
   

GET /api/regimens/34

Response

{
  "id": 34,
  "created_at": "2021-02-07T20:05:14.401Z",
  "updated_at": "2021-02-07T20:05:14.401Z",
  "name": "986bf2301d71834c35e523bece3d6aec",
  "color": null,
  "device_id": 533,
  "body": [

  ],
  "regimen_items": [

  ]
}

GET /api/releases

Request

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

Response

{
  "id": 37,
  "created_at": "2021-02-07T20:05:12.454Z",
  "updated_at": "2021-02-07T20:05:12.454Z",
  "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.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNTgsImlhdCI6MTYxMjcyODMxNywianRpIjoiMjlhM2UwZjItZjc1YS00OTIzLWFmZWQtOWY3NTU3YWU5MDA1IiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNjE2MTg0MzE3LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV81NzAiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MifQ.hIKpzW_uW9soowVzS8m0UjJCuQfAHCtVEzbduzJOZ8pCY9RjP4uYQE7f78dfNKHnKOPRE1hf8Wb-bAZ5dgAcGt6ohtJmJmVnjiFaedukBRlUpcT4dtV9lXFkjbRgaK60R_WmQ1u4Z9N5c0e6vFwqFsc

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNDksImlhdCI6MTYxMjcyODMxNiwianRpIjoiNTIyODExOWMtYjgzMy00NmQxLWJjMWItYjJkNjFiNjJhM2E0IiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNjE2MTg0MzE2LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV81NjEiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MifQ.ohX_HBcP6hbBODcaJqGbphWBjT30rmt3b3ia2qBraRmAFR8PL6YtLN35xxaS86-_h-jB_SqmM2TUYN_ZnxV7mjC403rLxZUesZ9RowXCbqe9TxAqr9z2F9LKJYnLdI8rUHp8NGCyrhJEFdJzghCcNWg

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.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNTYsImlhdCI6MTYxMjcyODMxNywianRpIjoiMjFjNzJmYzMtYTNjZC00MTQ3LTg5NzgtYTc0NzUyNWZmNDg2IiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNjE2MTg0MzE3LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV81NjgiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MifQ.lotuyans7Rx2hMmrrr4aB0CmeTw38ftqSBYg-ZQ3uzmNnm37lmtq--bWuuBdraQB0MD5oxjCYILaefZ40xHyZr6AQOcrZXbZaZ6aMd9h_OgaHoMo0wV4RehhSHKOOJ5dplBW3K4oV0s_snz7V6EdjqT

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNjIsImlhdCI6MTYxMjcyODMxOCwianRpIjoiODg3N2Q3NTQtNjU3ZC00ZDdhLWI2YzItNjZkMTZlZTk1NjJlIiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNjE2MTg0MzE4LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV81NzQiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MifQ.oDzXrvXA58v49vW2KU5K_x-QSk_ibKopiaQACANd62cmcCE8hYMDa2AN747R0yFGyE8ypIrciTu4z2y-50SF7Z7tSgCuSiiIXfB7TxTiDPTNM7grCyvfVWePhghSrBfsxmIS6fyiqjVpKiJWhtfUG5o

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNTAsImlhdCI6MTYxMjcyODMxNiwianRpIjoiMjNlNDYyYzgtODY0YS00Y2UyLWFkYzgtNjcyYTQxNDM1YmJjIiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNjE2MTg0MzE2LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV81NjIiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MifQ.HLt_Ip1buXioQUpZuwP4UcEIakSDmS0v2dQcGcNfxhudkarCSX-XQFKziw---pg-uxtXNg_z6KRcjbh8OSle_FRkqhNvOMfUrMgrzgQoxUPj04_mYocm1VFTZMJ4seBtRjm39BPBRXpdrGZg3TarC7c

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "PTHY3jt1emxBRLVX",
  "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.eyJhdWQiOiJ1bmtub3duIiwic3ViIjozNTMsImlhdCI6MTYxMjcyODMxNiwianRpIjoiOTlhNTJiZjQtZTI4MC00ZjY0LTk0MmEtNTgwZDk2NjdiNTVkIiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNjE2MTg0MzE2LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV81NjUiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MifQ.dComvUHcdOQONLZWQO1cNZRJm0NjRI08GSNgV4Seflb61Za31Q0v60_H1euOw5QwmDBunjuWWXIlJbPaiI1fyhi2XTr-eI9IckPVwsIxW8yssSBE1ZqVpwy94qj1G6czaB1pDUBil2uLtbAp7psNvPT

Response

Empty Response

GET /api/saved_gardens

Response

[
  {
    "id": 17,
    "name": "Medea",
    "device_id": 401,
    "created_at": "2021-02-07T20:05:02.628Z",
    "updated_at": "2021-02-07T20:05:02.628Z"
  },
  {
    "id": 16,
    "name": "Amphitryon",
    "device_id": 401,
    "created_at": "2021-02-07T20:05:02.621Z",
    "updated_at": "2021-02-07T20:05:02.621Z"
  },
  {
    "id": 15,
    "name": "Theseus",
    "device_id": 401,
    "created_at": "2021-02-07T20:05:02.614Z",
    "updated_at": "2021-02-07T20:05:02.614Z"
  }
]

POST /api/saved_gardens

Request

{
  "name": "English Spinach"
}

Response

{
  "id": 24,
  "name": "English Spinach",
  "device_id": 406,
  "created_at": "2021-02-07T20:05:03.238Z",
  "updated_at": "2021-02-07T20:05:03.238Z"
}

DELETE /api/saved_gardens/11

Response

Empty Response

POST /api/saved_gardens/18/apply

Response

Empty Response

PATCH /api/saved_gardens/20/apply

Response

Empty Response

PUT /api/saved_gardens/21

Request

{
  "name": "Raspberry"
}

Response

{
  "device_id": 405,
  "name": "Raspberry",
  "id": 21,
  "created_at": "2021-02-07T20:05:03.167Z",
  "updated_at": "2021-02-07T20:05:03.200Z"
}

POST /api/saved_gardens/snapshot

Response

Empty Response

GET /api/sensor_readings

Request

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

Response

[
  {
    "id": 30,
    "created_at": "2021-02-07T20:04:27.796Z",
    "updated_at": "2021-02-07T20:04:27.796Z",
    "mode": 0,
    "pin": 157,
    "value": 59,
    "x": 195.0,
    "y": 130.0,
    "z": 219.0,
    "read_at": "2021-02-07T20:04:27.796Z"
  },
  {
    "id": 29,
    "created_at": "2021-02-07T20:04:27.791Z",
    "updated_at": "2021-02-07T20:04:27.791Z",
    "mode": 0,
    "pin": 270,
    "value": 727,
    "x": 413.0,
    "y": 491.0,
    "z": 476.0,
    "read_at": "2021-02-07T20:04:27.79

GET /api/sensor_readings

Response

[
  {
    "id": 36,
    "created_at": "2021-02-07T20:04:27.858Z",
    "updated_at": "2021-02-07T20:04:27.859Z",
    "mode": 0,
    "pin": 322,
    "value": 591,
    "x": 244.0,
    "y": 434.0,
    "z": 131.0,
    "read_at": "2021-02-07T20:04:27.858Z"
  },
  {
    "id": 37,
    "created_at": "2021-02-07T20:03:27.864Z",
    "updated_at": "2021-02-07T20:04:27.864Z",
    "mode": 0,
    "pin": 1,
    "value": 329,
    "x": 179.0,
    "y": 434.0,
    "z": 88.0,
    "read_at": "2021-02-07T20:03:27.864Z

GET /api/sensor_readings

Response

[
  {
    "id": 46,
    "created_at": "2021-02-07T20:04:28.096Z",
    "updated_at": "2021-02-07T20:04:28.096Z",
    "mode": 0,
    "pin": 229,
    "value": 727,
    "x": 445.0,
    "y": 34.0,
    "z": 459.0,
    "read_at": "2021-02-07T20:04:28.096Z"
  }
]

POST /api/sensor_readings

Request

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

Response

{
  "id": 47,
  "created_at": "2021-02-07T20:04:28.138Z",
  "updated_at": "2021-02-07T20:04:28.138Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2021-02-07T20:04:28.138Z"
}

POST /api/sensor_readings

Request

{
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1,
  "z": 2,
  "mode": 1,
  "read_at": "2021-02-07T15:04:28.252+00:00"
}

Response

{
  "id": 50,
  "created_at": "2021-02-07T20:04:28.259Z",
  "updated_at": "2021-02-07T20:04:28.259Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2021-02-07T15:04:28.252Z"
}

GET /api/sensor_readings/48

Response

{
  "id": 48,
  "created_at": "2021-02-07T20:04:28.172Z",
  "updated_at": "2021-02-07T20:04:28.172Z",
  "mode": 0,
  "pin": 117,
  "value": 257,
  "x": 436.0,
  "y": 380.0,
  "z": 41.0,
  "read_at": "2021-02-07T20:04:28.172Z"
}

DELETE /api/sensor_readings/49

Response

Empty Response

GET /api/sensors

Response

[
  {
    "id": 24,
    "created_at": "2021-02-07T20:05:01.828Z",
    "updated_at": "2021-02-07T20:05:01.828Z",
    "pin": 11,
    "label": "MyString",
    "mode": 1
  },
  {
    "id": 23,
    "created_at": "2021-02-07T20:05:01.820Z",
    "updated_at": "2021-02-07T20:05:01.820Z",
    "pin": 10,
    "label": "MyString",
    "mode": 1
  }
]

POST /api/sensors

Request

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

Response

{
  "id": 26,
  "created_at": "2021-02-07T20:05:01.911Z",
  "updated_at": "2021-02-07T20:05:01.911Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

PUT /api/sensors/21

Request

{
  "label": "The new label"
}

Response

{
  "id": 21,
  "created_at": "2021-02-07T20:05:01.726Z",
  "updated_at": "2021-02-07T20:05:01.739Z",
  "pin": 8,
  "label": "The new label",
  "mode": 1
}

DELETE /api/sensors/22

Response

{
  "id": 22,
  "created_at": "2021-02-07T20:05:01.773Z",
  "updated_at": "2021-02-07T20:05:01.773Z",
  "pin": 9,
  "label": "The old label",
  "mode": 1
}

GET /api/sensors/25

Response

{
  "id": 25,
  "created_at": "2021-02-07T20:05:01.869Z",
  "updated_at": "2021-02-07T20:05:01.869Z",
  "pin": 12,
  "label": "MyString",
  "mode": 1
}

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": 52,
  "created_at": "2021-02-07T20:04:19.489Z",
  "updated_at": "2021-02-07T20:04:19.489Z",
  "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,
     

POST /api/sequences

Request

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

  ],
  "pinned": true
}

Response

{
  "id": 54,
  "created_at": "2021-02-07T20:04:19.699Z",
  "updated_at": "2021-02-07T20:04:19.699Z",
  "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",
  "body": [

  ]
}

Response

{
  "id": 55,
  "created_at": "2021-02-07T20:04:19.756Z",
  "updated_at": "2021-02-07T20:04:19.756Z",
  "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

{
  "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": 56,
  "created_at": "2021-02-07T20:04:20.552Z",
  "updated_at": "2021-02-07T20:04:20.552Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "variable_declaration",
          "args": {
            "label": "parent",
            "data_value": {
              "kind": "coordinate",
              "args": {
                "z": 50,
                "y": 50,
       

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": 59,
  "created_at": "2021-02-07T20:04:20.879Z",
  "updated_at": "2021-02-07T20:04:20.879Z",
  "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,
        "offset": {
          "kind": "coordinate",
          "args": {
            

POST /api/sequences

Request

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

Response

{
  "id": 61,
  "created_at": "2021-02-07T20:04:21.326Z",
  "updated_at": "2021-02-07T20:04:21.326Z",
  "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,
        "offset": {
          "kind": "coordinate",
          "args": {
          

POST /api/sequences

Request

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

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

Response

{
  "id": 62,
  "created_at": "2021-02-07T20:04:21.418Z",
  "updated_at": "2021-02-07T20:04:21.418Z",
  "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": "32e33dd1-2aff-4dc6-9b1d-2f8918833908"
    },
    {
    

Response

{
  "id": 66,
  "created_at": "2021-02-07T20:04:21.709Z",
  "updated_at": "2021-02-07T20:04:21.709Z",
  "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,
        "offset": {
          "kind": "coordinate",
          "args": {
            

GET /api/sequences

Response

[
  {
    "id": 175,
    "created_at": "2021-02-07T20:05:01.363Z",
    "updated_at": "2021-02-07T20:05:01.396Z",
    "folder_id": null,
    "args": {
      "version": 20180209,
      "locals": {
        "kind": "scope_declaration",
        "args": {
        }
      }
    },
    "color": "orange",
    "name": "Right-sized incremental projection",
    "pinned": false,
    "kind": "sequence",
    "body": [

    ]
  },
  {
    "id": 176,
    "created_at": "2021-02-07T20:05:01.408Z",
    "updated_at"

DELETE /api/sequences/13

Response

Empty Response

DELETE /api/sequences/15

Response

Empty Response

PATCH /api/sequences/18

Request

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

    ]
  }
}

Response

{
  "id": 18,
  "created_at": "2021-02-07T20:04:10.002Z",
  "updated_at": "2021-02-07T20:04:10.081Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "orange",
  "name": "pinned",
  "pinned": true,
  "kind": "sequence",
  "body": [

  ]
}

PATCH /api/sequences/19

Request

{
  "id": 19,
  "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": 19,
  "created_at": "2021-02-07T20:04:10.115Z",
  "updated_at": "2021-02-07T20:04:10.212Z",
  "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,
     

GET /api/sequences/210

Response

{
  "id": 210,
  "created_at": "2021-02-07T20:05:12.626Z",
  "updated_at": "2021-02-07T20:05:12.663Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "red",
  "name": "Networked multi-state contingency",
  "pinned": false,
  "kind": "sequence",
  "body": [

  ]
}

GET /api/storage_auth

Response

{
  "verb": "POST",
  "url": "//10.11.1.235:3000/direct_upload/",
  "form_data": {
    "key": "temp/aeacd7e3-cebe-40a3-8853-b267ca7af2b9.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/47242b1e-f310-4cd2-bd36-c66974aa9068.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

POST /api/tokens

Request

{
  "user": {
    "email": "edmundo@mccullough.org",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "human",
      "sub": 156,
      "iat": 1612728264,
      "jti": "40823c52-2170-4a6d-ae9c-457b5237476c",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184264,
      "mqtt": "blooper.io",
      "bot": "device_203",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJodW1hbiIsInN1YiI6MTU2LCJpYXQiOjE2MTI3MjgyNjQsImp0aSI6IjQwODIzYzUyLTIxNzAtNGE2ZC1hZTljLTQ1N2I1MjM3ND

POST /api/tokens

Request

{
  "user": {
    "email": "morton.baumbach@spencer.io",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 157,
      "iat": 1612728264,
      "jti": "31843b2e-5b3d-4480-9961-74cef56e5c92",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184264,
      "mqtt": "blooper.io",
      "bot": "device_204",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxNTcsImlhdCI6MTYxMjcyODI2NCwianRpIjoiMzE4NDNiMmUtNWIzZC00NDgwLTk5NjEtNzRjZWY1

POST /api/tokens

Request

{
  "user": {
    "email": "jody@pollich.biz",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 158,
      "iat": 1612728264,
      "jti": "d2c9600d-aca7-4b21-ab5f-d5fd66798f86",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184264,
      "mqtt": "blooper.io",
      "bot": "device_205",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxNTgsImlhdCI6MTYxMjcyODI2NCwianRpIjoiZDJjOTYwMGQtYWNhNy00YjIxLWFiNWYtZDVmZDY2

POST /api/tokens

Request

{
  "user": {
    "email": "jordon.kuhn@kemmer-smitham.biz",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 159,
      "iat": 1612728264,
      "jti": "c9a41a85-a2ea-44c3-85a3-3026d8579f3b",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184264,
      "mqtt": "blooper.io",
      "bot": "device_206",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxNTksImlhdCI6MTYxMjcyODI2NCwianRpIjoiYzlhNDFhODUtYTJlYS00NGMzLTg1YTMtMzAyNmQ4

POST /api/tokens

Request

{
  "user": {
    "email": "weldon.haag@jones.org",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "bot",
      "sub": 160,
      "iat": 1612728265,
      "jti": "5d363432-1637-44f9-8ddb-045243cf83ef",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184265,
      "mqtt": "blooper.io",
      "bot": "device_207",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJib3QiLCJzdWIiOjE2MCwiaWF0IjoxNjEyNzI4MjY1LCJqdGkiOiI1ZDM2MzQzMi0xNjM3LTQ0ZjktOGRkYi0wNDUyNDNjZjgzZWYi

POST /api/tokens

Request

{
  "user": {
    "email": "isabelle.terry@bernhard.info",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 161,
      "iat": 1612728265,
      "jti": "8b12f210-7b46-443f-942a-635a778ffabe",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184265,
      "mqtt": "blooper.io",
      "bot": "device_208",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxNjEsImlhdCI6MTYxMjcyODI2NSwianRpIjoiOGIxMmYyMTAtN2I0Ni00NDNmLTk0MmEtNjM1YTc3

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 217,
      "iat": 1612728270,
      "jti": "928f979e-feb9-4edc-ad09-e288e9ac9909",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184270,
      "mqtt": "blooper.io",
      "bot": "device_290",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyMTcsImlhdCI6MTYxMjcyODI3MCwianRpIjoiOTI4Zjk3OWUtZmViOS00ZWRjLWFkMDktZTI4OGU5

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 219,
      "iat": 1612728271,
      "jti": "dbc2d71b-1ef7-4290-b816-d3dc63cf09cc",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184270,
      "mqtt": "blooper.io",
      "bot": "device_292",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyMTksImlhdCI6MTYxMjcyODI3MSwianRpIjoiZGJjMmQ3MWItMWVmNy00MjkwLWI4MTYtZDNkYzYz

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 221,
      "iat": 1612728272,
      "jti": "a4af6890-eb90-467e-967c-c42f8a75eed1",
      "iss": "//10.11.1.235:3000",
      "exp": 1616184271,
      "mqtt": "blooper.io",
      "bot": "device_294",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyMjEsImlhdCI6MTYxMjcyODI3MiwianRpIjoiYTRhZjY4OTAtZWI5MC00NjdlLTk2N2MtYzQyZjhh

POST /api/tools

Request

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

Response

{
  "id": 41,
  "created_at": "2021-02-07T20:04:23.993Z",
  "updated_at": "2021-02-07T20:04:23.993Z",
  "name": "wow",
  "status": "inactive"
}

GET /api/tools

Response

[
  {
    "id": 114,
    "created_at": "2021-02-07T20:04:57.262Z",
    "updated_at": "2021-02-07T20:04:57.262Z",
    "name": "ShellderNidorino",
    "status": "active"
  }
]

GET /api/tools/122

Response

{
  "id": 122,
  "created_at": "2021-02-07T20:05:10.625Z",
  "updated_at": "2021-02-07T20:05:10.625Z",
  "name": "JolteonTentacruel",
  "status": "active"
}

DELETE /api/tools/14

Response

{
  "id": 14,
  "created_at": "2021-02-07T20:04:10.822Z",
  "updated_at": "2021-02-07T20:04:10.822Z",
  "name": "ArticunoArbok",
  "status": "inactive"
}

DELETE /api/tools/16

Response

{
  "id": 16,
  "created_at": "2021-02-07T20:04:10.912Z",
  "updated_at": "2021-02-07T20:04:10.912Z",
  "name": "AerodactylGolduck",
  "status": "inactive"
}

PUT /api/tools/46

Request

{
  "name": "Hi!"
}

Response

{
  "id": 46,
  "created_at": "2021-02-07T20:04:30.317Z",
  "updated_at": "2021-02-07T20:04:30.338Z",
  "name": "Hi!",
  "status": "active"
}

POST /api/users

Request

{
  "password_confirmation": "Password123",
  "password": "Password123",
  "email": "ollie@harber-becker.net",
  "name": "Frank"
}

Response

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

PATCH /api/users

Request

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

Response

{
  "id": 96,
  "created_at": "2021-02-07T20:04:18.876Z",
  "updated_at": "2021-02-07T20:04:18.910Z",
  "name": "Ricky McRickerson",
  "email": "marion.mante@russel-emard.name"
}

PATCH /api/users

Request

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

Response

{
  "id": 98,
  "created_at": "2021-02-07T20:04:18.968Z",
  "updated_at": "2021-02-07T20:04:19.002Z",
  "name": "Prof. Cathi Mills",
  "email": "marcelle@wilderman-cartwright.io"
}

GET /api/users

Response

[
  {
    "id": 99,
    "created_at": "2021-02-07T20:04:19.031Z",
    "updated_at": "2021-02-07T20:04:19.031Z",
    "name": "Marcos Kuhn",
    "email": "evangeline.olson@donnelly.biz"
  }
]

DELETE /api/users

Request

{
  "password": "XfJhCmIeI1"
}

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: 100\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: device_id\n    value_before_type_cast: 135\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: name\n    value_before_type_cast: Mr. Myrtle Hoeger\n  - !ruby/ob

POST /api/users/control_certificate

Request

{
  "email": "bethann_vandervort@padberg.net",
  "password": "password456"
}

Response

Empty Response

POST /api/users/resend_verification

Request

{
  "email": "zandra@huels.name"
}

Response

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

GET /api/web_app_config

Response

{
  "id": 3,
  "created_at": "2021-02-07T20:04:08.347Z",
  "updated_at": "2021-02-07T20:04:08.347Z",
  "device_id": 20,
  "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_axi

PUT /api/web_app_config

Request

{
  "device_id": 99
}

Response

{
  "id": 4,
  "created_at": "2021-02-07T20:04:08.381Z",
  "updated_at": "2021-02-07T20:04:08.381Z",
  "device_id": 21,
  "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_axi

PUT /api/web_app_config

Request

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

Response

{
  "id": 5,
  "created_at": "2021-02-07T20:04:08.416Z",
  "updated_at": "2021-02-07T20:04:08.427Z",
  "device_id": 22,
  "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_axi

PUT /api/web_app_config

Request

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

Response

{
  "id": 6,
  "created_at": "2021-02-07T20:04:08.461Z",
  "updated_at": "2021-02-07T20:04:08.471Z",
  "device_id": 23,
  "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_axi

DELETE /api/web_app_config

Response

Empty Response

POST /api/webcam_feeds

Request

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

Response

{
  "id": 11,
  "created_at": "2021-02-07T20:04:19.452Z",
  "updated_at": "2021-02-07T20:04:19.452Z",
  "url": "url1",
  "name": "name1"
}

GET /api/webcam_feeds

Response

[
  {
    "id": 13,
    "created_at": "2021-02-07T20:04:23.054Z",
    "updated_at": "2021-02-07T20:04:23.054Z",
    "url": "1",
    "name": "feed 1"
  },
  {
    "id": 12,
    "created_at": "2021-02-07T20:04:23.049Z",
    "updated_at": "2021-02-07T20:04:23.049Z",
    "url": "0",
    "name": "feed 0"
  }
]

DELETE /api/webcam_feeds/14

Response

Empty Response

GET /api/webcam_feeds/15

Response

{
  "id": 15,
  "created_at": "2021-02-07T20:04:30.235Z",
  "updated_at": "2021-02-07T20:04:30.235Z",
  "url": "Url!",
  "name": "Name!"
}

PATCH /api/webcam_feeds/5

Request

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

Response

{
  "id": 5,
  "created_at": "2021-02-07T20:04:08.545Z",
  "updated_at": "2021-02-07T20:04:08.557Z",
  "url": "/foo.jpg",
  "name": "ok"
}

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/12c8a567-c1e5-4e91-a485-91980c9b27ae

Request

{
  "token": "12c8a567-c1e5-4e91-a485-91980c9b27ae"
}

Response

Empty Response

GET /verify/7eb81254-cd96-456f-b22f-378fcc6b8ad1

Request

{
  "token": "7eb81254-cd96-456f-b22f-378fcc6b8ad1"
}

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