The document that follows is a list of example API requests. It serves as a guide for developers who wish to see the schema and existence of particular API endpoints quickly. For a list of resources, see the quick reference table.

Authorization required

To get the authorization token required in these examples (TOKEN), see Authorization.

Making requests

Making requests other than GET to the API will permanently alter the data in your account. Be especially careful making DELETE requests and POST requests to singular resources, like the /device endpoint, as the API will destroy data that cannot be recovered. Altering data through the API may cause account instability.

Tip

If you are unsure about how data should look, create a resource in the Web App and then perform a GET request to inspect the data.

ai

Used for sequence name and description generation and Lua code generation.

Method Description
POST /api/ai Submit an auto-generation request.
Field Type GET GET/:id POST PATCH DELETE
prompt
Instructions for model to follow.
string Β  Β  πŸ“ Β  Β 
context_key
Type of generation request.
β€œtitle” | β€œcolor” | β€œdescription” | β€œlua” Β  Β  πŸ“ Β  Β 
sequence_id
For sequence β€œtitle”, β€œcolor”, and β€œdescription” auto-generation requests, the ID of the sequence to summarize.
integer | null Β  Β  πŸ“ Β  Β 

POST /api/ai

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/ai'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'prompt': 'write code',
    'context_key': 'lua',
    'sequence_id': None,
}
response = requests.post(url, headers=headers, json=payload, stream=True)
for line in response.iter_lines():
    print(line.decode('utf-8'))

output:

```lua
-- Move FarmBot to the home position for all axes
go_to_home("all")
```

ai_feedbacks

Used for Lua code generation.

Method Description
POST /api/ai_feedbacks Submit auto-generation feedback.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer Β  Β  Β  Β  Β 
created_at
Date and time of creation set by the database.
timestamp Β  Β  Β  Β  Β 
updated_at
Date and time of most recent update set by the database.
timestamp Β  Β  Β  Β  Β 
prompt
A copy of the instructions for the auto-generation request.
string Β  Β  πŸ“ Β  Β 
reaction
The feedback for the outcome of the prompt.
β€œgood” | β€œbad” Β  Β  πŸ“ Β  Β 

POST /api/ai_feedbacks

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/ai_feedbacks'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'prompt': 'write code',
    'reaction': 'good',
}
response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_post('ai_feedbacks', {'prompt': 'write code', 'reaction': 'good'})

output:

{
  "id": 1,
  "created_at": "2024-04-10T17:53:37.120Z",
  "updated_at": "2024-04-10T17:53:37.120Z",
  "prompt": "write code",
  "reaction": "good"
}

alerts

Used by the message center.

Method Description
GET /api/alerts Get an array of all alerts.
DELETE /api/alerts/:id Delete a single alert by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
problem_tag
Type of alert.
β€œapi.seed_data.missing” | β€œapi.documentation.unread” | β€œapi.tour.not_taken” | β€œapi.user.not_welcomed” | β€œapi.bulletin.unread” | β€œapi.demo_account.in_use” πŸ“– Β  Β  Β  πŸ—‘
slug
Defaults to random UUID.
string πŸ“– Β  Β  Β  πŸ—‘
priority
Importance for sorting.
integer πŸ“– Β  Β  Β  πŸ—‘

GET /api/alerts

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/alerts'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('alerts')

output:

[
  {
    "id": 1,
    "created_at": 1643843681,
    "updated_at": "2022-02-02T23:14:41.694Z",
    "priority": 100,
    "problem_tag": "api.seed_data.missing",
    "slug": "fc07c4d5-aba0-4782-8c71-e443f88430e9"
  }
]

DELETE /api/alerts/1

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/alerts/1'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.delete(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_delete('alerts', 1)

output:

{
  "id": 1,
  "created_at": 1643843681,
  "updated_at": "2022-02-02T23:14:41.694Z",
  "priority": 100,
  "problem_tag": "api.seed_data.missing",
  "slug": "fc07c4d5-aba0-4782-8c71-e443f88430e9"
}

corpus

Method Description
GET /api/corpus Get the corpus object.
Field Type GET GET/:id POST PATCH DELETE
corpus
Celery Script corpus.
object πŸ“– Β  Β  Β  Β 

GET /api/corpus

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/corpus'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('corpus')

output:

