Skip to content

Instantly share code, notes, and snippets.

@RickCarlino

RickCarlino/api_docs.md Secret

Last active Jul 4, 2020
Embed
What would you like to do?

GET /

Notes: Documentation generated for the FarmBot Web App.

Response

Empty Response

GET /api/alerts

Response

[
  {
    "id": 18,
    "created_at": 1593821752,
    "updated_at": "2020-07-04T00:15:52.286Z",
    "priority": 100,
    "problem_tag": "api.demo_account.in_use",
    "slug": "c333d829-3532-48d3-90de-8744c400dca1"
  }
]

GET /api/alerts/17

Response

{
  "id": 17,
  "created_at": 1593821752,
  "updated_at": "2020-07-04T00:15:52.263Z",
  "priority": 100,
  "problem_tag": "api.seed_data.missing",
  "slug": "fa6c2fdf-ef35-4f68-8369-03145ebdca43"
}

GET /api/corpus

Response

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

POST /api/demo_account

Request

{
  "secret": "oevbwrgqj5bdzyo9"
}

Response

{
}

POST /api/device

Request

{
  "user_id": 4,
  "name": "Bean Sprouts"
}

Response

{
  "id": 10,
  "created_at": "2020-07-04T00:15:51.481Z",
  "updated_at": "2020-07-04T00:15:51.481Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Bean Sprouts",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": null,
  "throttled_at": null,
  "throttled_until": null,
  "timezone": null,
  "tz_offset_hrs": 0
}

POST /api/device

Request

{
  "user_id": 6
}

Response

{
  "id": 13,
  "created_at": "2020-07-04T00:15:51.534Z",
  "updated_at": "2020-07-04T00:15:51.534Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "FarmBot",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": null,
  "throttled_at": null,
  "throttled_until": null,
  "timezone": null,
  "tz_offset_hrs": 0
}

GET /api/device

Response

{
  "id": 118,
  "created_at": "2020-07-04T00:15:56.468Z",
  "updated_at": "2020-07-04T00:15:56.468Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Spinach",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "548693e52c85b06be249f74df1f8f967",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Porto-Novo",
  "tz_offset_hrs": 1
}

DELETE /api/device

Response

Empty Response

GET /api/device

Response

{
  "id": 353,
  "created_at": "2020-07-04T00:16:15.318Z",
  "updated_at": "2020-07-04T00:16:15.318Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Lettuce",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "15dae67986b81e179045625ed968b2c5",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "MET",
  "tz_offset_hrs": 2
}

PUT /api/device

Request

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

Response

{
  "id": 433,
  "created_at": "2020-07-04T00:16:20.234Z",
  "updated_at": "2020-07-04T00:16:20.245Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Radicchio",
  "needs_reset": false,
  "ota_hour": null,
  "serial_number": "4a2edd56018facfde8aa6dac5520706d",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Asia/Jayapura",
  "tz_offset_hrs": 9
}

PUT /api/device

Request

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

Response

{
  "id": 436,
  "created_at": "2020-07-04T00:16:20.269Z",
  "updated_at": "2020-07-04T00:16:20.302Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Cos lettuce",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "9814ccd76b53a95eac586d06e492c33e",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Niamey",
  "tz_offset_hrs": 1
}

PUT /api/device

Request

{
  "id": 437,
  "name": "Sunshine Rau"
}

Response

{
  "id": 437,
  "created_at": "2020-07-04T00:16:20.317Z",
  "updated_at": "2020-07-04T00:16:20.332Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Sunshine Rau",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "2cbc40733e3f43ec91c906af09d806dd",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "America/Inuvik",
  "tz_offset_hrs": -6
}

PUT /api/device

Request

{
  "id": 438,
  "timezone": "Africa/Lubumbashi"
}

Response

{
  "id": 438,
  "created_at": "2020-07-04T00:16:20.341Z",
  "updated_at": "2020-07-04T00:16:20.351Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Asparagus",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "5a91254d45c432b0d9c98913e140a12d",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Lubumbashi",
  "tz_offset_hrs": 2
}

PUT /api/device

Request

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

Response

{
  "id": 440,
  "created_at": "2020-07-04T00:16:20.370Z",
  "updated_at": "2020-07-04T00:16:20.383Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Fresh Chillies",
  "needs_reset": false,
  "ota_hour": 12,
  "serial_number": "9be194dc54f1590a43919228cb02983b",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Europe/Istanbul",
  "tz_offset_hrs": 3
}

PUT /api/device

Request

{
  "id": 441,
  "mounted_tool_id": 101
}

Response

{
  "id": 441,
  "created_at": "2020-07-04T00:16:20.389Z",
  "updated_at": "2020-07-04T00:16:20.403Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": 101,
  "name": "Bean Sprouts",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "a3def67609fb2332e9b07eac14e148b0",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "America/Kentucky/Louisville",
  "tz_offset_hrs": -4
}

POST /api/device/reset

Request

{
  "password": "password456"
}

Response

{
  "ok": "OK"
}

POST /api/device/seed

Request

{
  "product_line": "genesis_xl_1.5"
}

Response

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

POST /api/device/seed

Request

{
  "product_line": "genesis_xl_1.4"
}

Response

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

POST /api/device/seed

Request

{
  "product_line": "express_1.0"
}

Response

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

POST /api/device/seed

Request

{
  "product_line": "genesis_1.3"
}

Response

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

POST /api/device/seed

Request

{
  "product_line": "express_xl_1.0"
}

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

Response

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

POST /api/device/seed

Request

{
  "product_line": "genesis_1.5"
}

Response

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

POST /api/device/seed

Request

{
  "product_line": "genesis_1.4"
}

Response

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

GET /api/device/sync

Response

{
  "devices": [
    [
      202,
      "2020-07-04T00:16:01.276Z"
    ]
  ],
  "farm_events": [
    [
      14,
      "2020-07-04T00:16:01.162Z"
    ]
  ],
  "farmware_envs": [
    [
      318,
      "2020-07-04T00:16:01.169Z"
    ]
  ],
  "farmware_installations": [
    [
      12,
      "2020-07-04T00:16:01.176Z"
    ]
  ],
  "peripherals": [
    [
      7,
      "2020-07-04T00:16:01.184Z"
    ]
  ],
  "pin_bindings": [
    [
      9,
      "2020-07-04T00:16:01.188Z"
    ]
  ],
  "points": [

POST /api/device_cert

Request

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

Response

{
  "id": 237,
  "created_at": "2020-07-04T00:16:04.345Z",
  "updated_at": "2020-07-04T00:16:04.357Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Purple carrot",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "456",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Africa/Niamey",
  "tz_offset_hrs": 1
}

POST /api/device_cert

Request

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

Response

{
  "id": 238,
  "created_at": "2020-07-04T00:16:04.363Z",
  "updated_at": "2020-07-04T00:16:04.374Z",
  "fbos_version": null,
  "last_ota_checkup": null,
  "last_ota": null,
  "last_saw_api": null,
  "last_saw_mq": null,
  "mounted_tool_id": null,
  "name": "Cabbage",
  "needs_reset": false,
  "ota_hour": 3,
  "serial_number": "456",
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "Etc/GMT+5",
  "tz_offset_hrs": -5
}

POST /api/export_data

Response

null

POST /api/export_data

Response

{
  "export_created_at": "2020-07-04T00:16:15.060+00:00",
  "server_url": "//10.11.1.235:3000",
  "database_schema": 20200621012312,
  "tools": [

  ],
  "device": {
    "id": 340,
    "created_at": "2020-07-04T00:16:15.050Z",
    "updated_at": "2020-07-04T00:16:15.050Z",
    "fbos_version": null,
    "last_ota_checkup": null,
    "last_ota": null,
    "last_saw_api": null,
    "last_saw_mq": null,
    "mounted_tool_id": null,
    "name": "Fresh Chillies",
    "needs_reset": false,
    "ota_hour

GET /api/farm_events

Response

[

]

GET /api/farm_events

Response

[
  {
    "id": 28,
    "created_at": "2020-07-04T00:16:13.417Z",
    "updated_at": "2020-07-04T00:16:13.417Z",
    "start_time": "2020-06-28T00:00:00.000Z",
    "end_time": "2022-07-04T00:16:13.378Z",
    "repeat": 5,
    "time_unit": "daily",
    "executable_id": 150,
    "executable_type": "Sequence",
    "body": [

    ]
  },
  {
    "id": 27,
    "created_at": "2020-07-04T00:16:13.395Z",
    "updated_at": "2020-07-04T00:16:13.395Z",
    "start_time": "2020-06-28T00:00:00.000Z",
    "end_tim

POST /api/farm_events

Request

{
  "start_time": "2020-07-04T01:15:50.000+00:00",
  "next_time": "2017-06-05T18:33:04.342Z",
  "time_unit": "never",
  "executable_id": 29,
  "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": 125
          }
        }
      }
    }
  ]
}

Response

{
  "id": 32,
  "created_at": "2020-07-04T00:16:23.128Z",
  "updated_at": "2020-07-04T00:16:23.154Z",
  "start_time": "2020-07-04T01:15:50.000Z",
  "end_time": "2020-07-04T01:16:50.000Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 29,
  "executable_type": "Regimen",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "wow",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 125
          }
        }
  

POST /api/farm_events

Request

{
  "end_time": "2020-07-04T00:16:23.238+00:00",
  "time_unit": "never",
  "executable_id": 214,
  "executable_type": "Sequence",
  "repeat": 1
}