{
  "version": 20180209,
  "enums": [
    {
...

curves

See curves.

Method Description
GET /api/curves Get an array of all curves.
GET /api/curves/:id Get a single curve by id.
POST /api/curves Create a new curve.
PATCH /api/curves/:id Edit a single curve by id.
DELETE /api/curves/:id Delete a single curve by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
name
Curve name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
type
Curve type.
β€œwater” | β€œspread” | β€œheight” πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
data
Curve data.
{[day: string]: value: integer} πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘

POST /api/curves

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/curves'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'name': 'Curve 1',
    'type': 'water',
    'data': {
        '1': 1,
        '100': 100
    }
}
response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_post('curves', {
    'name': 'Curve 1',
    'type': 'water',
    'data': {
        '1': 1,
        '100': 100
    }
})

output:

{
  "id": 1,
  "created_at": "2024-04-10T18:10:42.429Z",
  "updated_at": "2024-04-10T18:10:42.429Z",
  "name": "Curve 1",
  "type": "water",
  "data": {
    "1": 1,
    "100": 100
  }
}

demo_account

Used for demo.farm.bot.

Method Description
POST /api/demo_account Create a new demo account.
Field Type GET GET/:id POST PATCH DELETE
secret
Password.
string Β  Β  πŸ“ Β  Β 
product_line
FarmBot model.
β€œexpress_1.0” | β€œexpress_1.1” | β€œexpress_1.2” | β€œexpress_xl_1.0” | β€œexpress_xl_1.1” | β€œexpress_xl_1.2” | β€œgenesis_1.2” | β€œgenesis_1.3” | β€œgenesis_1.4” | β€œgenesis_1.5” | β€œgenesis_1.6” | β€œgenesis_1.7” | β€œgenesis_xl_1.4” | β€œgenesis_xl_1.5” | β€œgenesis_xl_1.6” | β€œgenesis_xl_1.7” | β€œnone” Β  Β  πŸ“ Β  Β 

POST /api/demo_account

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/demo_account'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'secret': 'password',
    'product_line': 'genesis_1.7',
}
response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_post('demo_account', {
    'secret': 'password',
    'product_line': 'genesis_1.7',
})

output:

{}

device

See FarmBot settings.

Method Description
GET /api/device Get the device object.
PATCH /api/device Edit the device object.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  Β 
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  Β 
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  Β 
fb_order_number
Order number.
string | null πŸ“– Β  Β  πŸ“ Β 
fbos_version
FarmBot OS version.
string πŸ“– Β  Β  Β  Β 
indoor
Is your FarmBot indoors?
boolean πŸ“– Β  Β  πŸ“ Β 
last_saw_api
Datetime of last API visit.
timestamp πŸ“– Β  Β  Β  Β 
lat
Latitude.
float πŸ“– Β  Β  πŸ“ Β 
lng
Longitude.
float πŸ“– Β  Β  πŸ“ Β 
mounted_tool_id
The ID of the tool currently attached to the UTM.
integer πŸ“– Β  Β  πŸ“ Β 
name
FarmBot name.
string πŸ“– Β  Β  πŸ“ Β 
ota_hour
Over-the-air update local time.
0-23 | null πŸ“– Β  Β  πŸ“ Β 
ota_hour_utc
Over-the-air update UTC time.
0-23 | null πŸ“– Β  Β  Β  Β 
rpi
FarmBot computer model.
β€œ3” | β€œ4” | β€œ01” | β€œ02” πŸ“– Β  Β  πŸ“ Β 
serial_number
FarmBot serial number.
string πŸ“– Β  Β  Β  Β 
setup_completed_at
Datetime device setup completed.
timestamp πŸ“– Β  Β  πŸ“ Β 
throttled_at
Datetime device throttle begin.
timestamp πŸ“– Β  Β  Β  Β 
throttled_until
Datetime device throttle end.
timestamp πŸ“– Β  Β  Β  Β 
timezone
Timezone.
string πŸ“– Β  Β  πŸ“ Β 
max_log_age_in_days
Logs deleted after __ days.
integer πŸ“– Β  Β  Β  Β 
max_sequence_count
Maximum number of allowed sequences.
integer πŸ“– Β  Β  Β  Β 
max_sequence_length
Maximum allowed sequence length.
integer πŸ“– Β  Β  Β  Β 
tz_offset_hrs
Hours offset from UTC.
integer πŸ“– Β  Β  Β  Β 

GET /api/device

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/device'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('device')

output:

{
  "id": 29,
  "created_at": "2022-02-02T23:14:15.261Z",
  "updated_at": "2022-02-02T23:14:15.261Z",
  "fb_order_number": null,
  "fbos_version": "17.0.0",
  "indoor": false,
  "last_saw_api": null,
  "lat": null,
  "lng": null,
  "mounted_tool_id": null,
  "name": "Okra",
  "ota_hour_utc": 6,
  "ota_hour": 3,
  "rpi": null,
  "serial_number": "0827898855f3f79e81037a4f3a119b00",
  "setup_completed_at": null,
  "throttled_at": null,
  "throttled_until": null,
  "timezone": "W-SU",
  "max_log_age_in_days": 0,
  "max_sequence_count": 0,
  "max_sequence_length": 0,
  "tz_offset_hrs": 3
}

device/reset

Method Description
POST /api/device/reset Reset the device.
Field Type GET GET/:id POST PATCH DELETE
password
Account password.
string Β  Β  πŸ“
(required)
Β  Β 

device/seed

Method Description
POST /api/device/seed Seed the device with standard resources.
Field Type GET GET/:id POST PATCH DELETE
product_line
FarmBot model.
β€œexpress_1.0” | β€œexpress_1.1” | β€œexpress_1.2” | β€œexpress_xl_1.0” | β€œexpress_xl_1.1” | β€œexpress_xl_1.2” | β€œgenesis_1.2” | β€œgenesis_1.3” | β€œgenesis_1.4” | β€œgenesis_1.5” | β€œgenesis_1.6” | β€œgenesis_1.7” | β€œgenesis_xl_1.4” | β€œgenesis_xl_1.5” | β€œgenesis_xl_1.6” | β€œgenesis_xl_1.7” | β€œnone” Β  Β  πŸ“
(required)
Β  Β 
demo
Seed a demo account.
boolean Β  Β  πŸ“ Β  Β 

device/sync

Method Description
GET /api/device/sync Get the sync object.

export_data

Method Description
POST /api/export_data Request account data export.

POST /api/export_data

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/export_data'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.post(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_post('export_data')

output:

{
  "export_created_at": "2022-02-02T23:14:25.688+00:00",
  "server_url": "//192.168.1.112:3000",
  "database_schema": 20211206165259,
  "tools": [

  ],
  "device": {
    "id": 95,
    "created_at": "2022-02-02T23:14:25.664Z",
    "updated_at": "2022-02-02T23:14:25.664Z",
    "fb_order_number": null,
...

farm_events

See events.

Method Description
GET /api/farm_events Get an array of all farm events.
GET /api/farm_events/:id Get a single farm event by id.
POST /api/farm_events Create a new farm event.
PATCH /api/farm_events/:id Edit a single farm event by id.
DELETE /api/farm_events/:id Delete a single farm event by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
start_time
Date and time to begin the farm event.
timestamp πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
end_time
Date and time to end the farm event.
timestamp πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
repeat
Number of times to repeat the farm event.
integer πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
time_unit
Time period for repeat.
β€œnever” | β€œminutely” | β€œhourly” | β€œdaily” | β€œweekly” | β€œmonthly” | β€œyearly” πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
executable_id
The ID of the sequence or regimen to execute.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
executable_type
The type of resource to execute.
β€œSequence” | β€œRegimen” πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
body
Variable data.
Array πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘

GET /api/farm_events

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/farm_events'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('farm_events')

output:

[
  {
    "id": 24,
    "created_at": "2022-02-02T23:14:47.297Z",
    "updated_at": "2022-02-02T23:14:47.300Z",
    "start_time": "2022-02-03T00:14:12.982Z",
    "end_time": "2022-02-03T00:15:12.982Z",
    "repeat": 1,
    "time_unit": "never",
    "executable_id": 13,
    "executable_type": "Regimen",
    "body": [
      {
        "kind": "parameter_application",
        "args": {
          "label": "variable",
          "data_value": {
            "kind": "tool",
            "args": {
              "tool_id": 235
            }
          }
        }
      }
    ]
  }
]

farmware_envs

See custom settings.

Method Description
GET /api/farmware_envs Get an array of all envs.
GET /api/farmware_envs/:id Get a single env by id.
POST /api/farmware_envs Create a new env.
PATCH /api/farmware_envs/:id Edit a single env by id.
DELETE /api/farmware_envs/:id Delete a single env by id.
DELETE /api/farmware_envs/all Delete all envs.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
key
Environment variable label.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
value
Environment variable value.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘

GET /api/farmware_envs

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/farmware_envs'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('farmware_envs')

output:

[
  {
    "id": 11,
    "device_id": 295,
    "key": "camera",
    "value": "USB",
    "created_at": "2022-02-02T23:14:50.641Z",
    "updated_at": "2022-02-02T23:14:50.641Z"
  }
]

fbos_config

See FarmBot settings.

Method Description
GET /api/fbos_config Get the FarmBot OS configuration object.
PATCH /api/fbos_config Edit the FarmBot OS configuration object.
DELETE /api/fbos_config Delete the FarmBot OS configuration object.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
disable_factory_reset
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
firmware_input_log
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
firmware_output_log
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
sequence_body_log
Send a log message for each sequence step executed.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
sequence_complete_log
Send a log message upon the end of sequence execution.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
sequence_init_log
Send a log message upon the start of sequence execution.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
network_not_found_timer
Unused.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
firmware_hardware
Firmware installed on the Farmduino or microcontroller.
β€œarduino” | β€œfarmduino” | β€œfarmduino_k14” | β€œfarmduino_k15” | β€œfarmduino_k16” | β€œfarmduino_k17” | β€œexpress_k10” | β€œexpress_k11” | β€œexpress_k12” πŸ“– Β  Β  πŸ“ πŸ—‘
os_auto_update
Automatically download and install FarmBot OS over-the-air (OTA) updates.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
arduino_debug_messages
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
firmware_path
FarmBot OS system path to the microcontroller.
β€œttyUSB0” | β€œttyACM0” | β€œttyAMA0” | string πŸ“– Β  Β  πŸ“ πŸ—‘
firmware_debug_log
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
update_channel
FarmBot OS OTA update channel.
β€œstable” | β€œbeta” | β€œalpha” πŸ“– Β  Β  πŸ“ πŸ—‘
boot_sequence_id
ID of sequence to run upon boot-up.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
safe_height
Z axis coordinate (millimeters) to which the z axis should be retracted during Safe Z moves.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
soil_height
Z axis coordinate (millimeters) of soil level. This value will only be used if there are no soil height measurements available.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
gantry_height
The distance in millimeters between the bottom of FarmBot’s tool head and the bottom of the gantry main beam when the Z-axis is fully raised.
integer πŸ“– Β  Β  πŸ“ πŸ—‘

GET /api/fbos_config

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/fbos_config'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('fbos_config')

output:

{
  "id": 43,
  "created_at": "2022-02-02T23:15:36.629Z",
  "updated_at": "2022-02-02T23:15:36.629Z",
  "device_id": 447,
  "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,
  "update_channel": "stable",
  "boot_sequence_id": null,
  "safe_height": 0,
  "soil_height": 0,
  "gantry_height": 0
}

featured_sequences

See featured sequences list and docs.

Method Description
GET /api/featured_sequences Get an array of all featured sequences.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  Β 
path
Relative link to shared sequence page in the app.
string πŸ“– Β  Β  Β  Β 
name
Sequence name.
string πŸ“– Β  Β  Β  Β 
description
Sequence description.
string πŸ“– Β  Β  Β  Β 
color
Sequence color.
string πŸ“– Β  Β  Β  Β 

GET /api/featured_sequences

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/featured_sequences'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('featured_sequences')

output:

[
  {
    "id": 15,
    "path": "/app/shared/sequence/15",
    "name": "Down-sized intangible moratorium",
    "description": "foo,bar,baz",
    "color": "red"
  }
]

feedback

Used by help and the setup wizard.

Method Description
POST /api/feedback Submit feedback.
Field Type GET GET/:id POST PATCH DELETE
message
Feedback content.
string Β  Β  πŸ“ Β  Β 
slug
Source of feedback.
string Β  Β  πŸ“ Β  Β 

POST /api/feedback

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/feedback'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'message': 'feedback',
    'slug': 'intro',
}
response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_post('feedback', {
    'message': 'feedback',
    'slug': 'intro',
})

output:

{}

firmware_config

Used by settings.

Method Description
GET /api/firmware_config Get the firmware config object.
PATCH /api/firmware_config Edit the firmware configuration object.
DELETE /api/firmware_config Delete the firmware configuration object.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
encoder_enabled_x
Enable encoders or stall detection for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_enabled_y
Enable encoders or stall detection for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_enabled_z
Enable encoders or stall detection for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_invert_x
Invert the encoders on the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_invert_y
Invert the encoders on the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_invert_z
Invert the encoders on the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_missed_steps_decay_x
Reduction to missed step total for every good step for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_missed_steps_decay_y
Reduction to missed step total for every good step for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_missed_steps_decay_z
Reduction to missed step total for every good step for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_missed_steps_max_x
Number of steps before the motor is considered to have stalled for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_missed_steps_max_y
Number of steps before the motor is considered to have stalled for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_missed_steps_max_z
Number of steps before the motor is considered to have stalled for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_scaling_x
10000 * (motor resolution) / (encoder resolution).
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_scaling_y
10000 * (motor resolution) / (encoder resolution).
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_scaling_z
10000 * (motor resolution) / (encoder resolution).
integer πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_type_x
.Unused
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_type_y
.Unused
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_type_z
.Unused
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_use_for_pos_x
.Use the encoders for calculating movements on the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_use_for_pos_y
.Use the encoders for calculating movements on the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_use_for_pos_z
.Use the encoders for calculating movements on the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_axis_nr_steps_x
X axis length in steps.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_axis_nr_steps_y
Y axis length in steps.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_axis_nr_steps_z
Z axis length in steps.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_enable_endpoints_x
Enable endstops for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_enable_endpoints_y
Enable endstops for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_enable_endpoints_z
Enable endstops for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_at_boot_x
Find home upon startup for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_at_boot_y
Find home upon startup for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_at_boot_z
Find home upon startup for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_spd_x
X axis homing speed in steps per second.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_spd_y
Y axis homing speed in steps per second.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_spd_z
Z axis homing speed in steps per second.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_up_x
Restrict travel to negative coordinate locations for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_up_y
Restrict travel to negative coordinate locations for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_home_up_z
Restrict travel to negative coordinate locations for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_endpoints_x
Swap the min and max limit switches for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_endpoints_y
Swap the min and max limit switches for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_endpoints_z
Swap the min and max limit switches for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_motor_x
Invert motor direction for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_motor_y
Invert motor direction for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_motor_z
Invert motor direction for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_keep_active_x
Always power motors on the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_keep_active_y
Always power motors on the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_keep_active_z
Always power motors on the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_max_spd_x
Max speed in steps per second for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_max_spd_y
Max speed in steps per second for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_max_spd_z
Max speed in steps per second for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_min_spd_x
Minimum speed in steps per second for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_min_spd_y
Minimum speed in steps per second for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_min_spd_z
Minimum speed in steps per second for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_secondary_motor_invert_x
Invert the direction of the 2nd x axis motor.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_secondary_motor_x
Enable the 2nd x axis motor.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_step_per_mm_x
Number of steps per millimeter on the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_step_per_mm_y
Number of steps per millimeter on the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_step_per_mm_z
Number of steps per millimeter on the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_steps_acc_dec_x
Number of steps used to accelerate for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_steps_acc_dec_y
Number of steps used to accelerate for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_steps_acc_dec_z
Number of steps used to accelerate for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stop_at_home_x
Enable stop at home for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stop_at_home_y
Enable stop at home for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stop_at_home_z
Enable stop at home for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stop_at_max_x
Enable stop at max for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stop_at_max_y
Enable stop at max for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stop_at_max_z
Enable stop at max for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_timeout_x
Amount of time to wait for a command to execute before stopping in seconds for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_timeout_y
Amount of time to wait for a command to execute before stopping in seconds for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_timeout_z
Amount of time to wait for a command to execute before stopping in seconds for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
param_config_ok
Unused.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
param_e_stop_on_mov_err
E-Stop upon movement error.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
param_mov_nr_retry
Number of times to retry a movement.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
param_test
Unused.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
param_use_eeprom
Unused.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
param_version
Unused.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_1_active_state
Pin guard 1 active state.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_1_pin_nr
Pin guard 1 pin number.
0-69 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_1_time_out
Pin guard 1 number of seconds before turning the pin to the inactive state.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_2_active_state
Pin guard 2 active state.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_2_pin_nr
Pin guard 2 pin number.
0-69 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_2_time_out
Pin guard 2 number of seconds before turning the pin to the inactive state.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_3_active_state
Pin guard 3 active state.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_3_pin_nr
Pin guard 3 pin number.
0-69 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_3_time_out
Pin guard 3 number of seconds before turning the pin to the inactive state.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_4_active_state
Pin guard 4 active state.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_4_pin_nr
Pin guard 4 pin number.
0-69 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_4_time_out
Pin guard 4 number of seconds before turning the pin to the inactive state.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_5_active_state
Pin guard 5 active state.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_5_pin_nr
Pin guard 5 pin number.
0-69 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_guard_5_time_out
Pin guard 5 number of seconds before turning the pin to the inactive state.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_2_endpoints_x
Enable for normally closed (NC), disable for normally open (NO).
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_2_endpoints_y
Enable for normally closed (NC), disable for normally open (NO).
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_invert_2_endpoints_z
Enable for normally closed (NC), disable for normally open (NO).
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_microsteps_x
Number of microsteps per step on the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_microsteps_y
Number of microsteps per step on the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_microsteps_z
Number of microsteps per step on the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_motor_current_x
Motor current on the x axis.
0-1823 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_motor_current_y
Motor current on the y axis.
0-1823 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_motor_current_z
Motor current on the z axis.
0-1823 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stall_sensitivity_x
Stall sensitivity on the x axis. Lower is more sensitive.
-63-63 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stall_sensitivity_y
Stall sensitivity on the y axis. Lower is more sensitive.
-63-63 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_stall_sensitivity_z
Stall sensitivity on the z axis. Lower is more sensitive.
-63-63 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_min_spd_z2
Min speed in steps per second for z axis movements towards home.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_max_spd_z2
Maximum speed in steps per second for z axis movements towards home.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_steps_acc_dec_z2
Number of steps used for acceleration for z axis movements towards home.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_retry_x
Number of times to retry calibration for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_retry_y
Number of times to retry calibration for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_retry_z
Number of times to retry calibration for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_deadzone_x
Distance in steps to group calibration retries for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_deadzone_y
Distance in steps to group calibration retries for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_deadzone_z
Distance in steps to group calibration retries for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_axis_stealth_x
Enable quiet mode for the x axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_axis_stealth_y
Enable quiet mode for the y axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_axis_stealth_z
Enable quiet mode for the z axis.
0 | 1 πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_retry_total_x
Total number of times to retry calibration for the x axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_retry_total_y
Total number of times to retry calibration for the y axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
movement_calibration_retry_total_z
Total number of times to retry calibration for the z axis.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
pin_report_1_pin_nr
Report values of the pin periodically.
0-69 πŸ“– Β  Β  πŸ“ πŸ—‘
pin_report_2_pin_nr
Report values of the pin periodically.
0-69 πŸ“– Β  Β  πŸ“ πŸ—‘

GET /api/firmware_config

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/firmware_config'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('firmware_config')

output:

{
  "id": 7,
  "created_at": "2022-02-02T23:14:50.199Z",
  "updated_at": "2022-02-02T23:14:50.199Z",
  "device_id": 287,
  "encoder_enabled_x": 1,
  "encoder_enabled_y": 1,
  "encoder_enabled_z": 1,
  "encoder_invert_x": 0,
  "encoder_invert_y": 0,
  "encoder_invert_z": 0,
  "encoder_missed_steps_decay_x": 5,
  "encoder_missed_steps_decay_y": 5,
  "encoder_missed_steps_decay_z": 5,
  "encoder_missed_steps_max_x": 5,
  "encoder_missed_steps_max_y": 5,
  "encoder_missed_steps_max_z": 5,
  "encoder_scaling_x": 5556,
  "encoder_scaling_y": 5556,
  "encoder_scaling_z": 5556,
  "encoder_type_x": 0,
  "encoder_type_y": 0,
  "encoder_type_z": 0,
  "encoder_use_for_pos_x": 0,
  "encoder_use_for_pos_y": 0,
  "encoder_use_for_pos_z": 0,
  "movement_axis_nr_steps_x": 0,
  "movement_axis_nr_steps_y": 0,
  "movement_axis_nr_steps_z": 0,
  "movement_enable_endpoints_x": 0,
  "movement_enable_endpoints_y": 0,
  "movement_enable_endpoints_z": 0,
  "movement_home_at_boot_x": 0,
  "movement_home_at_boot_y": 0,
  "movement_home_at_boot_z": 0,
  "movement_home_spd_x": 400,
  "movement_home_spd_y": 400,
  "movement_home_spd_z": 400,
  "movement_home_up_x": 0,
  "movement_home_up_y": 0,
  "movement_home_up_z": 1,
  "movement_invert_endpoints_x": 0,
  "movement_invert_endpoints_y": 0,
  "movement_invert_endpoints_z": 0,
  "movement_invert_motor_x": 0,
  "movement_invert_motor_y": 0,
  "movement_invert_motor_z": 0,
  "movement_keep_active_x": 0,
  "movement_keep_active_y": 0,
  "movement_keep_active_z": 1,
  "movement_max_spd_x": 400,
  "movement_max_spd_y": 400,
  "movement_max_spd_z": 400,
  "movement_min_spd_x": 50,
  "movement_min_spd_y": 50,
  "movement_min_spd_z": 50,
  "movement_secondary_motor_invert_x": 1,
  "movement_secondary_motor_x": 1,
  "movement_step_per_mm_x": 5.0,
  "movement_step_per_mm_y": 5.0,
  "movement_step_per_mm_z": 25.0,
  "movement_steps_acc_dec_x": 300,
  "movement_steps_acc_dec_y": 300,
  "movement_steps_acc_dec_z": 300,
  "movement_stop_at_home_x": 1,
  "movement_stop_at_home_y": 1,
  "movement_stop_at_home_z": 1,
  "movement_stop_at_max_x": 1,
  "movement_stop_at_max_y": 1,
  "movement_stop_at_max_z": 1,
  "movement_timeout_x": 180,
  "movement_timeout_y": 180,
  "movement_timeout_z": 180,
  "param_config_ok": 0,
  "param_e_stop_on_mov_err": 0,
  "param_mov_nr_retry": 3,
  "param_test": 0,
  "param_use_eeprom": 1,
  "param_version": 1,
  "pin_guard_1_active_state": 1,
  "pin_guard_1_pin_nr": 0,
  "pin_guard_1_time_out": 60,
  "pin_guard_2_active_state": 1,
  "pin_guard_2_pin_nr": 0,
  "pin_guard_2_time_out": 60,
  "pin_guard_3_active_state": 1,
  "pin_guard_3_pin_nr": 0,
  "pin_guard_3_time_out": 60,
  "pin_guard_4_active_state": 1,
  "pin_guard_4_pin_nr": 0,
  "pin_guard_4_time_out": 60,
  "pin_guard_5_active_state": 1,
  "pin_guard_5_pin_nr": 0,
  "pin_guard_5_time_out": 60,
  "movement_invert_2_endpoints_x": 0,
  "movement_invert_2_endpoints_y": 0,
  "movement_invert_2_endpoints_z": 0,
  "movement_microsteps_x": 1,
  "movement_microsteps_y": 1,
  "movement_microsteps_z": 1,
  "movement_motor_current_x": 1823,
  "movement_motor_current_y": 1823,
  "movement_motor_current_z": 1823,
  "movement_stall_sensitivity_x": 63,
  "movement_stall_sensitivity_y": 63,
  "movement_stall_sensitivity_z": 63,
  "movement_min_spd_z2": 50,
  "movement_max_spd_z2": 400,
  "movement_steps_acc_dec_z2": 300,
  "movement_calibration_retry_x": 1,
  "movement_calibration_retry_y": 1,
  "movement_calibration_retry_z": 1,
  "movement_calibration_deadzone_x": 50,
  "movement_calibration_deadzone_y": 50,
  "movement_calibration_deadzone_z": 250,
  "movement_axis_stealth_x": 1,
  "movement_axis_stealth_y": 1,
  "movement_axis_stealth_z": 1,
  "movement_calibration_retry_total_x": 10,
  "movement_calibration_retry_total_y": 10,
  "movement_calibration_retry_total_z": 10,
  "pin_report_1_pin_nr": 0,
  "pin_report_2_pin_nr": 0
}

folders

Used by sequences.

Method Description
GET /api/folders Get an array of all folders.
GET /api/folders/:id Get a single folder by id.
POST /api/folders Create a new folder.
PATCH /api/folders/:id Edit a single folder by id.
DELETE /api/folders/:id Delete a single folder by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
parent_id
ID of the parent folder, if any.
integer | null πŸ“– πŸ“– πŸ“ πŸ“
(required)
πŸ—‘
name
Folder name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
color
Folder color.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘

GET /api/folders

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/folders'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('folders')

output:

[
  {
    "id": 18,
    "created_at": "2022-02-02T23:15:35.665Z",
    "updated_at": "2022-02-02T23:15:35.665Z",
    "parent_id": null,
    "color": "red",
    "name": "parent"
  }
]

global_bulletins

Used by the message center. To create a bulletin, see posting to the message center.

Method Description
GET /api/global_bulletins/:slug Get a single bulletin by slug.
Field Type GET GET/:slug POST PATCH DELETE
id
Unique identifier set by the database.
integer Β  πŸ“– Β  Β  Β 
created_at
Date and time of creation set by the database.
timestamp Β  πŸ“– Β  Β  Β 
updated_at
Date and time of most recent update set by the database.
timestamp Β  πŸ“– Β  Β  Β 
href
Link.
string Β  πŸ“– Β  Β  Β 
href_label
Label for link button.
string Β  πŸ“– Β  Β  Β 
slug
UUID.
string Β  πŸ“– Β  Β  Β 
title
Bulletin title.
string Β  πŸ“– Β  Β  Β 
type
Bulletin type.
β€œinfo” | β€œsuccess” | β€œwarn” Β  πŸ“– Β  Β  Β 
content
Bulletin content.
string Β  πŸ“– Β  Β  Β 

GET /api/global_bulletins/:slug

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/global_bulletins/Okra'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('global_bulletins/Okra')

output:

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

global_config

Method Description
GET /api/global_config Get the global config object.
Field Type GET GET/:id POST PATCH DELETE
FBOS_END_OF_LIFE_VERSION
FarmBot OS version to give end-of-life warning.
string πŸ“– Β  Β  Β  Β 
MINIMUM_FBOS_VERSION
Oldest FarmBot OS version allowed to connect.
string πŸ“– Β  Β  Β  Β 
TOS_URL
Terms of service URL.
string πŸ“– Β  Β  Β  Β 
PRIV_URL
Privacy policy URL.
string πŸ“– Β  Β  Β  Β 
NODE_ENV
Node environment.
β€œdevelopment” | β€œproduction” | β€œtest” πŸ“– Β  Β  Β  Β 
LONG_REVISION
Hash of the current Web App GitHub commit.
string πŸ“– Β  Β  Β  Β 
SHORT_REVISION
First 8 characters of the current Web App GitHub commit hash.
string πŸ“– Β  Β  Β  Β 
MQTT_WS
MQTT websocket URL.
string πŸ“– Β  Β  Β  Β 
any
Any config set by the server.
string πŸ“– Β  Β  Β  Β 

GET /api/global_config

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/global_config'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('global_config')

output:

{
  "FBOS_END_OF_LIFE_VERSION": "14.6.0",
  "MINIMUM_FBOS_VERSION": "14.6.0",
  "TOS_URL": "",
  "PRIV_URL": "",
  "NODE_ENV": "production",
  "LONG_REVISION": "c4d419354435be1938a45294666ff8eb5bc61b27",
  "SHORT_REVISION": "c4d41935",
  "MQTT_WS": "wss://abc-def.rmq.cloudamqp.com:443/ws/mqtt",
  "SOME_OTHER_CONFIG": "value"
}

images

Used for photos.

Method Description
GET /api/images Get an array of all images.
GET /api/images/:id Get a single image by id.
POST /api/images Create a new image.
DELETE /api/images/:id Delete a single image by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
attachment_processed_at
Date and time when image was processed.
timestamp πŸ“– πŸ“– πŸ“ Β  πŸ—‘
attachment_url
Image URL.
string πŸ“– πŸ“– πŸ“
(required)
Β  πŸ—‘
meta
Image info.
{name: string, x: float, y: float, z: float} πŸ“– πŸ“– πŸ“ Β  πŸ—‘

GET /api/images

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/images'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('images')

output:

[
  {
    "id": 10,
    "created_at": "2022-02-02T23:15:48.541Z",
    "updated_at": "2022-02-02T23:15:48.541Z",
    "device_id": 570,
    "attachment_processed_at": null,
    "attachment_url": "http://192.168.1.112:3000/placeholder_farmbot.jpg?text=Processing...",
    "meta": {
      "x": 1,
      "y": 2,
      "z": 3
    }
  }
]

logs

Used for logs.

Method Description
GET /api/logs Get an array of all logs.
POST /api/logs Create a new log.
DELETE /api/logs/:id Delete a single log by id.
DELETE /api/logs/all Delete all logs.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
channels
Array of transmission channels.
(β€œticker” | β€œtoast” | β€œemail” | β€œespeak”)[] πŸ“– Β  πŸ“ Β  πŸ—‘
message
Log message.
string πŸ“– Β  πŸ“
(required)
Β  πŸ—‘
meta
Unused.
null πŸ“– Β  πŸ“ Β  πŸ—‘
major_version
FarmBot OS major version.
string πŸ“– Β  πŸ“ Β  πŸ—‘
minor_version
FarmBot OS minor version.
string πŸ“– Β  πŸ“ Β  πŸ—‘
patch_version
FarmBot OS patch version.
string πŸ“– Β  πŸ“ Β  πŸ—‘
type
Log type.
β€œassertion” | β€œbusy” | β€œdebug” | β€œerror” | β€œfun” | β€œinfo” | β€œsuccess” | β€œwarn” πŸ“– Β  πŸ“ Β  πŸ—‘
verbosity
Log level.
0-3 πŸ“– Β  πŸ“ Β  πŸ—‘
x
x coordinate at time of log.
float πŸ“– Β  πŸ“ Β  πŸ—‘
y
y coordinate at time of log.
float πŸ“– Β  πŸ“ Β  πŸ—‘
z
z coordinate at time of log.
float πŸ“– Β  πŸ“ Β  πŸ—‘

GET /api/logs

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/logs'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('logs')

output:

[
  {
    "id": 13,
    "created_at": 1643843034,
    "updated_at": "2022-02-02T23:14:54.423Z",
    "channels": [
      "toast"
    ],
    "message": "extend global convergence",
    "meta": null,
    "major_version": null,
    "minor_version": null,
    "patch_version": null,
    "type": "success",
    "verbosity": 1,
    "x": -458.0,
    "y": -12.0,
    "z": 765.0
  }
]

POST /api/logs

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/logs'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'message': 'Hello World!',
    'type': 'success',
    'channels': ['toast'],
}
response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_post('logs', {
  'message': 'Hello World!',
  'type': 'success',
  'channels': ['toast'],
})

output:

{
  "id": 1234567,
  "created_at": 1643843034,
  "updated_at": "2022-02-02T23:14:54.423Z",
  "channels": [
    "toast"
  ],
  "message": "Hello World!",
  "meta": null,
  "major_version": null,
  "minor_version": null,
  "patch_version": null,
  "type": "success",
  "verbosity": 1,
  "x": null,
  "y": null,
  "z": null
}

logs/search

Method Description
GET /api/logs/search Get a list of filtered logs.
Field Type GET GET/:id POST PATCH DELETE
message
Log message.
string πŸ“ Β  Β  Β  Β 
type
Log type.
β€œassertion” | β€œbusy” | β€œdebug” | β€œerror” | β€œfun” | β€œinfo” | β€œsuccess” | β€œwarn” πŸ“ Β  Β  Β  Β 
verbosity
Log level.
0-3 πŸ“ Β  Β  Β  Β 
x
x coordinate at time of log.
float πŸ“ Β  Β  Β  Β 
y
y coordinate at time of log.
float πŸ“ Β  Β  Β  Β 
z
z coordinate at time of log.
float πŸ“ Β  Β  Β  Β 

password_resets

request

Method Description
POST /api/password_resets Request a password reset.
Field Type GET GET/:id POST PATCH DELETE
email
Account email address.
string Β  Β  πŸ“
(required)
Β  Β 

change

Method Description
PATCH /api/password_resets Change the account password.
Field Type GET GET/:id POST PATCH DELETE
password
New account password.
string Β  Β  Β  πŸ“
(required)
Β 
password_confirmation
New account password.
string Β  Β  Β  πŸ“
(required)
Β 
id
Token.
string Β  Β  Β  πŸ“
(required)
Β 

peripherals

Used by peripherals.

Method Description
GET /api/peripherals Get an array of all peripherals.
GET /api/peripherals/:id Get a single peripheral by id.
POST /api/peripherals Create a new peripheral.
PATCH /api/peripherals/:id Edit a single peripheral by id.
DELETE /api/peripherals/:id Delete a single peripheral by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
pin
Pin number.
integer πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
label
Peripheral name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
mode
Pin mode.
0-1 πŸ“– πŸ“– Β  πŸ“ πŸ—‘

GET /api/peripherals

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/peripherals'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('peripherals')

output:

[
  {
    "id": 1,
    "created_at": "2022-02-02T23:14:14.106Z",
    "updated_at": "2022-02-02T23:14:14.106Z",
    "pin": 1,
    "label": "MyString",
    "mode": 0
  },
  {
    "id": 2,
    "created_at": "2022-02-02T23:14:14.118Z",
    "updated_at": "2022-02-02T23:14:14.118Z",
    "pin": 2,
    "label": "MyString",
    "mode": 0
  }
]

pin_bindings

Used by push buttons.

Method Description
GET /api/pin_bindings Get an array of all pin bindings.
GET /api/pin_bindings/:id Get a single pin binding by id.
POST /api/pin_bindings Create a new pin binding.
PATCH /api/pin_bindings/:id Edit a single pin binding by id.
DELETE /api/pin_bindings/:id Delete a single pin binding by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
sequence_id
ID of sequence to execute.
integer | null πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
special_action
Action to perform.
β€œemergency_lock” | β€œemergency_unlock” | β€œpower_off” | β€œread_status” | β€œreboot” | β€œsync” | β€œtake_photo” | null πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
pin_num
Button pin number.
integer πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
binding_type
β€œstandard”: execute a sequence, β€œspecial”: perform an action.
β€œstandard” | β€œspecial” πŸ“– πŸ“– Β  Β  Β 

GET /api/pin_bindings

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/pin_bindings'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('pin_bindings')

output:

[
  {
    "id": 46,
    "created_at": "2022-02-02T23:15:50.154Z",
    "updated_at": "2022-02-02T23:15:50.154Z",
    "device_id": 589,
    "sequence_id": 1,
    "special_action": null,
    "pin_num": 16,
    "binding_type": "standard"
  },
  {
    "id": 47,
    "created_at": "2022-02-02T23:15:50.169Z",
    "updated_at": "2022-02-02T23:15:50.169Z",
    "device_id": 589,
    "sequence_id": null,
    "special_action": "sync",
    "pin_num": 1,
    "binding_type": "special"
  }
]

plant_templates

Used by gardens.

Method Description
GET /api/plant_templates Get an array of all plant templates.
POST /api/plant_templates Create a new plant template.
PATCH /api/plant_templates/:id Edit a single plant template by id.
DELETE /api/plant_templates/:id Delete a single plant template by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
saved_garden_id
ID of the saved garden to which the plant belongs.
integer πŸ“– Β  πŸ“
(required)
πŸ“ πŸ—‘
radius
Size of the plant.
float πŸ“– Β  πŸ“ πŸ“ πŸ—‘
x
x coordinate.
float πŸ“– Β  πŸ“
(required)
πŸ“ πŸ—‘
y
y coordinate.
float πŸ“– Β  πŸ“
(required)
πŸ“ πŸ—‘
z
z coordinate.
float πŸ“– Β  πŸ“ πŸ“ πŸ—‘
name
Plant name.
string πŸ“– Β  πŸ“ πŸ“ πŸ—‘
openfarm_slug
Plant type (from OpenFarm).
string πŸ“– Β  πŸ“ πŸ“ πŸ—‘

GET /api/plant_templates

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/plant_templates'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('plant_templates')

output:

[
  {
    "id": 7,
    "saved_garden_id": 7,
    "device_id": 160,
    "radius": 1.5,
    "x": 206.0,
    "y": 426.0,
    "z": 23.0,
    "name": "untitled",
    "openfarm_slug": "lettuce",
    "created_at": "2022-02-02T23:14:34.382Z",
    "updated_at": "2022-02-02T23:14:34.382Z"
  }
]

point_groups

Used by groups.

Method Description
GET /api/point_groups Get an array of all point groups.
GET /api/point_groups/:id Get a single point group by id.
POST /api/point_groups Create a new point group.
PATCH /api/point_groups/:id Edit a single point group by id.
DELETE /api/point_groups/:id Delete a single point group by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
name
Group name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
point_ids
Array of manually included point IDs.
integer[] πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
sort_type
Sort type. See point group sorting.
β€œxy_ascending” | β€œxy_descending” | β€œyx_ascending” | β€œyx_descending” | β€œxy_alternating” | β€œyx_alternating” | β€œnn” | β€œrandom” πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
criteria
Point group criteria for automatic point inclusion.
See below and groups. πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘

GET /api/point_groups

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/point_groups'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('point_groups')

output:

[
  {
    "id": 15,
    "created_at": "2022-02-02T23:14:32.520Z",
    "updated_at": "2022-02-02T23:14:32.520Z",
    "name": "PG test 0",
    "point_ids": [
      76,
      77,
      78
    ],
    "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_gt": {
        "x": 1,
        "y": 1
      }
    }
  }
]

points

Used by plants, points, weeds, and tool slots, where the field pointer_type determines the resource.

Notes:

  • Soft deleted points will be destroyed without warning when the device hits 800 points.
  • New points cannot be created once the device hits 1000 points.
Method Description
GET /api/points Get an array of all points.
GET /api/points/:id Get a single point by id.
POST /api/points Create a new point.
PATCH /api/points/:id Edit a single point by id.
DELETE /api/points/:id Delete a single point by id.
Field Type GET GET/:id POST PATCH DELETE plant point weed tool slot
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘ βœ… βœ… βœ… βœ…
device_id
Unique device identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘ βœ… βœ… βœ… βœ…
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘ βœ… βœ… βœ… βœ…
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘ βœ… βœ… βœ… βœ…
name
Point name.
string πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… βœ… βœ… βœ…
pointer_type
Point type.
β€œGenericPointer” | β€œPlant” | β€œToolSlot” | β€œWeed” πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘ βœ… βœ… βœ… βœ…
meta
Additional properties.
object πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… βœ… βœ… βœ…
x
x coordinate.
float πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘ βœ… βœ… βœ… βœ…
y
y coordinate.
float πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘ βœ… βœ… βœ… βœ…
z
z coordinate.
float πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘ βœ… βœ… βœ… βœ…
openfarm_slug
Plant type (from OpenFarm).
string πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… Β  Β  Β 
plant_stage
Point status.
β€œplanned” | β€œplanted” | β€œharvested” | β€œsprouted” | β€œactive” | β€œremoved” | β€œpending” πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… Β  βœ… Β 
planted_at
Date and time planted in garden.
timestamp πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… Β  Β  Β 
discarded_at
Date and time deleted.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘ Β  βœ… βœ… Β 
radius
Point radius.
float πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… βœ… βœ… Β 
depth
Plant depth.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… Β  Β  Β 
water_curve_id
ID of the water curve for the plant.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… Β  Β  Β 
spread_curve_id
ID of the spread curve for the plant.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… Β  Β  Β 
height_curve_id
ID of the height curve for the plant.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ βœ… Β  Β  Β 
pullout_direction
Tool slot direction.
0-4 πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ Β  Β  Β  βœ…
tool_id
ID of the tool in the tool slot.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ Β  Β  Β  βœ…
gantry_mounted
Is the tool slot mounted on the gantry?
boolean πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘ Β  Β  Β  βœ…
filter
Filter points.
β€œall” | β€œold” | β€œkept” πŸ“ Β  Β  Β  Β  Β  Β  Β  Β 