Response

{
  "id": 33,
  "created_at": "2020-07-04T00:16:23.242Z",
  "updated_at": "2020-07-04T00:16:23.243Z",
  "start_time": "2020-07-04T00:15:47.816Z",
  "end_time": "2020-07-04T00:16:47.816Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 214,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farm_events

Request

{
  "start_time": "2020-06-20T00:16:23.293+00:00",
  "time_unit": "never",
  "executable_id": 31,
  "executable_type": "Regimen",
  "end_time": "2017-06-05T18:34:00.000Z",
  "repeat": 1
}

Response

{
  "id": 35,
  "created_at": "2020-07-04T00:16:23.296Z",
  "updated_at": "2020-07-04T00:16:23.298Z",
  "start_time": "2020-06-20T00:16:23.293Z",
  "end_time": "2020-06-20T00:17:23.293Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 31,
  "executable_type": "Regimen",
  "body": [

  ]
}

GET /api/farm_events

Response

[
  {
    "id": 37,
    "created_at": "2020-07-04T00:16:23.356Z",
    "updated_at": "2020-07-04T00:16:23.357Z",
    "start_time": "2020-07-04T01:15:50.000Z",
    "end_time": "2020-07-04T01:16:50.000Z",
    "repeat": 1,
    "time_unit": "never",
    "executable_id": 34,
    "executable_type": "Regimen",
    "body": [

    ]
  }
]

POST /api/farm_events

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

Request

{
  "executable_id": 215,
  "executable_type": "Sequence",
  "start_time": "2020-07-04T00:17:23.398+00:00",
  "end_time": "2029-02-17T18:19:20.000Z",
  "repeat": 4,
  "time_unit": "minutely"
}

Response

{
  "id": 38,
  "created_at": "2020-07-04T00:16:23.403Z",
  "updated_at": "2020-07-04T00:16:23.405Z",
  "start_time": "2020-07-04T00:17:23.398Z",
  "end_time": "2029-02-17T18:19:20.000Z",
  "repeat": 4,
  "time_unit": "minutely",
  "executable_id": 215,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/17

Request

{
  "body": [

  ]
}

Response

{
  "id": 17,
  "created_at": "2020-07-04T00:16:12.098Z",
  "updated_at": "2020-07-04T00:16:12.147Z",
  "start_time": "2020-06-28T00:00:00.000Z",
  "end_time": "2020-07-07T00:01:00.000Z",
  "repeat": 1,
  "time_unit": "daily",
  "executable_id": 138,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/18

Request

{
  "body": null
}

Response

{
  "id": 18,
  "created_at": "2020-07-04T00:16:12.183Z",
  "updated_at": "2020-07-04T00:16:12.214Z",
  "start_time": "2020-06-30T00:00:00.000Z",
  "end_time": "2020-07-07T00:01:00.000Z",
  "repeat": 3,
  "time_unit": "weekly",
  "executable_id": 139,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
  

PATCH /api/farm_events/21

Request

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

Response

{
  "id": 21,
  "created_at": "2020-07-04T00:16:12.359Z",
  "updated_at": "2020-07-04T00:16:12.372Z",
  "start_time": "2020-06-28T00:00:00.000Z",
  "end_time": "2020-06-28T00:01:00.000Z",
  "repeat": 1,
  "time_unit": "never",
  "executable_id": 142,
  "executable_type": "Sequence",
  "body": [

  ]
}

PATCH /api/farm_events/22

Request

{
  "body": null
}

Response

{
  "id": 22,
  "created_at": "2020-07-04T00:16:12.422Z",
  "updated_at": "2020-07-04T00:16:12.470Z",
  "start_time": "2020-06-28T00:00:00.000Z",
  "end_time": "2020-07-08T00:01:00.000Z",
  "repeat": 1,
  "time_unit": "yearly",
  "executable_id": 143,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "foo",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
  

PATCH /api/farm_events/23

Request

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

Response

{
  "id": 23,
  "created_at": "2020-07-04T00:16:12.548Z",
  "updated_at": "2020-07-04T00:16:12.590Z",
  "start_time": "2020-07-02T00:00:00.000Z",
  "end_time": "2020-07-05T00:01:00.000Z",
  "repeat": 2,
  "time_unit": "minutely",
  "executable_id": 144,
  "executable_type": "Sequence",
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "bar",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 3,
            "y": 2,

PATCH /api/farm_events/24

Request

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

Response

{
  "id": 24,
  "created_at": "2020-07-04T00:16:12.635Z",
  "updated_at": "2020-07-04T00:16:12.643Z",
  "start_time": "2020-07-02T00:00:00.000Z",
  "end_time": "2020-07-08T00:01:00.000Z",
  "repeat": 5,
  "time_unit": "hourly",
  "executable_id": 145,
  "executable_type": "Sequence",
  "body": [

  ]
}

DELETE /api/farm_events/3

Response

Empty Response

GET /api/farm_events/8

Response

{
  "id": 8,
  "created_at": "2020-07-04T00:15:57.809Z",
  "updated_at": "2020-07-04T00:15:57.809Z",
  "start_time": "2020-06-30T00:00:00.000Z",
  "end_time": "2022-07-04T00:15:57.787Z",
  "repeat": 3,
  "time_unit": "daily",
  "executable_id": 52,
  "executable_type": "Sequence",
  "body": [

  ]
}

POST /api/farmware_envs

Request

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

Response

{
  "id": 1,
  "device_id": 70,
  "key": "compund_data",
  "value": {
    "x": "y",
    "z": 300
  },
  "created_at": "2020-07-04T00:15:52.899Z",
  "updated_at": "2020-07-04T00:15:52.899Z"
}

POST /api/farmware_envs

Request

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

Response

{
  "id": 3,
  "device_id": 72,
  "key": "Coffee Emoji",
  "value": "☕",
  "created_at": "2020-07-04T00:15:52.932Z",
  "updated_at": "2020-07-04T00:15:52.932Z"
}

GET /api/farmware_envs

Response

[
  {
    "id": 311,
    "device_id": 75,
    "key": "Leech Seed",
    "value": "Conversion",
    "created_at": "2020-07-04T00:15:54.908Z",
    "updated_at": "2020-07-04T00:15:54.908Z"
  },
  {
    "id": 310,
    "device_id": 75,
    "key": "Peck",
    "value": "Double Slap",
    "created_at": "2020-07-04T00:15:54.904Z",
    "updated_at": "2020-07-04T00:15:54.904Z"
  },
  {
    "id": 309,
    "device_id": 75,
    "key": "Mega Punch",
    "value": "Focus Energy",
    "created_at": "2020-07-04T00:

GET /api/farmware_envs/2

Response

{
  "id": 2,
  "device_id": 71,
  "key": "Dizzy Punch",
  "value": "Stun Spore",
  "created_at": "2020-07-04T00:15:52.913Z",
  "updated_at": "2020-07-04T00:15:52.913Z"
}

PUT /api/farmware_envs/312

Request

{
  "key": "neprahS",
  "value": "kciK pmuJ hgiH"
}

Response

{
  "device_id": 76,
  "id": 312,
  "key": "neprahS",
  "value": "kciK pmuJ hgiH",
  "created_at": "2020-07-04T00:15:54.943Z",
  "updated_at": "2020-07-04T00:15:54.953Z"
}

DELETE /api/farmware_envs/313

Response

Empty Response

DELETE /api/farmware_envs/all

Response

Empty Response

GET /api/farmware_installations

Response

[
  {
    "id": 15,
    "created_at": "2020-07-04T00:16:16.473Z",
    "updated_at": "2020-07-04T00:16:16.473Z",
    "url": "http://murphy.io/dahlia.crist/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 16,
    "created_at": "2020-07-04T00:16:16.477Z",
    "updated_at": "2020-07-04T00:16:16.477Z",
    "url": "http://witting.io/alvina/manifest.json",
    "package": null,
    "package_error": null
  },
  {
    "id": 17,
    "created_at": "2020-07-04T00:16:16.483Z",

POST /api/farmware_installations

Request

{
  "url": "http://treutel.biz/tierra_green/manifest.json"
}

Response

{
  "id": 20,
  "created_at": "2020-07-04T00:16:16.575Z",
  "updated_at": "2020-07-04T00:16:16.575Z",
  "url": "http://treutel.biz/tierra_green/manifest.json",
  "package": null,
  "package_error": null
}

GET /api/farmware_installations/14

Response

{
  "id": 14,
  "created_at": "2020-07-04T00:16:16.452Z",
  "updated_at": "2020-07-04T00:16:16.452Z",
  "url": "http://collier.co/carl_hudson/manifest.json",
  "package": null,
  "package_error": null
}

POST /api/farmware_installations/18/refresh

Response

{
  "id": 18,
  "created_at": "2020-07-04T00:16:16.512Z",
  "updated_at": "2020-07-04T00:16:16.512Z",
  "url": "http://heidenreich.org/bobette/manifest.json",
  "package": null,
  "package_error": null
}

DELETE /api/farmware_installations/19

Response

Empty Response

DELETE /api/fbos_config

Response

Empty Response

PUT /api/fbos_config

Request

{
  "device_id": 99
}

Response

{
  "id": 3,
  "created_at": "2020-07-04T00:15:52.444Z",
  "updated_at": "2020-07-04T00:15:52.444Z",
  "device_id": 52,
  "auto_sync": true,
  "beta_opt_in": false,
  "disable_factory_reset": false,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": fa

PUT /api/fbos_config

Request

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

Response

{
  "id": 6,
  "created_at": "2020-07-04T00:15:52.526Z",
  "updated_at": "2020-07-04T00:15:52.537Z",
  "device_id": 55,
  "auto_sync": true,
  "beta_opt_in": true,
  "disable_factory_reset": true,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": fals

PUT /api/fbos_config

Request

{
  "blah_blah_blah": true
}

Response

{
  "id": 7,
  "created_at": "2020-07-04T00:15:52.560Z",
  "updated_at": "2020-07-04T00:15:52.560Z",
  "device_id": 56,
  "auto_sync": true,
  "beta_opt_in": false,
  "disable_factory_reset": false,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": fa

GET /api/fbos_config

Response

{
  "id": 9,
  "created_at": "2020-07-04T00:15:52.595Z",
  "updated_at": "2020-07-04T00:15:52.595Z",
  "device_id": 57,
  "auto_sync": true,
  "beta_opt_in": false,
  "disable_factory_reset": false,
  "firmware_input_log": false,
  "firmware_output_log": false,
  "sequence_body_log": false,
  "sequence_complete_log": false,
  "sequence_init_log": false,
  "network_not_found_timer": null,
  "firmware_hardware": null,
  "api_migrated": true,
  "os_auto_update": true,
  "arduino_debug_messages": fa

PUT /api/firmware_config

Request

{
  "device_id": 99
}

Response

{
  "id": 12,
  "created_at": "2020-07-04T00:16:13.217Z",
  "updated_at": "2020-07-04T00:16:13.217Z",
  "device_id": 307,
  "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
}

Response

{
  "id": 13,
  "created_at": "2020-07-04T00:16:13.240Z",
  "updated_at": "2020-07-04T00:16:13.247Z",
  "device_id": 308,
  "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": 15,
  "created_at": "2020-07-04T00:16:13.274Z",
  "updated_at": "2020-07-04T00:16:13.274Z",
  "device_id": 309,
  "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/master/packages/take-photo/manifest_v2.json",
    "package": "take-photo",
    "package_error": null
  },
  {
    "id": 2,
    "created_at": "2019-08-14 18:33:08.428306",
    "updated_at": "2019-08-14 18:33:08.428306",
    "url": "https://raw.githubusercontent.com/FarmBot-Labs/farmware_manifests/master/pac

GET /api/first_party_farmwares/2

Response

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

POST /api/folders

Request

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

Response

{
  "id": 4,
  "created_at": "2020-07-04T00:16:20.039Z",
  "updated_at": "2020-07-04T00:16:20.039Z",
  "parent_id": 3,
  "color": "blue",
  "name": "child"
}

GET /api/folders

Response

[
  {
    "id": 12,
    "created_at": "2020-07-04T00:16:20.185Z",
    "updated_at": "2020-07-04T00:16:20.185Z",
    "parent_id": null,
    "color": "red",
    "name": "parent"
  }
]

DELETE /api/folders/11

Response

Empty Response

GET /api/folders/5

Response

{
  "id": 5,
  "created_at": "2020-07-04T00:16:20.052Z",
  "updated_at": "2020-07-04T00:16:20.052Z",
  "parent_id": null,
  "color": "red",
  "name": "parent"
}

PATCH /api/folders/7

Request

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

Response

{
  "id": 7,
  "created_at": "2020-07-04T00:16:20.071Z",
  "updated_at": "2020-07-04T00:16:20.077Z",
  "parent_id": null,
  "color": "red",
  "name": "C"
}

GET /api/global_bulletins/Kohlrabi

Response

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

GET /api/global_config

Response

{
  "PING": "956cb5b6b2a789ca93f78f607da048e9"
}

GET /api/global_config

Response

{
  "PING": "956cb5b6b2a789ca93f78f607da048e9"
}

GET /api/images

Response

[
  {
    "id": 6,
    "created_at": "2020-07-04T00:16:13.905Z",
    "updated_at": "2020-07-04T00:16:13.905Z",
    "device_id": 322,
    "attachment_processed_at": null,
    "attachment_url": "http://10.11.1.235:3000/placeholder_farmbot.jpg?text=Processing...",
    "meta": {
      "x": 1,
      "y": 2,
      "z": 3
    }
  }
]

POST /api/images

Request

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

Response

{
  "id": 8,
  "created_at": "2020-07-04T00:16:13.945Z",
  "updated_at": "2020-07-04T00:16:13.945Z",
  "device_id": 324,
  "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/7

Response

{
  "id": 7,
  "created_at": "2020-07-04T00:16:13.924Z",
  "updated_at": "2020-07-04T00:16:13.924Z",
  "device_id": 323,
  "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/9

Response

Empty Response

POST /api/logs

Request

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

Response

{
  "id": 14,
  "created_at": 1593687482,
  "updated_at": "2020-07-04T00:16:02.967Z",
  "channels": [
    "toast"
  ],
  "message": "Hello, world!",
  "meta": null,
  "major_version": null,
  "minor_version": null,
  "type": "info",
  "verbosity": 1,
  "x": null,
  "y": null,
  "z": null
}

POST /api/logs

Request

{
  "channels": [

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

Response

{
  "id": 25,
  "created_at": 1593821763,
  "updated_at": "2020-07-04T00:16:03.056Z",
  "channels": [

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

POST /api/logs

Request

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

Response

{
  "id": 31,
  "created_at": 1593821763,
  "updated_at": "2020-07-04T00:16:03.097Z",
  "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": 37,
  "created_at": 1593821763,
  "updated_at": "2020-07-04T00:16:03.152Z",
  "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

{
  "message": "HELLO"
}

Response

{
  "id": 54,
  "created_at": 1593821763,
  "updated_at": "2020-07-04T00:16:03.265Z",
  "channels": [

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

GET /api/logs

Response

[
  {
    "id": 159,
    "created_at": 1593821763,
    "updated_at": "2020-07-04T00:16:03.647Z",
    "channels": [

    ],
    "message": null,
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "info",
    "verbosity": 1,
    "x": null,
    "y": null,
    "z": null
  },
  {
    "id": 158,
    "created_at": 1593821763,
    "updated_at": "2020-07-04T00:16:03.641Z",
    "channels": [

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

GET /api/logs

Response

[
  {
    "id": 165,
    "created_at": 1593818223,
    "updated_at": "2020-07-04T00:16:03.950Z",
    "channels": [
      "toast"
    ],
    "message": "strategize one-to-one networks",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "debug",
    "verbosity": 1,
    "x": -113.0,
    "y": -877.0,
    "z": -507.0
  },
  {
    "id": 166,
    "created_at": 1593818163,
    "updated_at": "2020-07-04T00:16:03.952Z",
    "channels": [
      "toast"
    ],
    "message"

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

Response

[

]

GET /api/logs/search

Request

{
  "x": "-10"
}

Response

[
  {
    "id": 201,
    "created_at": 1593816064,
    "updated_at": "2020-07-04T00:16:04.210Z",
    "channels": [
      "toast"
    ],
    "message": "This is -10.0",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "error",
    "verbosity": 1,
    "x": -10.0,
    "y": -34.0,
    "z": -937.0
  }
]

GET /api/logs/search

Response

[
  {
    "id": 210,
    "created_at": 1593815524,
    "updated_at": "2020-07-04T00:16:04.271Z",
    "channels": [
      "toast"
    ],
    "message": "extend sexy mindshare",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "type": "success",
    "verbosity": 1,
    "x": 451.0,
    "y": -839.0,
    "z": 315.0
  },
  {
    "id": 211,
    "created_at": 1593815464,
    "updated_at": "2020-07-04T00:16:04.274Z",
    "channels": [
      "toast"
    ],
    "message": "levera

POST /api/password_resets

Request

{
  "email": "reva.nikolaus@oberbrunner.net"
}

Response

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

PUT /api/password_resets

Request

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

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 290,
      "iat": 1593821779,
      "jti": "15b0d754-0811-49e2-98c2-906e5289747b",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277779,
      "mqtt": "blooper.io",
      "bot": "device_418",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

GET /api/peripherals

Response

[
  {
    "id": 6,
    "created_at": "2020-07-04T00:16:00.142Z",
    "updated_at": "2020-07-04T00:16:00.142Z",
    "pin": 6,
    "label": "MyString",
    "mode": 0
  },
  {
    "id": 5,
    "created_at": "2020-07-04T00:16:00.138Z",
    "updated_at": "2020-07-04T00:16:00.138Z",
    "pin": 5,
    "label": "MyString",
    "mode": 0
  }
]

POST /api/peripherals

Request

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

Response

{
  "id": 51,
  "created_at": "2020-07-04T00:16:21.430Z",
  "updated_at": "2020-07-04T00:16:21.430Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

GET /api/peripherals/45

Response

{
  "id": 45,
  "created_at": "2020-07-04T00:16:11.106Z",
  "updated_at": "2020-07-04T00:16:11.106Z",
  "pin": 9,
  "label": "MyString",
  "mode": 0
}

PATCH /api/peripherals/47

Request

{
  "pin": 9
}

Response

{
  "id": 47,
  "created_at": "2020-07-04T00:16:12.060Z",
  "updated_at": "2020-07-04T00:16:12.066Z",
  "pin": 9,
  "label": "MyString",
  "mode": 0
}

DELETE /api/peripherals/48

Response

{
  "id": 48,
  "created_at": "2020-07-04T00:16:21.174Z",
  "updated_at": "2020-07-04T00:16:21.174Z",
  "pin": 12,
  "label": "wow",
  "mode": 0
}

POST /api/pin_bindings

Request

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

Response

{
  "id": 25,
  "created_at": "2020-07-04T00:16:20.709Z",
  "updated_at": "2020-07-04T00:16:20.709Z",
  "device_id": 456,
  "sequence_id": 165,
  "special_action": null,
  "pin_num": 4,
  "binding_type": "standard"
}

GET /api/pin_bindings

Response

[
  {
    "id": 28,
    "created_at": "2020-07-04T00:16:20.743Z",
    "updated_at": "2020-07-04T00:16:20.743Z",
    "device_id": 457,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 26,
    "binding_type": "standard"
  },
  {
    "id": 27,
    "created_at": "2020-07-04T00:16:20.740Z",
    "updated_at": "2020-07-04T00:16:20.740Z",
    "device_id": 457,
    "sequence_id": null,
    "special_action": null,
    "pin_num": 20,
    "binding_type": "standard"
  },
  {
    "id": 26,

GET /api/pin_bindings/32

Response

{
  "id": 32,
  "created_at": "2020-07-04T00:16:20.858Z",
  "updated_at": "2020-07-04T00:16:20.858Z",
  "device_id": 460,
  "sequence_id": null,
  "special_action": null,
  "pin_num": 0,
  "binding_type": "standard"
}

PUT /api/pin_bindings/35

Request

{
  "pin_num": 5,
  "sequence_id": 169
}

Response

{
  "id": 35,
  "created_at": "2020-07-04T00:16:20.931Z",
  "updated_at": "2020-07-04T00:16:20.946Z",
  "device_id": 462,
  "sequence_id": 169,
  "special_action": null,
  "pin_num": 5,
  "binding_type": "standard"
}

DELETE /api/pin_bindings/38

Response

Empty Response

GET /api/plant_templates

Response

[
  {
    "id": 14,
    "saved_garden_id": 19,
    "device_id": 241,
    "radius": 1.5,
    "x": 434.0,
    "y": 248.0,
    "z": 240.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "2020-07-04T00:16:04.468Z",
    "updated_at": "2020-07-04T00:16:04.468Z"
  },
  {
    "id": 13,
    "saved_garden_id": 18,
    "device_id": 241,
    "radius": 1.5,
    "x": 514.0,
    "y": 58.0,
    "z": 271.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "2020

POST /api/plant_templates

Request

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

Response

{
  "id": 18,
  "saved_garden_id": 23,
  "device_id": 243,
  "radius": 32.0,
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "name": "Asparagus",
  "openfarm_slug": "tomato",
  "created_at": "2020-07-04T00:16:04.523Z",
  "updated_at": "2020-07-04T00:16:04.523Z"
}

DELETE /api/plant_templates/15

Response

Empty Response

PUT /api/plant_templates/6

Request

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

Response

{
  "device_id": 239,
  "id": 6,
  "radius": 32.0,
  "x": 9.0,
  "y": 10.0,
  "z": 11.0,
  "name": "Swiss Chard",
  "openfarm_slug": "melon",
  "saved_garden_id": 11,
  "created_at": "2020-07-04T00:16:04.390Z",
  "updated_at": "2020-07-04T00:16:04.407Z"
}

PUT /api/plant_templates/9

Request

{
  "saved_garden_id": 15
}

Response

{
  "device_id": 240,
  "id": 9,
  "saved_garden_id": 15,
  "radius": 1.5,
  "x": 164.0,
  "y": 345.0,
  "z": 474.0,
  "name": "untitled",
  "openfarm_slug": "lettuce",
  "created_at": "2020-07-04T00:16:04.422Z",
  "updated_at": "2020-07-04T00:16:04.441Z"
}

POST /api/point_groups

Request

{
  "name": "this is a group",
  "point_ids": [
    54,
    55,
    56
  ]
}

Response

{
  "id": 5,
  "created_at": "2020-07-04T00:16:00.210Z",
  "updated_at": "2020-07-04T00:16:00.210Z",
  "name": "this is a group",
  "point_ids": [
    54,
    55,
    56
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

POST /api/point_groups

Request

{
  "name": "Criteria group",
  "point_ids": [
    57,
    58,
    59
  ],
  "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": 6,
  "created_at": "2020-07-04T00:16:00.265Z",
  "updated_at": "2020-07-04T00:16:00.265Z",
  "name": "Criteria group",
  "point_ids": [
    57,
    58,
    59
  ],
  "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
    },
    "number

GET /api/point_groups

Response

[
  {
    "id": 41,
    "created_at": "2020-07-04T00:16:13.481Z",
    "updated_at": "2020-07-04T00:16:13.481Z",
    "name": "PG test 3",
    "point_ids": [

    ],
    "sort_type": "xy_ascending",
    "criteria": {
      "day": {
        "op": "<",
        "days_ago": 0
      },
      "string_eq": {
      },
      "number_eq": {
      },
      "number_lt": {
      },
      "number_gt": {
      }
    }
  },
  {
    "id": 40,
    "created_at": "2020-07-04T00:16:13.475Z",
    "updated_at": "2020-07

GET /api/point_groups/1

Response

{
  "id": 1,
  "created_at": "2020-07-04T00:15:51.763Z",
  "updated_at": "2020-07-04T00:15:51.763Z",
  "name": "x",
  "point_ids": [

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

GET /api/point_groups/2

Response

{
  "id": 2,
  "created_at": "2020-07-04T00:15:51.802Z",
  "updated_at": "2020-07-04T00:15:51.802Z",
  "name": "PointGroups#show test",
  "point_ids": [

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

PUT /api/point_groups/42

Request

{
  "name": "new name",
  "point_ids": [
    287,
    288,
    289,
    285,
    286
  ]
}

Response

{
  "id": 42,
  "created_at": "2020-07-04T00:16:17.309Z",
  "updated_at": "2020-07-04T00:16:17.341Z",
  "name": "new name",
  "point_ids": [
    289,
    288,
    287,
    286,
    285
  ],
  "sort_type": "xy_ascending",
  "criteria": {
    "day": {
      "op": "<",
      "days_ago": 0
    },
    "string_eq": {
    },
    "number_eq": {
    },
    "number_lt": {
    },
    "number_gt": {
    }
  }
}

PUT /api/point_groups/43

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": 43,
  "created_at": "2020-07-04T00:16:17.356Z",
  "updated_at": "2020-07-04T00:16:17.370Z",
  "name": "XYZ",
  "point_ids": [

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

DELETE /api/point_groups/44

Response

Empty Response

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": 221,
    "created_at": "2020-07-04T00:16:11.578Z",
    "updated_at": "2020-07-04T00:16:11.578Z",
    "device_id": 257,
    "name": "new",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2020-07-04T00:16:11.578Z",
    "radius": 50.0
  },
  {
    "id": 220,
    "created_at": "2020-07-04T00:16:11.575Z",
    "updated_at": "2020-07-04T00:16:11.575Z",
    "device_id": 

GET /api/points

Response

[
  {
    "id": 224,
    "created_at": "2020-07-04T00:16:11.601Z",
    "updated_at": "2020-07-04T00:16:11.601Z",
    "device_id": 258,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 409.0,
    "y": 380.0,
    "z": 489.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 223,
    "created_at": "2020-07-04T00:16:11.597Z",
    "updated_at": "2020-07-04T00:16:11.597Z",
    "device_id": 258,
    "name": "untitled",
    "pointer_type": "Generic

GET /api/points

Response

[
  {
    "id": 227,
    "created_at": "2020-07-04T00:16:11.638Z",
    "updated_at": "2020-07-04T00:16:11.638Z",
    "device_id": 259,
    "name": "Cabbage 2",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 2,
    "y": 2,
    "z": 2,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2020-07-04T00:16:11.638Z",
    "radius": 50.0
  },
  {
    "id": 226,
    "created_at": "2020-07-04T00:16:11.635Z",
    "updated_at": "2020-07-04T00:16:11.635Z",
    "device

GET /api/points

Response

[
  {
    "id": 228,
    "created_at": "2020-07-04T00:16:11.663Z",
    "updated_at": "2020-07-04T00:16:11.663Z",
    "device_id": 260,
    "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, add ?filter=old to the end of the URL.

Request

{
  "filter": "old"
}

Response

[
  {
    "id": 229,
    "created_at": "2020-07-04T00:16:11.683Z",
    "updated_at": "2020-07-04T00:16:11.683Z",
    "device_id": 261,
    "name": "old",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2020-07-04T00:16:11.683Z",
    "radius": 50.0
  }
]

GET /api/points

Response

[
  {
    "id": 231,
    "created_at": "2020-07-04T00:16:11.711Z",
    "updated_at": "2020-07-04T00:16:11.711Z",
    "device_id": 262,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 83.0,
    "y": 514.0,
    "z": 77.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.

Response

[
  {
    "id": 234,
    "created_at": "2020-07-04T00:16:11.760Z",
    "updated_at": "2020-07-04T00:16:11.760Z",
    "device_id": 264,
    "name": "new",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 5,
    "y": 5,
    "z": 5,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2020-07-04T00:16:11.760Z",
    "radius": 50.0
  }
]

POST /api/points

Request

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

Response

{
  "id": 265,
  "created_at": "2020-07-04T00:16:15.106Z",
  "updated_at": "2020-07-04T00:16:15.106Z",
  "device_id": 341,
  "name": "Fooo",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 4.0,
  "y": 5.0,
  "z": 6.0,
  "tool_id": null,
  "pullout_direction": 0,
  "gantry_mounted": false
}

POST /api/points

Request

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

Response

{
  "id": 266,
  "created_at": "2020-07-04T00:16:15.126Z",
  "updated_at": "2020-07-04T00:16:15.126Z",
  "device_id": 342,
  "name": "foo",
  "pointer_type": "ToolSlot",
  "meta": {
  },
  "x": 0.0,
  "y": 0.0,
  "z": 0.0,
  "tool_id": null,
  "pullout_direction": 0,
  "gantry_mounted": false
}

(NOT OK) POST /api/points

Notes: This is what happens when you post bad JSON

Response

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

POST /api/points

Request

{
  "x": 23,
  "y": 45,
  "name": "Put me in a salad",
  "pointer_type": "Plant",
  "openfarm_slug": "mung-bean",
  "planted_at": "\"2020-07-03T00:16:15.176+00:00\"",
  "plant_stage": "sprouted"
}

Response

{
  "id": 268,
  "created_at": "2020-07-03T00:16:15.176Z",
  "updated_at": "2020-07-04T00:16:15.180Z",
  "device_id": 345,
  "name": "Put me in a salad",
  "pointer_type": "Plant",
  "meta": {
  },
  "x": 23,
  "y": 45,
  "z": 0,
  "openfarm_slug": "mung-bean",
  "plant_stage": "sprouted",
  "planted_at": "2020-07-03T00:16:15.176Z",
  "radius": 25.0
}

POST /api/points

Request

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

Response

{
  "id": 269,
  "created_at": "2020-07-04T00:16:15.219Z",
  "updated_at": "2020-07-04T00:16:15.219Z",
  "device_id": 347,
  "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

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

Response

{
  "id": 270,
  "created_at": "2020-07-04T00:16:15.254Z",
  "updated_at": "2020-07-04T00:16:15.254Z",
  "device_id": 349,
  "name": "untitled",
  "pointer_type": "Weed",
  "meta": {
  },
  "x": 23.0,
  "y": 45.0,
  "z": 0.0,
  "radius": 25.0,
  "discarded_at": null,
  "plant_stage": "active"
}

POST /api/points

Request

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

Response

{
  "id": 271,
  "created_at": "2020-07-04T00:16:15.273Z",
  "updated_at": "2020-07-04T00:16:15.273Z",
  "device_id": 350,
  "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

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

Response

{
  "id": 272,
  "created_at": "2020-07-04T00:16:15.292Z",
  "updated_at": "2020-07-04T00:16:15.292Z",
  "device_id": 351,
  "name": "YOLO",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  },
  "x": 1.0,
  "y": 2.0,
  "z": 3.0,
  "radius": 3.0,
  "discarded_at": null
}

PUT /api/points/236

Request

{
  "pullout_direction": 1
}

Response

{
  "id": 236,
  "created_at": "2020-07-04T00:16:12.662Z",
  "updated_at": "2020-07-04T00:16:12.668Z",
  "device_id": 288,
  "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/240

Request

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

Response

{
  "id": 240,
  "created_at": "2020-07-04T00:16:12.706Z",
  "updated_at": "2020-07-04T00:16:12.712Z",
  "device_id": 290,
  "name": "My Lettuce",
  "pointer_type": "Plant",
  "meta": {
  },
  "x": 23,
  "y": 45,
  "z": 0,
  "openfarm_slug": "limestone-lettuce",
  "plant_stage": "planned",
  "planted_at": "2020-07-04T00:16:12.706Z",
  "radius": 1.0
}

PUT /api/points/241

Request

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

Response

{
  "id": 241,
  "created_at": "2020-07-04T00:16:12.721Z",
  "updated_at": "2020-07-04T00:16:12.733Z",
  "device_id": 291,
  "name": "untitled",
  "pointer_type": "GenericPointer",
  "meta": {
    "foo": "BAR"
  },
  "x": 99.0,
  "y": 87.0,
  "z": 33.0,
  "radius": 55.0,
  "discarded_at": null
}

DELETE /api/points/254

Response

[
  {
    "id": 254,
    "created_at": "2020-07-04T00:16:13.696Z",
    "updated_at": "2020-07-04T00:16:13.696Z",
    "device_id": 317,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 10,
    "y": 20,
    "z": 30,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": "2020-07-04T00:16:13.696Z",
    "radius": 1.0
  }
]

DELETE /api/points/255

Response

[
  {
    "id": 255,
    "created_at": "2020-07-04T00:16:13.712Z",
    "updated_at": "2020-07-04T00:16:13.712Z",
    "device_id": 318,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 410.0,
    "y": 402.0,
    "z": 95.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

DELETE /api/points/259,260,261,262,263,264

Response

[
  {
    "id": 259,
    "created_at": "2020-07-04T00:16:13.828Z",
    "updated_at": "2020-07-04T00:16:13.828Z",
    "device_id": 319,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 183.0,
    "y": 229.0,
    "z": 436.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 260,
    "created_at": "2020-07-04T00:16:13.831Z",
    "updated_at": "2020-07-04T00:16:13.831Z",
    "device_id": 319,
    "name": "untitled",
    "pointer_type": "Generic

GET /api/points/293

Response

{
  "id": 293,
  "created_at": "2020-07-04T00:16:20.621Z",
  "updated_at": "2020-07-04T00:16:20.624Z",
  "device_id": 451,
  "name": "untitled",
  "pointer_type": "GenericPointer",
  "meta": {
  },
  "x": 518.0,
  "y": 159.0,
  "z": 218.0,
  "radius": 1.5,
  "discarded_at": "2020-07-04T00:16:20.624Z"
}

GET /api/points/294

Response

{
  "id": 294,
  "created_at": "2020-07-04T00:16:20.640Z",
  "updated_at": "2020-07-04T00:16:20.640Z",
  "device_id": 452,
  "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

{
  "x": 23
}

Response

[
  {
    "id": 2,
    "created_at": "2020-07-04T00:15:52.109Z",
    "updated_at": "2020-07-04T00:15:52.109Z",
    "device_id": 26,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
    },
    "x": 23.0,
    "y": 539.0,
    "z": 85.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

{
  "created_by": "plant-detection"
}

Response

[

]

POST /api/points/search

Request

{
  "openfarm_slug": "tomato"
}

Response

[
  {
    "id": 4,
    "created_at": "2020-07-04T00:15:52.141Z",
    "updated_at": "2020-07-04T00:15:52.141Z",
    "device_id": 28,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 502,
    "y": 17,
    "z": 471,
    "openfarm_slug": "tomato",
    "plant_stage": "planned",
    "planted_at": "2020-07-04T00:15:52.141Z",
    "radius": 1.5
  }
]

POST /api/points/search

Request

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

Response

[
  {
    "id": 7,
    "created_at": "2020-07-04T00:15:52.170Z",
    "updated_at": "2020-07-04T00:15:52.170Z",
    "device_id": 29,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "color": "red",
      "created_by": "plant-detection"
    },
    "x": 125.0,
    "y": 34.0,
    "z": 178.0,
    "radius": 1.5,
    "discarded_at": null
  },
  {
    "id": 6,
    "created_at": "2020-07-04T00:15:52.167Z",
    "updated_at": "2020-07-04T00:15:52.167Z",
    "device_id": 29,

POST /api/points/search

Request

{
  "plant_stage": "harvested"
}

Response

[
  {
    "id": 10,
    "created_at": "2020-07-04T00:15:52.192Z",
    "updated_at": "2020-07-04T00:15:52.192Z",
    "device_id": 30,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 96,
    "y": 111,
    "z": 124,
    "openfarm_slug": "lettuce",
    "plant_stage": "harvested",
    "planted_at": "2020-07-04T00:15:52.192Z",
    "radius": 1.5
  }
]

POST /api/points/search

Request

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

Response

[
  {
    "id": 11,
    "created_at": "2020-07-04T00:15:52.208Z",
    "updated_at": "2020-07-04T00:15:52.208Z",
    "device_id": 31,
    "name": "untitled",
    "pointer_type": "GenericPointer",
    "meta": {
      "foo1": "1"
    },
    "x": 537.0,
    "y": 93.0,
    "z": 159.0,
    "radius": 1.5,
    "discarded_at": null
  }
]

POST /api/points/search

Request

{
  "pointer_type": "Plant"
}

Response

[
  {
    "id": 14,
    "created_at": "2020-07-04T00:15:52.238Z",
    "updated_at": "2020-07-04T00:15:52.238Z",
    "device_id": 32,
    "name": "untitled",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 190,
    "y": 349,
    "z": 509,
    "openfarm_slug": "lettuce",
    "plant_stage": "planned",
    "planted_at": "2020-07-04T00:15:52.238Z",
    "radius": 1.5
  }
]

GET /api/public_key

Response

Empty Response

GET /api/regimens

Response

[

]

GET /api/regimens

Response

[
  {
    "id": 13,
    "created_at": "2020-07-04T00:16:00.672Z",
    "updated_at": "2020-07-04T00:16:00.672Z",
    "name": "3a35783b9523660da49e15c5ef0afe4c",
    "color": null,
    "device_id": 188,
    "body": [

    ],
    "regimen_items": [

    ]
  }
]

POST /api/regimens

Request

{
  "device": {
    "id": 192,
    "name": "Jicama",
    "max_log_count": 1000,
    "max_images_count": 450,
    "timezone": "America/Argentina/Buenos_Aires",
    "last_saw_api": null,
    "last_saw_mq": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2020-07-04T00:16:00.720Z",
    "updated_at": "2020-07-04T00:16:00.720Z",
    "serial_number": "d6083f3ffdb7c708aafb472015e61cc2",
    "mqtt_rate_limit_email_sent

Response

{
  "id": 16,
  "created_at": "2020-07-04T00:16:00.757Z",
  "updated_at": "2020-07-04T00:16:00.783Z",
  "name": "specs",
  "color": "red",
  "device_id": 191,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
            "x": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 8,
      "created_at": "20

POST /api/regimens

Request

{
  "device": {
    "id": 194,
    "name": "Kohlrabi",
    "max_log_count": 1000,
    "max_images_count": 450,
    "timezone": "America/Belem",
    "last_saw_api": null,
    "last_saw_mq": null,
    "fbos_version": null,
    "throttled_until": null,
    "throttled_at": null,
    "mounted_tool_id": null,
    "created_at": "2020-07-04T00:16:00.848Z",
    "updated_at": "2020-07-04T00:16:00.848Z",
    "serial_number": "9afaaa86a490e7a599bebe31795ae3a8",
    "mqtt_rate_limit_email_sent_at": null,
   

Response

{
  "id": 17,
  "created_at": "2020-07-04T00:16:00.893Z",
  "updated_at": "2020-07-04T00:16:00.930Z",
  "name": "specs",
  "color": "red",
  "device_id": 193,
  "body": [
    {
      "kind": "parameter_declaration",
      "args": {
        "label": "parent",
        "default_value": {
          "kind": "coordinate",
          "args": {
            "z": 0,
            "y": 0,
            "x": 0
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 9,
      "created_at": 

POST /api/regimens

Request

{
  "name": "Diglett Machoke Eevee",
  "color": "purple",
  "regimen_items": [
    {
      "time_offset": 123,
      "sequence_id": 66
    }
  ]
}

Response

{
  "id": 18,
  "created_at": "2020-07-04T00:16:00.983Z",
  "updated_at": "2020-07-04T00:16:00.986Z",
  "name": "Diglett Machoke Eevee",
  "color": "purple",
  "device_id": 195,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 10,
      "created_at": "2020-07-04T00:16:00.984Z",
      "updated_at": "2020-07-04T00:16:00.984Z",
      "regimen_id": 18,
      "sequence_id": 66,
      "time_offset": 123
    }
  ]
}

GET /api/regimens/22

Response

{
  "id": 22,
  "created_at": "2020-07-04T00:16:16.418Z",
  "updated_at": "2020-07-04T00:16:16.418Z",
  "name": "e2e8359f8737aacd1c38fcea42a171c2",
  "color": null,
  "device_id": 385,
  "body": [

  ],
  "regimen_items": [

  ]
}

DELETE /api/regimens/26

Response

Empty Response

PUT /api/regimens/3

Request

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

Response

{
  "id": 3,
  "created_at": "2020-07-04T00:15:56.516Z",
  "updated_at": "2020-07-04T00:15:56.552Z",
  "name": "something new",
  "color": "blue",
  "device_id": 121,
  "body": [

  ],
  "regimen_items": [
    {
      "id": 3,
      "created_at": "2020-07-04T00:15:56.547Z",
      "updated_at": "2020-07-04T00:15:56.547Z",
      "regimen_id": 3,
      "sequence_id": 31,
      "time_offset": 1555500000
    },
    {
      "id": 4,
      "created_at": "2020-07-04T00:15:56.548Z",
      "updated_at": "

PUT /api/regimens/5

Request

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

Response

{
  "id": 5,
  "created_at": "2020-07-04T00:15:56.622Z",
  "updated_at": "2020-07-04T00:15:56.736Z",
  "name": "something new",
  "color": "blue",
  "device_id": 123,
  "body": [
    {
      "kind": "parameter_application",
      "args": {
        "label": "parent",
        "data_value": {
          "kind": "tool",
          "args": {
            "tool_id": 18
          }
        }
      }
    }
  ],
  "regimen_items": [
    {
      "id": 6,
      "created_at": "2020-07-04T00:15:56.733Z",
      

POST /api/rmq/resource

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyNDEsImlhdCI6MTU5MzgyMTc3NSwianRpIjoiYjhkM2FkN2UtMjBiZi00OTM5LWIyY2MtYzgzNWMxZDI5YjAwIiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNTk3Mjc3Nzc1LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV8zNTYiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MiLCJvc191cGRhdGVfc2VydmVyIjoiaHR0cDovL2V4YW1wbGUtc2VydmVyLmNvbSIsImJldGFfb3NfdXBkYXRlX3NlcnZlciI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3MvRmFybUJvdC9mYXJtYm

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyNDYsImlhdCI6MTU5MzgyMTc3NSwianRpIjoiY2MyMGUxYTQtNTkwOC00OTVjLWFlNmUtOWUzNTYzYzJlZDA4IiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNTk3Mjc3Nzc1LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV8zNjEiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MiLCJvc191cGRhdGVfc2VydmVyIjoiaHR0cDovL2V4YW1wbGUtc2VydmVyLmNvbSIsImJldGFfb3NfdXBkYXRlX3NlcnZlciI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3MvRmFybUJvdC9mYXJtYm

Response

Empty Response

POST /api/rmq/topic

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyNDgsImlhdCI6MTU5MzgyMTc3NSwianRpIjoiYzA1Y2MzYjQtY2E2Mi00MmE0LTg4MjAtNDE4ZDVlZGY2MWNiIiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNTk3Mjc3Nzc1LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV8zNjMiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MiLCJvc191cGRhdGVfc2VydmVyIjoiaHR0cDovL2V4YW1wbGUtc2VydmVyLmNvbSIsImJldGFfb3NfdXBkYXRlX3NlcnZlciI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3MvRmFybUJvdC9mYXJtYm

Response

Empty Response

POST /api/rmq/topic

Request

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

Response

Empty Response

POST /api/rmq/user

Request

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

Response

Empty Response

POST /api/rmq/user

Request

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

Response

Empty Response

POST /api/rmq/user

Request

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

Response

Empty Response

POST /api/rmq/user

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyNTIsImlhdCI6MTU5MzgyMTc3NiwianRpIjoiOTFhZDFhMWItMWZmNC00NmM1LWJlNTEtZjZlNmViNjEyYzUxIiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNTk3Mjc3Nzc2LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV8zNjciLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MiLCJvc191cGRhdGVfc2VydmVyIjoiaHR0cDovL2V4YW1wbGUtc2VydmVyLmNvbSIsImJldGFfb3NfdXBkYXRlX3NlcnZlciI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3MvRmFybUJvdC9mYXJtYm

Response

Empty Response

POST /api/rmq/vhost

Request

{
  "password": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoyNDAsImlhdCI6MTU5MzgyMTc3NSwianRpIjoiZWMzZWY1YTctM2MzZS00NDgyLWJlMmItNWZmMzBkN2FmNDc3IiwiaXNzIjoiLy8xMC4xMS4xLjIzNTozMDAwIiwiZXhwIjoxNTk3Mjc3Nzc1LCJtcXR0IjoiYmxvb3Blci5pbyIsImJvdCI6ImRldmljZV8zNTUiLCJ2aG9zdCI6Ii8iLCJtcXR0X3dzIjoid3M6Ly9ibG9vcGVyLmlvOjMwMDIvd3MiLCJvc191cGRhdGVfc2VydmVyIjoiaHR0cDovL2V4YW1wbGUtc2VydmVyLmNvbSIsImJldGFfb3NfdXBkYXRlX3NlcnZlciI6Imh0dHBzOi8vYXBpLmdpdGh1Yi5jb20vcmVwb3MvRmFybUJvdC9mYXJtYm

Response

Empty Response

POST /api/saved_gardens

Request

{
  "name": "Beans"
}

Response

{
  "id": 24,
  "name": "Beans",
  "device_id": 393,
  "created_at": "2020-07-04T00:16:16.599Z",
  "updated_at": "2020-07-04T00:16:16.599Z"
}

GET /api/saved_gardens

Response

[
  {
    "id": 27,
    "name": "Pandion",
    "device_id": 394,
    "created_at": "2020-07-04T00:16:16.627Z",
    "updated_at": "2020-07-04T00:16:16.627Z"
  },
  {
    "id": 26,
    "name": "Polyxena",
    "device_id": 394,
    "created_at": "2020-07-04T00:16:16.624Z",
    "updated_at": "2020-07-04T00:16:16.624Z"
  },
  {
    "id": 25,
    "name": "Perseus",
    "device_id": 394,
    "created_at": "2020-07-04T00:16:16.621Z",
    "updated_at": "2020-07-04T00:16:16.621Z"
  }
]

PUT /api/saved_gardens/28

Request

{
  "name": "Asian Greens"
}

Response

{
  "device_id": 395,
  "id": 28,
  "name": "Asian Greens",
  "created_at": "2020-07-04T00:16:16.645Z",
  "updated_at": "2020-07-04T00:16:16.657Z"
}

POST /api/saved_gardens/32/apply

Response

Empty Response

PATCH /api/saved_gardens/33/apply

Response

Empty Response

DELETE /api/saved_gardens/35

Response

Empty Response

POST /api/saved_gardens/snapshot

Response

Empty Response

GET /api/sensor_readings

Request

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

Response

[
  {
    "id": 32,
    "created_at": "2020-07-04T00:16:12.916Z",
    "updated_at": "2020-07-04T00:16:12.916Z",
    "mode": 0,
    "pin": 336,
    "value": 697,
    "x": 124.0,
    "y": 438.0,
    "z": 283.0,
    "read_at": "2020-07-04T00:16:12.916Z"
  },
  {
    "id": 31,
    "created_at": "2020-07-04T00:16:12.914Z",
    "updated_at": "2020-07-04T00:16:12.914Z",
    "mode": 0,
    "pin": 238,
    "value": 70,
    "x": 92.0,
    "y": 169.0,
    "z": 405.0,
    "read_at": "2020-07-04T00:16:12.914

POST /api/sensor_readings

Request

{
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1,
  "z": 2,
  "mode": 1,
  "read_at": "2020-07-03T19:16:13.089+00:00"
}

Response

{
  "id": 40,
  "created_at": "2020-07-04T00:16:13.094Z",
  "updated_at": "2020-07-04T00:16:13.094Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2020-07-03T19:16:13.089Z"
}

POST /api/sensor_readings

Request

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

Response

{
  "id": 41,
  "created_at": "2020-07-04T00:16:13.111Z",
  "updated_at": "2020-07-04T00:16:13.111Z",
  "mode": 1,
  "pin": 13,
  "value": 128,
  "x": null,
  "y": 1.0,
  "z": 2.0,
  "read_at": "2020-07-04T00:16:13.111Z"
}

GET /api/sensor_readings

Response

[
  {
    "id": 42,
    "created_at": "2020-07-04T00:16:13.131Z",
    "updated_at": "2020-07-04T00:16:13.131Z",
    "mode": 0,
    "pin": 385,
    "value": 569,
    "x": 37.0,
    "y": 125.0,
    "z": 104.0,
    "read_at": "2020-07-04T00:16:13.131Z"
  }
]

GET /api/sensor_readings

Response

[
  {
    "id": 43,
    "created_at": "2020-07-04T00:16:13.147Z",
    "updated_at": "2020-07-04T00:16:13.147Z",
    "mode": 0,
    "pin": 293,
    "value": 769,
    "x": 340.0,
    "y": 68.0,
    "z": 110.0,
    "read_at": "2020-07-04T00:16:13.147Z"
  },
  {
    "id": 44,
    "created_at": "2020-07-04T00:15:13.149Z",
    "updated_at": "2020-07-04T00:16:13.150Z",
    "mode": 0,
    "pin": 448,
    "value": 295,
    "x": 104.0,
    "y": 268.0,
    "z": 23.0,
    "read_at": "2020-07-04T00:15:13.149

DELETE /api/sensor_readings/38

Response

Empty Response

GET /api/sensor_readings/39

Response

{
  "id": 39,
  "created_at": "2020-07-04T00:16:13.071Z",
  "updated_at": "2020-07-04T00:16:13.071Z",
  "mode": 0,
  "pin": 374,
  "value": 207,
  "x": 104.0,
  "y": 202.0,
  "z": 222.0,
  "read_at": "2020-07-04T00:16:13.071Z"
}

POST /api/sensors

Request

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

Response

{
  "id": 8,
  "created_at": "2020-07-04T00:16:02.816Z",
  "updated_at": "2020-07-04T00:16:02.816Z",
  "pin": 13,
  "label": "LED",
  "mode": 0
}

GET /api/sensors

Response

[
  {
    "id": 11,
    "created_at": "2020-07-04T00:16:02.871Z",
    "updated_at": "2020-07-04T00:16:02.871Z",
    "pin": 10,
    "label": "MyString",
    "mode": 1
  },
  {
    "id": 10,
    "created_at": "2020-07-04T00:16:02.868Z",
    "updated_at": "2020-07-04T00:16:02.868Z",
    "pin": 9,
    "label": "MyString",
    "mode": 1
  }
]

GET /api/sensors/12

Response

{
  "id": 12,
  "created_at": "2020-07-04T00:16:02.892Z",
  "updated_at": "2020-07-04T00:16:02.892Z",
  "pin": 11,
  "label": "MyString",
  "mode": 1
}

DELETE /api/sensors/13

Response

{
  "id": 13,
  "created_at": "2020-07-04T00:16:02.920Z",
  "updated_at": "2020-07-04T00:16:02.920Z",
  "pin": 12,
  "label": "The old label",
  "mode": 1
}

PUT /api/sensors/9

Request

{
  "label": "The new label"
}

Response

{
  "id": 9,
  "created_at": "2020-07-04T00:16:02.845Z",
  "updated_at": "2020-07-04T00:16:02.852Z",
  "pin": 8,
  "label": "The new label",
  "mode": 1
}

GET /api/sequences

Response

[
  {
    "id": 72,
    "created_at": "2020-07-04T00:16:01.707Z",
    "updated_at": "2020-07-04T00:16:01.716Z",
    "folder_id": null,
    "args": {
      "version": 20180209,
      "locals": {
        "kind": "scope_declaration",
        "args": {
        }
      }
    },
    "color": "red",
    "name": "Secured optimal software",
    "kind": "sequence",
    "body": [

    ]
  },
  {
    "id": 71,
    "created_at": "2020-07-04T00:16:01.692Z",
    "updated_at": "2020-07-04T00:16:01.702Z",
    "f

POST /api/sequences

Request

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

Response

{
  "id": 203,
  "created_at": "2020-07-04T00:16:22.511Z",
  "updated_at": "2020-07-04T00:16:22.511Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 100,
        "offset": {
          "kind": "coordinate",
          "args": {
            "z": 0,
        

POST /api/sequences

Request

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

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

Response

{
  "id": 204,
  "created_at": "2020-07-04T00:16:22.553Z",
  "updated_at": "2020-07-04T00:16:22.553Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [

  ]
}

POST /api/sequences

Request

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

  ]
}

Response

{
  "id": 205,
  "created_at": "2020-07-04T00:16:22.584Z",
  "updated_at": "2020-07-04T00:16:22.584Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [

  ]
}

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "location": {
          "kind": "coordinate",
          "args": {
            "x": 1,
            "y": 2,
            "z": 3
          }
        },
        "offset": {
          "kind": "coordinate",
          "args": {
            "x": 0,
            "y": 0,
            "z": 0
          }
        },
        "speed": 4
      },
      "uuid": "c6de1f2e-beff-4f51-b48d-6c9d7116d9c0"
    },
    {
    

Response

{
  "id": 209,
  "created_at": "2020-07-04T00:16:22.799Z",
  "updated_at": "2020-07-04T00:16:22.799Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 4,
        "offset": {
          "kind": "coordinate",
          "args": {
            "z": 0,
          

POST /api/sequences

Request

{
  "name": "Scare Birds",
  "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": 210,
  "created_at": "2020-07-04T00:16:22.893Z",
  "updated_at": "2020-07-04T00:16:22.893Z",
  "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": "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": 213,
  "created_at": "2020-07-04T00:16:23.013Z",
  "updated_at": "2020-07-04T00:16:23.013Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "gray",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [
    {
      "kind": "move_absolute",
      "args": {
        "speed": 4,
        "offset": {
          "kind": "coordinate",
          "args": {
            "z": 0,
          

GET /api/sequences/155

Response

{
  "id": 155,
  "created_at": "2020-07-04T00:16:14.959Z",
  "updated_at": "2020-07-04T00:16:14.974Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "red",
  "name": "Up-sized tertiary Graphic Interface",
  "kind": "sequence",
  "body": [

  ]
}

PATCH /api/sequences/28

Request

{
  "id": 28,
  "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": 28,
  "created_at": "2020-07-04T00:15:56.309Z",
  "updated_at": "2020-07-04T00:15:56.358Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      },
      "body": [
        {
          "kind": "parameter_declaration",
          "args": {
            "label": "parent",
            "default_value": {
              "kind": "coordinate",
              "args": {
                "z": 9,
                "y": 9,
     

PATCH /api/sequences/30

Request

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

    ]
  }
}

Response

{
  "id": 30,
  "created_at": "2020-07-04T00:15:56.408Z",
  "updated_at": "2020-07-04T00:15:56.459Z",
  "folder_id": null,
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "color": "green",
  "name": "Scare Birds",
  "kind": "sequence",
  "body": [

  ]
}

DELETE /api/sequences/45

Response

Empty Response

DELETE /api/sequences/50

Response

Empty Response

GET /api/storage_auth

Response

{
  "verb": "POST",
  "url": "//10.11.1.235:3000/direct_upload/",
  "form_data": {
    "key": "temp/7c55384d-49fc-4aa7-815a-599ae3a7baa0.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/b64e8d33-6218-43cb-bf8b-1c88097b127e.jpg",
    "acl": "public-read",
    "Content-Type": "image/jpeg",
    "policy": "GCS NOT SETUP!",
    "signature": "GCS NOT SETUP!",
    "GoogleAccessId": "GCS NOT SETUP!",
    "file": "REPLACE_THIS_WITH_A_BINARY_JPEG_FILE"
  },
  "instructions": "Send a 'from-data' request to the URL provided.Then POST the resulting URL as an 'att

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 82,
      "iat": 1593821757,
      "jti": "9bab04db-fb4b-4dc2-838a-d47ed88fac1f",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277757,
      "mqtt": "blooper.io",
      "bot": "device_158",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enco

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 83,
      "iat": 1593821757,
      "jti": "1e186a6a-beb4-4035-937b-9bcd1915625f",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277757,
      "mqtt": "blooper.io",
      "bot": "device_159",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enco

GET /api/tokens

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 84,
      "iat": 1593821759,
      "jti": "82382c10-e8c3-4de0-8e2a-ef67cce565f2",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277757,
      "mqtt": "blooper.io",
      "bot": "device_160",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enco

POST /api/tokens

Request

{
  "user": {
    "email": "tyson@hodkiewicz-larkin.biz",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 211,
      "iat": 1593821774,
      "jti": "c418539f-f9ba-417b-9241-9704fcca11c9",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277774,
      "mqtt": "blooper.io",
      "bot": "device_326",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

POST /api/tokens

Request

{
  "user": {
    "email": "brunilda_shanahan@hills.info",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "bot",
      "sub": 212,
      "iat": 1593821774,
      "jti": "b400cb28-e751-4dbf-8ac1-8bee2de7a144",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277774,
      "mqtt": "blooper.io",
      "bot": "device_327",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "encoded

POST /api/tokens

Request

{
  "user": {
    "email": "dorian@erdman.co",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 214,
      "iat": 1593821774,
      "jti": "95f50710-ccb4-493a-b5dc-f480460ce4c3",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277774,
      "mqtt": "blooper.io",
      "bot": "device_329",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

POST /api/tokens

Request

{
  "user": {
    "email": "zoila@reichert.com",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 215,
      "iat": 1593821774,
      "jti": "c0495f85-3bfb-4c27-96b6-855311a894d2",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277774,
      "mqtt": "blooper.io",
      "bot": "device_330",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

POST /api/tokens

Request

{
  "user": {
    "email": "eddie@greenfelder.info",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "human",
      "sub": 216,
      "iat": 1593821774,
      "jti": "ab3737fa-7e86-4de7-82f3-dd2061e124c6",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277774,
      "mqtt": "blooper.io",
      "bot": "device_331",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "encod

POST /api/tokens

Request

{
  "user": {
    "email": "kelly_parker@boehm-ferry.biz",
    "password": "password"
  }
}

Response

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 217,
      "iat": 1593821774,
      "jti": "b3f32c1c-0197-4811-af95-dc3ed1359fed",
      "iss": "//10.11.1.235:3000",
      "exp": 1597277774,
      "mqtt": "blooper.io",
      "bot": "device_332",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws",
      "os_update_server": "http://example-server.com",
      "beta_os_update_server": "https://api.github.com/repos/FarmBot/farmbot_os/releases/latest"
    },
    "enc

POST /api/tools

Request

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

Response

{
  "id": 7,
  "created_at": "2020-07-04T00:15:52.663Z",
  "updated_at": "2020-07-04T00:15:52.663Z",
  "name": "wow",
  "status": "inactive"
}

GET /api/tools

Response

[
  {
    "id": 26,
    "created_at": "2020-07-04T00:15:57.843Z",
    "updated_at": "2020-07-04T00:15:57.843Z",
    "name": "WeepinbellTangela",
    "status": "active"
  }
]

GET /api/tools/103

Response

{
  "id": 103,
  "created_at": "2020-07-04T00:16:20.669Z",
  "updated_at": "2020-07-04T00:16:20.669Z",
  "name": "WeedleKakuna",
  "status": "active"
}

DELETE /api/tools/11

Response

{
  "id": 11,
  "created_at": "2020-07-04T00:15:55.825Z",
  "updated_at": "2020-07-04T00:15:55.825Z",
  "name": "SandshrewStarmie",
  "status": "inactive"
}

DELETE /api/tools/13

Response

{
  "id": 13,
  "created_at": "2020-07-04T00:15:55.876Z",
  "updated_at": "2020-07-04T00:15:55.876Z",
  "name": "Farfetch'dPrimeape",
  "status": "inactive"
}

PUT /api/tools/39

Request

{
  "name": "Hi!"
}

Response

{
  "id": 39,
  "created_at": "2020-07-04T00:16:01.120Z",
  "updated_at": "2020-07-04T00:16:01.128Z",
  "name": "Hi!",
  "status": "active"
}

DELETE /api/users

Request

{
  "password": "Af7S3rD7t3Ci"
}

Response

{
  "id": null,
  "priority": 0,
  "attempts": 0,
  "handler": "--- !ruby/object:Delayed::PerformableMethod\nobject: !ruby/object:User\n  concise_attributes:\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: encrypted_password\n    value_before_type_cast: \"$2a$04$mWgz0KQQwpZHuUEAhuO6YOtt6dg9Ltohe5ERhSYS5ojQ8sQ75MiEq\"\n  - !ruby/object:ActiveModel::Attribute::FromDatabase\n    name: device_id\n    value_before_type_cast: 265\n  - !ruby/object:ActiveModel::Attribute::FromDatabase

PATCH /api/users

Request

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

Response

{
  "id": 160,
  "created_at": "2020-07-04T00:16:11.802Z",
  "updated_at": "2020-07-04T00:16:11.818Z",
  "name": "Lyndsey Murray",
  "email": "cornelius@langworth.net"
}

PATCH /api/users

Request

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

Response

{
  "id": 161,
  "created_at": "2020-07-04T00:16:11.832Z",
  "updated_at": "2020-07-04T00:16:11.848Z",
  "name": "Ricky McRickerson",
  "email": "zachary@stroman.io"
}

POST /api/users

Request

{
  "password_confirmation": "Password123",
  "password": "Password123",
  "email": "altha@daugherty-borer.com",
  "name": "Frank"
}

Response

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

GET /api/users

Response

[
  {
    "id": 171,
    "created_at": "2020-07-04T00:16:12.025Z",
    "updated_at": "2020-07-04T00:16:12.025Z",
    "name": "Kelley Pacocha",
    "email": "mitzi_heidenreich@powlowski.biz"
  }
]

POST /api/users/control_certificate

Request

{
  "email": "boyd@douglas.org",
  "password": "password456"
}

Response

Empty Response

POST /api/users/resend_verification

Request

{
  "email": "dierdre@wisoky.com"
}

Response

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

GET /api/web_app_config

Response

{
  "id": 16,
  "created_at": "2020-07-04T00:16:14.820Z",
  "updated_at": "2020-07-04T00:16:14.820Z",
  "device_id": 333,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_a

DELETE /api/web_app_config

Response

Empty Response

PUT /api/web_app_config

Request

{
  "device_id": 99
}

Response

{
  "id": 19,
  "created_at": "2020-07-04T00:16:14.876Z",
  "updated_at": "2020-07-04T00:16:14.876Z",
  "device_id": 335,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_a

PUT /api/web_app_config

Request

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

Response

{
  "id": 20,
  "created_at": "2020-07-04T00:16:14.906Z",
  "updated_at": "2020-07-04T00:16:14.913Z",
  "device_id": 336,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_a

PUT /api/web_app_config

Request

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

Response

{
  "id": 21,
  "created_at": "2020-07-04T00:16:14.931Z",
  "updated_at": "2020-07-04T00:16:14.939Z",
  "device_id": 337,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": false,
  "dynamic_map": false,
  "encoder_figure": false,
  "hide_webcam_widget": false,
  "legend_menu_open": true,
  "raw_encoders": false,
  "scaled_encoders": false,
  "show_spread": true,
  "show_farmbot": true,
  "show_plants": true,
  "show_points": true,
  "x_a

GET /api/webcam_feeds

Response

[
  {
    "id": 3,
    "created_at": "2020-07-04T00:15:57.314Z",
    "updated_at": "2020-07-04T00:15:57.314Z",
    "url": "1",
    "name": "feed 1"
  },
  {
    "id": 2,
    "created_at": "2020-07-04T00:15:57.311Z",
    "updated_at": "2020-07-04T00:15:57.311Z",
    "url": "0",
    "name": "feed 0"
  }
]

POST /api/webcam_feeds

Request

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

Response

{
  "id": 15,
  "created_at": "2020-07-04T00:16:19.948Z",
  "updated_at": "2020-07-04T00:16:19.948Z",
  "url": "url1",
  "name": "name1"
}

PATCH /api/webcam_feeds/1

Request

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

Response

{
  "id": 1,
  "created_at": "2020-07-04T00:15:56.063Z",
  "updated_at": "2020-07-04T00:15:56.071Z",
  "url": "/foo.jpg",
  "name": "ok"
}

GET /api/webcam_feeds/14

Response

{
  "id": 14,
  "created_at": "2020-07-04T00:16:12.815Z",
  "updated_at": "2020-07-04T00:16:12.815Z",
  "url": "Url!",
  "name": "Name!"
}

DELETE /api/webcam_feeds/8

Response

Empty Response

GET /app/nope.jpg

Request

{
  "path": "nope.jpg"
}

Response

Empty Response

POST /csp_reports

Response

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

POST /csp_reports.json

Response

{
}

POST /direct_upload

Request

{
  "file": "#<StringIO:0x000055df8533cb28>",
  "key": "whatever/wow.jpg"
}

Response

Empty Response

GET /os

Response

Empty Response

GET /tos_update

Response

Empty Response

GET /verify/3e7044be-594a-4463-852b-0ea75942459e

Request

{
  "token": "3e7044be-594a-4463-852b-0ea75942459e"
}

Response

Empty Response

GET /verify/d1d4966a-3277-4ef9-9c8c-3a4ffa93b7bf

Request

{
  "token": "d1d4966a-3277-4ef9-9c8c-3a4ffa93b7bf"
}

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