GET /api/points

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/points'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('points')

output:

[
  {
    "id": 50,
    "created_at": "2022-02-02T23:14:25.964Z",
    "updated_at": "2022-02-02T23:14:25.964Z",
    "device_id": 99,
    "name": "Cabbage 0",
    "pointer_type": "Plant",
    "meta": {
    },
    "x": 0,
    "y": 0,
    "z": 0,
    "openfarm_slug": "cabbage",
    "plant_stage": "planned",
    "planted_at": "2022-02-02T23:14:25.964Z",
    "radius": 50.0,
    "depth": 0,
    "water_curve_id": null,
    "spread_curve_id": null,
    "height_curve_id": null
  },
  {
    "id": 51,
    "created_at": "2022-02-02T23:14:25.964Z",
    "updated_at": "2022-02-02T23:14:25.964Z",
    "device_id": 99,
    "name": "Point 0",
    "pointer_type": "GenericPointer",
    "meta": {
      "created_by": "plant-detection"
    },
    "x": 1.0,
    "y": 2.0,
    "z": 3.0,
    "radius": 3.0,
    "discarded_at": null
  },
  {
    "id": 52,
    "created_at": "2022-02-02T23:14:25.964Z",
    "updated_at": "2022-02-02T23:14:25.964Z",
    "device_id": 99,
    "name": "test weed",
    "pointer_type": "Weed",
    "meta": {
    },
    "x": 1.0,
    "y": 2.0,
    "z": 3.0,
    "radius": 3.0,
    "discarded_at": null,
    "plant_stage": "active"
  },
  {
    "id": 53,
    "created_at": "2022-02-02T23:14:25.964Z",
    "updated_at": "2022-02-02T23:14:25.964Z",
    "device_id": 99,
    "name": "Slot 0",
    "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

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/points'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'pointer_type': 'Plant',
    'name': 'Strawberry',
    'openfarm_slug': 'strawberry',
    'x': 1,
    'y': 2,
    'z': 3,
}
response = requests.post(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_post('points', {
  'pointer_type': 'Plant',
  'name': 'Strawberry',
  'openfarm_slug': 'strawberry',
  'x': 1,
  'y': 2,
  'z': 3,
})

output:

{
  "id": 123,
  "created_at": "2022-02-02T23:14:25.964Z",
  "updated_at": "2022-02-02T23:14:25.964Z",
  "device_id": 99,
  "name": "Strawberry",
  "pointer_type": "Plant",
  "meta": {},
  "x": 1,
  "y": 2,
  "z": 3,
  "openfarm_slug": "strawberry",
  "plant_stage": "planned",
  "planted_at": null,
  "radius": 25.0,
  "depth": 0,
  "water_curve_id": null,
  "spread_curve_id": null,
  "height_curve_id": null
}

points/search

Method Description
GET /api/points/search Get a list of filtered points.
Field Type GET GET/:id POST PATCH DELETE
radius
Point size.
float πŸ“ Β  Β  Β  Β 
depth
Plant depth.
integer πŸ“ Β  Β  Β  Β 
name
Point name.
string πŸ“ Β  Β  Β  Β 
pointer_type
Point type.
β€œGenericPointer” | β€œPlant” | β€œToolSlot” | β€œWeed” πŸ“ Β  Β  Β  Β 
meta
Additional properties.
object πŸ“ Β  Β  Β  Β 
x
x coordinate.
float πŸ“ Β  Β  Β  Β 
y
y coordinate.
float πŸ“ Β  Β  Β  Β 
z
z coordinate.
float πŸ“ Β  Β  Β  Β 
openfarm_slug
Plant type (from OpenFarm).
string πŸ“ Β  Β  Β  Β 
plant_stage
Point status.
β€œplanned” | β€œplanted” | β€œharvested” | β€œsprouted” | β€œactive” | β€œremoved” | β€œpending” πŸ“ Β  Β  Β  Β 

public_key

Method Description
GET /api/public_key Get the public key.

GET /api/public_key

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/public_key'
response = requests.get(url)
print(response.text)

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('public_key')

output:

-----BEGIN PUBLIC KEY-----
2pVjj0NP5GNGzSqz8OVZUDJceDlsYpY24tUzJEtEzBJdN32zKM7PEkjiSZKqE3Uq
lWKTxcArHrk/VPVp53dRhP0dza8dluHHlbsC19FmOWjcBRk2d1QUmhfVQMxc+EVE
Hv5RSjtY40tB5NXRpXmbTOz7yejh2DsagCMTTyR8tQ/HYESXWama4s/MpRcVGHPY
6rZbv3a67/yqsrxNsqnmG+JrAvKsQd86p7upbo4jEQQ2SatXSuzYCCl8wOL6wkz2
E+qJNUTbyfTjyegBkUw6PEFnMhSUvzmBsWmy6X12vK9Too8qBhOYzYIPtN4oB9eY
v4oT7LUFYK5agv2lVG6Z1UvoB16T+moOfba/l1xkgG3xGqI/LYzxIM74h5ppjtkw
DmhdoWLZ
-----END PUBLIC KEY-----

regimens

See regimens.

Method Description
GET /api/regimens Get an array of all regimens.
GET /api/regimens/:id Get a single regimen by id.
POST /api/regimens Create a new regimen.
PATCH /api/regimens/:id Edit a single regimen by id.
DELETE /api/regimens/:id Delete a single regimen by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
name
Regimen name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
color
Regimen color.
β€œblue” | β€œgreen” | β€œyellow” | β€œorange” | β€œpurple” | β€œpink” | β€œgray” | β€œred” πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
body
Variable data.
Array πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
regimen_items
Sequence executions scheduled in the regimen.
Array (time_offset is in milliseconds) πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘

GET /api/regimens

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/regimens'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('regimens')

output:

[
  {
    "id": 15,
    "created_at": "2022-02-02T23:15:50.695Z",
    "updated_at": "2022-02-02T23:15:50.766Z",
    "name": "specs",
    "color": "red",
    "device_id": 234,
    "body": [
      {
        "kind": "parameter_application",
        "args": {
          "label": "parent",
          "data_value": {
            "kind": "coordinate",
            "args": {
              "x": 0,
              "y": 0,
              "z": 0
            }
          }
        }
      }
    ],
    "regimen_items": [
      {
        "id": 6,
        "created_at": "2022-02-02T23:15:50.695Z",
        "updated_at": "2022-02-02T23:15:50.766Z",
        "regimen_id": 15,
        "sequence_id": 70,
        "time_offset": 100
      }
    ]
  }
]

releases

Used by the FarmBot OS download page and FarmBot OS OTA updates.

Method Description
GET /api/releases Get a release.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  Β 
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  Β 
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  Β 
image_url
URL of FarmBot OS release .fw file.
string πŸ“– Β  Β  Β  Β 
version
FarmBot OS release version.
string πŸ“– Β  Β  Β  Β 
platform
FarmBot OS computer model.
β€œrpi” | β€œrpi3” | β€œrpi4” πŸ“– Β  Β  Β  Β 
channel
Release channel.
β€œstable” | β€œbeta” | β€œalpha” πŸ“– Β  Β  Β  Β 
dot_img_url
URL of FarmBot OS release .img file.
string πŸ“– Β  Β  Β  Β 

GET /api/releases

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/releases'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
payload = {
    'channel': 'stable',
    'platform': 'rpi3',
}
response = requests.get(url, headers=headers, json=payload)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('releases', payload={
    'channel': 'stable',
    'platform': 'rpi3',
})

output:

{
  "id": 2,
  "created_at": "2022-02-02T23:14:27.277Z",
  "updated_at": "2022-02-02T23:14:27.277Z",
  "image_url": "gopher://localhost:3000/b",
  "version": "1.2.3-rc7",
  "platform": "rpi3",
  "channel": "stable",
  "dot_img_url": null
}

saved_gardens

Used by gardens.

Method Description
GET /api/saved_gardens Get an array of all saved gardens.
POST /api/saved_gardens Create a new saved garden.
PATCH /api/saved_gardens/:id Edit a single saved garden by id.
DELETE /api/saved_gardens/:id Delete a single saved garden by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
name
Saved garden name.
string πŸ“– Β  πŸ“
(required)
πŸ“ πŸ—‘
notes
Notes.
string πŸ“– Β  πŸ“ πŸ“ πŸ—‘

GET /api/saved_gardens

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/saved_gardens'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('saved_gardens')

output:

[
  {
    "id": 32,
    "name": "Garden 0",
    "device_id": 384,
    "created_at": "2022-02-02T23:15:33.978Z",
    "updated_at": "2022-02-02T23:15:33.978Z",
    "notes": "notes"
  }
]

saved_gardens/:id/apply

Method Description
POST /api/saved_gardens/:id/apply Apply a saved garden, destroying existing plants.
PATCH /api/saved_gardens/:id/apply Apply a saved garden. Errors if plants exist.

saved_gardens/snapshot

Method Description
POST /api/saved_gardens/snapshot Copy the current garden to a new saved garden.

sensor_readings

Method Description
GET /api/sensor_readings Get an array of all sensor readings.
GET /api/sensor_readings/:id Get a single sensor reading by id.
POST /api/sensor_readings Create a new sensor reading.
DELETE /api/sensor_readings/:id Delete a single sensor reading by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
mode
Sensor pin read mode, 0 for digital, 1 for analog.
0 | 1 πŸ“– πŸ“– πŸ“ Β  πŸ—‘
pin
Sensor pin number.
0-69 πŸ“– πŸ“– πŸ“
(required)
Β  πŸ—‘
value
Sensor value.
0-1023 πŸ“– πŸ“– πŸ“
(required)
Β  πŸ—‘
x
x coordinate.
float πŸ“– πŸ“– πŸ“
(required)
Β  πŸ—‘
y
y coordinate.
float πŸ“– πŸ“– πŸ“
(required)
Β  πŸ—‘
z
z coordinate.
float πŸ“– πŸ“– πŸ“
(required)
Β  πŸ—‘
read_at
Date and time of sensor reading.
timestamp πŸ“– πŸ“– πŸ“ Β  πŸ—‘

GET /api/sensor_readings

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/sensor_readings'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('sensor_readings')

output:

[
  {
    "id": 1,
    "created_at": "2022-02-02T23:14:15.819Z",
    "updated_at": "2022-02-02T23:14:15.819Z",
    "mode": 1,
    "pin": 66,
    "value": 80,
    "x": 281.0,
    "y": 205.0,
    "z": 76.0,
    "read_at": "2022-02-02T23:14:15.819Z"
  }
]

sensors

See sensors.

Method Description
GET /api/sensors Get an array of all sensors.
GET /api/sensors/:id Get a single sensor by id.
POST /api/sensors Create a new sensor.
PATCH /api/sensors/:id Edit a single sensor by id.
DELETE /api/sensors/:id Delete a single sensor by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
mode
Sensor pin read mode, 0 for digital, 1 for analog.
0 | 1 πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
pin
Sensor pin number.
0-69 πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
label
Sensor name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘

GET /api/sensors

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/sensors'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('sensors')

output:

[
  {
    "id": 4,
    "created_at": "2022-02-02T23:14:40.839Z",
    "updated_at": "2022-02-02T23:14:40.839Z",
    "pin": 3,
    "label": "My Sensor",
    "mode": 1
  }
]

sequence_versions

Sequence versions are created when a sequence is published for sharing. Also see featured sequences.

Method Description
GET /api/sequence_versions/:id Get a sequence version.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer Β  πŸ“– Β  Β  Β 
created_at
Date and time of creation set by the database.
timestamp Β  πŸ“– Β  Β  Β 
description
Sequence description.
string Β  πŸ“– Β  Β  Β 
copyright
Copyright holder.
string Β  πŸ“– Β  Β  Β 
name
Sequence name.
string Β  πŸ“– Β  Β  Β 
color
Sequence color.
β€œblue” | β€œgreen” | β€œyellow” | β€œorange” | β€œpurple” | β€œpink” | β€œgray” | β€œred” Β  πŸ“– Β  Β  Β 
kind
β€œsequence”.
β€œsequence” Β  πŸ“– Β  Β  Β 
args
Scope declaration.
Object Β  πŸ“– Β  Β  Β 
body
Sequence steps.
Array Β  πŸ“– Β  Β  Β 

GET /api/sequence_versions/8

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/sequence_versions/8'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('sequence_versions', 8)

output:

{
  "id": 8,
  "created_at": "2022-02-02T23:14:33.054Z",
  "description": "An SV with comments",
  "copyright": "FarmBot, Inc. 2021",
  "name": "Operative multimedia success",
  "kind": "sequence",
  "args": {
    "version": 20180209,
    "locals": {
      "kind": "scope_declaration",
      "args": {
      }
    }
  },
  "body": [
    {
      "comment": "This is a comment",
      "kind": "send_message",
      "args": {
        "message": "Hello, world!",
        "message_type": "warn"
      }
    }
  ]
}

sequences

See sequences.

Method Description
GET /api/sequences Get an array of all sequences.
GET /api/sequences/:id Get a single sequence by id.
POST /api/sequences Create a new sequence.
PATCH /api/sequences/:id Edit a single sequence by id.
DELETE /api/sequences/:id Delete a single sequence by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
args
Scope declaration.
Object πŸ“– πŸ“– πŸ“ πŸ“
(required)
πŸ—‘
color
Sequence color.
β€œblue” | β€œgreen” | β€œyellow” | β€œorange” | β€œpurple” | β€œpink” | β€œgray” | β€œred” πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
folder_id
ID of the parent folder.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
forked
Local changes to a shared sequence.
boolean πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
name
Sequence name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“
(required)
πŸ—‘
pinned
Add the sequence to the pinned sequence list.
boolean πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
copyright
Copyright holder.
string πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
description
Sequence description (markdown).
string πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
sequence_versions
A list of published versions of the sequence.
integer[] πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
sequence_version_id
ID of the sequence version the sequence was imported from.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
kind
β€œsequence”
β€œsequence” πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘
body
Sequence steps.
Array πŸ“– πŸ“– πŸ“
(required)
πŸ“
(required)
πŸ—‘

GET /api/sequences

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/sequences'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('sequences')

output:

[
  {
    "id": 36,
    "created_at": "2022-02-02T23:14:31.607Z",
    "updated_at": "2022-02-02T23:14:31.645Z",
    "args": {
      "version": 20180209,
      "locals": {
        "kind": "scope_declaration",
        "args": {
        },
        "body": [
          {
            "kind": "parameter_declaration",
            "args": {
              "label": "parent",
              "default_value": {
                "kind": "coordinate",
                "args": {
                  "x": 9,
                  "y": 9,
                  "z": 9
                }
              }
            }
          }
        ]
      }
    },
    "color": "green",
    "folder_id": null,
    "forked": false,
    "name": "My Sequence",
    "pinned": false,
    "copyright": null,
    "description": null,
    "sequence_versions": [

    ],
    "sequence_version_id": null,
    "kind": "sequence",
    "body": [
      {
        "kind": "execute",
        "args": {
          "sequence_id": 23
        }
      }
    ]
  }
]

sequences/:id/upgrade/:sequence_version_id

Method Description
POST /api/sequences/:id/upgrade/:sequence_version_id Upgrade a sequence that already uses a sequence version.

sequences/:sequence_version_id/install

Method Description
POST /api/sequences/:sequence_version_id/install Install someone else’s sequence.

sequences/:id/publish

Method Description
POST /api/sequences/:id/publish Share your sequence with other people.
Field Type GET GET/:id POST PATCH DELETE
copyright
Copyright holder.
string Β  Β  πŸ“
(required)
Β  Β 

sequences/:id/unpublish

Method Description
POST /api/sequences/:id/unpublish Unlist your sequence.

storage_auth

Used for photos.

Method Description
GET /api/storage_auth Get the image storage policy object.

GET /api/storage_auth

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/storage_auth'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('storage_auth')

output:

{
  "verb": "POST",
  "url": "//storage.googleapis.com/YOU_MUST_CONFIG_GOOGLE_CLOUD_STORAGE/",
  "form_data": {
    "key": "temp1/517227e6-4d91-43c1-a0f2-69dd4dbf612c.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 'form-data' request to the URL provided. Then POST the resulting URL as an 'attachment_url' (json) to api/images/."
}

telemetries

Used by the history tab of the connectivity pop-up.

Method Description
GET /api/telemetries Get an array of all telemetries.
POST /api/telemetries Create a new telemetry.
DELETE /api/telemetries/:id Delete a single telemetry by id.
DELETE /api/telemetries/all Delete all telemetries.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
target
FarmBot OS computer model.
β€œrpi” | β€œrpi3” | β€œrpi4” πŸ“– Β  πŸ“
(required)
Β  πŸ—‘
soc_temp
CPU temperature.
integer πŸ“– Β  πŸ“ Β  πŸ—‘
throttled
RPi throttle state.
β€œ0x#####” πŸ“– Β  πŸ“ Β  πŸ—‘
wifi_level_percent
WiFi signal strength percent.
0-100 πŸ“– Β  πŸ“ Β  πŸ—‘
uptime
Time in seconds since boot.
integer πŸ“– Β  πŸ“ Β  πŸ—‘
memory_usage
Memory usage in MB.
integer πŸ“– Β  πŸ“ Β  πŸ—‘
disk_usage
Disk usage in percent.
0-100 πŸ“– Β  πŸ“ Β  πŸ—‘
cpu_usage
CPU usage in percent.
0-100 πŸ“– Β  πŸ“ Β  πŸ—‘
fbos_version
FarmBot OS semver version string.
string πŸ“– Β  πŸ“ Β  πŸ—‘
firmware_hardware
Firmware installed on the Farmduino or microcontroller.
β€œarduino” | β€œfarmduino” | β€œfarmduino_k14” | β€œfarmduino_k15” | β€œfarmduino_k16” | β€œfarmduino_k17” | β€œexpress_k10” | β€œexpress_k11” | β€œexpress_k12” πŸ“– Β  πŸ“ Β  πŸ—‘

GET /api/telemetries

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/telemetries'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('telemetries')

output:

[
  {
    "id": 9,
    "created_at": 1712360174,
    "updated_at": "2024-04-05T23:36:14.413Z",
    "soc_temp": 62,
    "throttled": "0x0",
    "wifi_level_percent": 54,
    "uptime": 832,
    "memory_usage": 22,
    "disk_usage": 4,
    "cpu_usage": 61,
    "target": "rpi",
    "fbos_version": "17.0.0",
    "firmware_hardware": null
  }
]

tokens

Used for user authentication. Also see authorization.

Method Description
GET /api/tokens Use your token to refresh your token, except for the expiration.
POST /api/tokens Provide your account login to request a new token.
DELETE /api/tokens Delete your token.
Field Type GET GET/:id POST PATCH DELETE
token
Token.
Object. (see below) πŸ“– Β  πŸ“ Β  πŸ—‘
user
User.
Object. (see users) Β  Β  πŸ“ Β  πŸ—‘

Token

Field Type
unencoded
Unencoded token information.
Object. (see below)
encoded
Encoded token to use in request header.
string

Unencoded Token

Field Type
aud
Audience.
string
sub
User ID.
integer
iat
Created at timestamp.
integer
jti
JTI.
string
iss
API address.
string
exp
Expiration.
integer
mqtt
MQTT URL.
string
bot
Device ID string (username).
string
vhost
vhost.
string
mqtt_ws
MQTT WS URL.
string

GET /api/tokens

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/tokens'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('tokens')

output:

{
  "token": {
    "unencoded": {
      "aud": "unknown",
      "sub": 134,
      "iat": 1643843680,
      "jti": "22deacf3-cb7c-4b42-9727-24d4d964a9d2",
      "iss": "//192.168.1.112:3000",
      "exp": 1649027679,
      "mqtt": "blooper.io",
      "bot": "device_214",
      "vhost": "/",
      "mqtt_ws": "ws://blooper.io:3002/ws"
    },
    "encoded": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJhdWQiOiJ1bmtub3duIiwic3ViIjoxMzQsImlhdCI6MTY0Mzg0MzY4MCwianRpIjoiMjJkZWFjZjMtY2I3Yy00YjQyLTk3MjctMjRkNG"
  }
}

tools

Used for tools.

Method Description
GET /api/tools Get an array of all tools.
GET /api/tools/:id Get a single tool by id.
POST /api/tools Create a new tool.
PATCH /api/tools/:id Edit a single tool by id.
DELETE /api/tools/:id Delete a single tool by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
name
Tool name.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
status
Whether a tool is assigned to a slot or not. Does not indicate if a tool is currently mounted by the UTM. Use device.mounted_tool_id to check if the tool is mounted or not.
β€œactive” | β€œinactive” πŸ“– πŸ“– Β  Β  πŸ—‘
flow_rate_ml_per_s
Watering nozzle flow rate in mL per second. Field only shown in the frontend if tool name includes β€œWatering Nozzle”.
integer πŸ“– πŸ“– πŸ“ πŸ“ πŸ—‘

GET /api/tools

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/tools'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('tools')

output:

{
  "id": 42,
  "created_at": "2022-02-02T23:14:39.322Z",
  "updated_at": "2022-02-02T23:14:39.322Z",
  "name": "Watering Nozzle",
  "status": "active",
  "flow_rate_ml_per_s": 0
}

users

Account user information.

Method Description
GET /api/users Get an array including the user object.
POST /api/users Create a new user.
PATCH /api/users Edit the user object.
DELETE /api/users Delete the user object.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
name
User name.
string πŸ“– Β  πŸ“
(required)
πŸ“ Β 
email
Email address.
string πŸ“– Β  πŸ“
(required)
πŸ“ Β 
password
Password.
string Β  Β  πŸ“
(required)
Β  Β 
password_confirmation
Password.
string Β  Β  πŸ“
(required)
Β  Β 
new_password
Password.
string Β  Β  Β  Β  πŸ“
new_password_confirmation
Password.
string Β  Β  Β  Β  πŸ“
agree_to_terms
Agreed to terms?.
boolean Β  Β  πŸ“ Β  Β 
language
User language (used for auto-generation).
string πŸ“– Β  πŸ“ πŸ“ πŸ—‘

GET /api/users

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/users'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('users')

output:

[
  {
    "id": 234,
    "created_at": "2022-02-02T23:14:56.988Z",
    "updated_at": "2022-02-02T23:14:56.988Z",
    "name": "Susana Bogan",
    "email": "suzy@hirthe.name",
  "language": "English"
  }
]

users/control_certificate

Method Description
POST /api/users/control_certificate Generate a control certificate.
Field Type GET GET/:id POST PATCH DELETE
email
Email address.
string Β  Β  πŸ“
(required)
Β  Β 
password
Password.
string Β  Β  πŸ“
(required)
Β  Β 

users/resend_verification

Method Description
POST /api/users/resend_verification Resend the account verification email.
Field Type GET GET/:id POST PATCH DELETE
email
Email address.
string Β  Β  πŸ“
(required)
Β  Β 

web_app_config

See settings.

Method Description
GET /api/web_app_config Get the web app config object.
PATCH /api/web_app_config Edit the web app configuration object.
DELETE /api/web_app_config Delete the web app configuration object.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
device_id
Unique device identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
confirm_step_deletion
Show a confirmation dialog when deleting a sequence step.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
disable_animations
Disable plant animations in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
disable_i18n
Set the Web App to English.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
display_trail
Display a virtual trail for FarmBot in the garden map to show movement and watering history while the map is open. Toggling this setting will clear data for the current trail.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
dynamic_map
Change the garden map size based on axis length. A value must be input in AXIS LENGTH and STOP AT MAX must be enabled in firmware_config. Overrides MAP SIZE values.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
encoder_figure
Show a virtual farmbot in the garden map at the encoder position as well as motor position.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
hide_webcam_widget
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
legend_menu_open
Show the garden map legend.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
raw_encoders
Show raw encoder values.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
scaled_encoders
Show scaled encoder values.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_spread
Show plant spread in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_farmbot
Show FarmBot in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_plants
Show plants in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_points
Show map points in the garden ma.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
x_axis_inverted
Invert x axis jog buttons.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
y_axis_inverted
Invert y axis jog buttons.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
z_axis_inverted
Invert z axis jog buttons.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
bot_origin_quadrant
Select a map origin by clicking on one of the four quadrants to adjust the garden map to your viewing angle.
1-4 πŸ“– Β  Β  πŸ“ πŸ—‘
zoom_level
Garden map zoom level.
-9-3 πŸ“– Β  Β  πŸ“ πŸ—‘
success_log
Success log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
busy_log
Busy log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
warn_log
Warning log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
error_log
Error log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
info_log
Info log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
fun_log
Fun log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
debug_log
Debug log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
stub_config
Sub config.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_first_party_farmware
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
enable_browser_speak
Have the browser also read aloud log messages on the β€œSpeak” channel that are spoken by FarmBot.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_images
Show photos in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
photo_filter_begin
Show photos after this date and time.
timestamp | null πŸ“– Β  Β  πŸ“ πŸ—‘
photo_filter_end
Show photos before this date and time.
timestamp | null πŸ“– Β  Β  πŸ“ πŸ—‘
discard_unsaved
Don’t ask about saving work before closing browser tab. Warning: may cause loss of data.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
xy_swap
Swap map X and Y axes, making the Y axis horizontal and X axis vertical. This setting will also swap the X and Y jog control buttons in the Move widget.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
home_button_homing
Configure the home button to find home instead of moving to home.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_motor_plot
Show motor position graph.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_historic_points
Show removed weeds in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_sensor_readings
Show sensor readings in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_dev_menu
Unused.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
internal_use
Developer setting storage.
string πŸ“– Β  Β  πŸ“ πŸ—‘
time_format_24_hour
Display times using the 24-hour format.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_pins
Show raw pin lists in Read Sensor, Control Peripheral, and If Statement steps.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
disable_emergency_unlock_confirmation
Don’t confirm when unlocking FarmBot after an emergency stop.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
map_size_x
Custom x map dimension (in millimeters). These values set the size of the garden map unless dynamic_map is enabled.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
map_size_y
Custom y map dimension (in millimeters). These values set the size of the garden map unless dynamic_map is enabled.
integer πŸ“– Β  Β  πŸ“ πŸ—‘
expand_step_options
Choose whether advanced step options are open or closed by default.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
hide_sensors
Hide the sensors panel.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
confirm_plant_deletion
Show a confirmation dialog when deleting a plant.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
confirm_sequence_deletion
Show a confirmation dialog when deleting a sequence.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
discard_unsaved_sequences
Don’t ask about saving sequence work before closing browser tab. Warning: may cause loss of data.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
user_interface_read_only_mode
Disallow account data changes. This does not prevent Lua or FarmBot OS from changing settings.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
assertion_log
Assertion log verbosity setting.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
show_zones
Show point group location areas in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_weeds
Show weeds in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
display_map_missed_steps
Display high motor load warning indicators in map. Requires display_trail and stall detection to be enabled.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
time_format_seconds
Add seconds to time displays.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
crop_images
Crop images displayed in the garden map to remove black borders from image rotation. Crop amount determined by CAMERA ROTATION value.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_camera_view_area
Show the camera’s field of view in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
view_celery_script
View raw data representation of sequence steps.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
highlight_modified_settings
Highlight settings that have been changed from their default values.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_advanced_settings
Show advanced settings.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_soil_interpolation_map
Show soil height interpolation map in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
show_moisture_interpolation_map
Show soil moisture interpolation map in the garden map.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
clip_image_layer
Remove portions of images that extend beyond the garden map boundaries.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
beep_verbosity
Beep upon log message verbosity level.
0-3 πŸ“– Β  Β  πŸ“ πŸ—‘
landing_page
Panel to show upon loading the app.
string πŸ“– Β  Β  πŸ“ πŸ—‘
go_button_axes
Default axes to move when a GO TO LOCATION button is pressed.
β€œX” | β€œY” | β€œZ” | β€œXY” | β€œXYZ” πŸ“– Β  Β  πŸ“ πŸ—‘
show_uncropped_camera_view_area
Show the camera’s uncropped and unrotated field of view in the garden map when clip_image_layer is enabled.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
default_plant_depth
When adding plants to the map from the web app, set each new plant’s depth to this value (in millimeters).
integer πŸ“– Β  Β  πŸ“ πŸ—‘
show_missed_step_plot
Show motor load graph.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘
enable_3d_electronics_box_top
Show the push buttons in 3D instead of 2D.
boolean πŸ“– Β  Β  πŸ“ πŸ—‘

GET /api/web_app_config

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/web_app_config'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('web_app_config')

output:

{
  "id": 2,
  "created_at": "2022-02-02T23:14:24.408Z",
  "updated_at": "2022-02-02T23:14:24.426Z",
  "device_id": 86,
  "confirm_step_deletion": false,
  "disable_animations": false,
  "disable_i18n": false,
  "display_trail": true,
  "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_axis_inverted": false,
  "y_axis_inverted": false,
  "z_axis_inverted": false,
  "bot_origin_quadrant": 2,
  "zoom_level": -2,
  "success_log": 1,
  "busy_log": 1,
  "warn_log": 1,
  "error_log": 1,
  "info_log": 1,
  "fun_log": 1,
  "debug_log": 1,
  "stub_config": false,
  "show_first_party_farmware": false,
  "enable_browser_speak": false,
  "show_images": true,
  "photo_filter_begin": null,
  "photo_filter_end": null,
  "discard_unsaved": false,
  "xy_swap": false,
  "home_button_homing": true,
  "show_motor_plot": false,
  "show_historic_points": false,
  "show_sensor_readings": false,
  "show_dev_menu": false,
  "internal_use": null,
  "time_format_24_hour": false,
  "show_pins": false,
  "disable_emergency_unlock_confirmation": true,
  "map_size_x": 2900,
  "map_size_y": 1400,
  "expand_step_options": false,
  "hide_sensors": false,
  "confirm_plant_deletion": true,
  "confirm_sequence_deletion": true,
  "discard_unsaved_sequences": false,
  "user_interface_read_only_mode": false,
  "assertion_log": 1,
  "show_zones": false,
  "show_weeds": true,
  "display_map_missed_steps": false,
  "time_format_seconds": false,
  "crop_images": true,
  "show_camera_view_area": true,
  "view_celery_script": false,
  "highlight_modified_settings": true,
  "show_advanced_settings": false,
  "show_soil_interpolation_map": false,
  "show_moisture_interpolation_map": false,
  "clip_image_layer": true,
  "beep_verbosity": 0,
  "landing_page": "plants",
  "go_button_axes": "XY",
  "show_uncropped_camera_view_area": false,
  "default_plant_depth": 5,
  "show_missed_step_plot": false,
  "enable_3d_electronics_box_top": true
}

webcam_feeds

See webcam feeds.

Method Description
GET /api/webcam_feeds Get an array of all webcam feeds.
GET /api/webcam_feeds/:id Get a single webcam feed by id.
POST /api/webcam_feeds Create a new webcam feed.
PATCH /api/webcam_feeds/:id Edit a single webcam feed by id.
DELETE /api/webcam_feeds/:id Delete a single webcam feed by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– πŸ“– Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– πŸ“– Β  Β  πŸ—‘
name
Webcam feed label.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘
url
Webcam feed URL.
string πŸ“– πŸ“– πŸ“
(required)
πŸ“ πŸ—‘

GET /api/webcam_feeds

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/webcam_feeds'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('webcam_feeds')

output:

[
  {
    "id": 14,
    "created_at": "2022-02-02T23:14:53.317Z",
    "updated_at": "2022-02-02T23:14:53.317Z",
    "url": "0",
    "name": "feed 0"
  }
]

wizard_step_results

Used by setup wizard.

Method Description
GET /api/wizard_step_results Get an array of all wizard step results.
POST /api/wizard_step_results Create a new wizard step result.
PATCH /api/wizard_step_results/:id Edit a single wizard step result by id.
DELETE /api/wizard_step_results/:id Delete a single wizard step result by id.
Field Type GET GET/:id POST PATCH DELETE
id
Unique identifier set by the database.
integer πŸ“– Β  Β  Β  πŸ—‘
created_at
Date and time of creation set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
updated_at
Date and time of most recent update set by the database.
timestamp πŸ“– Β  Β  Β  πŸ—‘
answer
Wizard step success?
boolean πŸ“– Β  πŸ“ πŸ“ πŸ—‘
outcome
Error message.
string πŸ“– Β  πŸ“ πŸ“ πŸ—‘
slug
Wizard step UUID.
string πŸ“– Β  πŸ“ πŸ“ πŸ—‘

GET /api/wizard_step_results

via Python

import json
import requests

# TOKEN = ...

url = f'https:{TOKEN['token']['unencoded']['iss']}/api/wizard_step_results'
headers = {'Authorization': 'Bearer ' + TOKEN['token']['encoded'],
           'content-type': 'application/json'}
response = requests.get(url, headers=headers)
print(json.dumps(response.json(), indent=2))

via FarmBot Python library

from farmbot import Farmbot

# TOKEN = ...

fb = Farmbot()
fb.set_token(TOKEN)

fb.api_get('wizard_step_results')

output:

[
  {
    "id": 5,
    "created_at": "2022-02-02T23:15:34.279Z",
    "updated_at": "2022-02-02T23:15:34.279Z",
    "answer": false,
    "outcome": "error",
    "slug": "intro"
  }
]