Skip to content

REST API

The REST API can provide you with information about plants, and you can update plant records and search the database. It is still under construction, so more features will likely be added as development continues.

Using the API Key

You use the API key in the Authorization: Bearer header.

Retrieve Information from a Plant

You can retrieve information from a plant using a GET request, and you’ll receive all the details about that specific plant. By default, the text is in English, but you can set your profile to display it in your chosen language. In that case, in addition to English, they will also be accompanied by a label at the end in your chosen language. For example, healthState is printed in English, but a label named healthStateLabel is printed in your chosen language. Below is a response call that includes Swedish.

To retrieve information about a plant: GET /api/plants/1 where the number 1 is replaced with the plant's ID number, which you can see when you're in a web browser.

Information on a plant in Swedish
{
  "language": "sv",
  "plant": {
    "id": 1,
    "name": "Roma Tomato",
    "variety": "San Marzano",
    "scientificName": "Solanum lycopersicum",
    "floweringStartMonth": "May",
    "floweringEndMonth": "September",
    "harvestStartMonth": "May",
    "harvestEndMonth": "September",
    "sowingStartMonth": "May",
    "sowingEndMonth": "September",
    "color": "#e66100",
    "mixedColors": false,
    "areaId": 1,
    "status": "Flowering",
    "planted": "2026-03-18",
    "photo": "/assets/plant-sample.jpg",
    "galleryPhotos": [
      "/assets/plant-sample.jpg"
    ],
    "notes": "Updated through the REST API.",
    "seedlingSowings": [
      {
        "id": 1783542817660,
        "title": "Nr 1",
        "count": 0,
        "note": "Första",
        "createdAt": "2026-07-08T20:33:37.660Z"
      }
    ],
    "assignedSeedBags": [],
    "statistics": [
      {
        "id": 1783695549270,
        "type": "fertilized",
        "date": "2026-07-10"
      },
      {
        "id": 1783608652069,
        "type": "watered",
        "date": "2026-07-09"
      }
    ],
    "lastWatered": "2026-07-09",
    "daysBetweenWatering": 1,
    "lastRepotted": "2026-03-20",
    "lastFertilized": "2026-07-10",
    "daysBetweenFertilizing": 13,
    "lifespan": "Annual",
    "cuttingMonth": "May",
    "purchased": "2026-03-12",
    "moistureLevel": 68,
    "lightLevel": "Sunny",
    "healthState": "Pest Infestation",
    "statusLabel": "Blommar",
    "lifespanLabel": "Ettårig",
    "cuttingMonthLabel": "Maj",
    "lightLevelLabel": "Soligt",
    "healthStateLabel": "Skadedjursangrepp"
  },
  "area": {
    "id": 1,
    "name": "North Raised Beds",
    "type": "Vegetable beds",
    "sunlight": "Full sun",
    "moisture": 72,
    "locationId": 1,
    "underRoof": false,
    "notes": "Tomatoes, basil, and peppers. Add compost every other month.",
    "typeLabel": "Grönsaksbäddar"
  }
}

Update information about a plant

To update information about a specific plant, use PATCH /api/plants/1 and replace the number 1 with the correct ID. Then send a JSON request with the information you need to update for the plant. In the example below, we update the health status and last watered date; when updating any status strings, they must be in English.

Plant Update
{
  "healthState": "Pest Infestation",
  "lastWatered": "2026-07-05"
}

Search the Database

You can search the plant database to retrieve all results for a search term. To do this, use GET /api/plant-database?q=tomato. Below is an example of what a response might look like.

Search the database
{
  "query": "roma",
  "total": 1,
  "limit": 25,
  "offset": 0,
  "results": [
    {
      "id": 1,
      "name": "Roma Tomato",
      "variety": "San Marzano",
      "scientificName": "Solanum lycopersicum",
      "lifespan": "Annual",
      "cuttingMonth": "May",
      "lightLevel": "Sunny",
      "customInfo": "Reliable paste tomato with rich flavor. Start indoors and transplant after frost danger has passed.",
      "photo": "/assets/plant-sample.jpg",
      "photos": [
        "/assets/plant-sample.jpg"
      ],
      "author": {
        "id": 1,
        "name": "Unknown"
      },
      "updatedAt": "2026-07-08T16:34:25.512Z",
      "seedPacketLinksCount": 0
    }
  ]
}

Plant Information in the Database

You can retrieve plant information for a plant in the database using GET /api/plant-database/1, and the response might look like the following

Plant Information in the Database
{
  "entry": {
    "id": 1,
    "name": "Roma Tomato",
    "variety": "San Marzano",
    "scientificName": "Solanum lycopersicum",
    "growingFromSeed": "AA",
    "mixedColors": false,
    "lifespan": "Annual",
    "cuttingMonth": "May",
    "lightLevel": "Sunny",
    "customInfo": "Reliable paste tomato with rich flavor. Start indoors and transplant after frost danger has passed.",
    "photos": [
      "/assets/plant-sample.jpg"
    ],
    "userPhotos": [],
    "seedPacketLinks": [],
    "authorId": 1,
    "createdAt": "2026-04-18T09:00:00.000Z",
    "updatedAt": "2026-07-08T16:34:25.512Z",
    "author": {
      "id": 1,
      "name": "Unknown"
    }
  },
  "comments": []
}

Areas

Retrieve information about an area

You can retrieve information about an area using a GET request, and you’ll receive all the details about the area. As usual, the values with the "Label" attribute are translations into the selected API language; they are not used when updating data.

  • To retrieve information about a specific area: GET /api/areas/1 where the number 1 is replaced with the area's ID number, which you can see when you're in a web browser.
  • To retrieve all areas: GET /api/areas
Information about the area in the database
{
  "language": "sv",
  "temperatureUnit": "celsius",
  "area": {
    "id": 1,
    "name": "North Raised Beds",
    "type": "Vegetable beds",
    "sunlight": "Indirect light",
    "temperature": 20,
    "showTemperature": true,
    "humidity": 20,
    "humidityTarget": 60,
    "showHumidity": true,
    "locationId": 1,
    "underRoof": false,
    "notes": "Tomatoes, basil, and peppers. Add compost every other month.",
    "typeLabel": "Grönsaksbäddar",
    "temperatureLabel": "20°C",
    "humidityLabel": "20% / target 60%",
    "humidityProgress": 33.33333333333333
  }
}

Update an Area

To update information about a specific area, use PATCH /api/areas/1 and replace the number 1 with the correct ID. Then send a JSON request with the information you need to update for that area. In the example below, we update the temperature and humidity; when updating any status strings, they must be in English.

Update an Area
{
  "temperature": "32",
  "humidity": "35"
}

Update thru Home Assistant

Here is an example on how to update temperature and humidity in a area with sensors in Home Assistant. Add this in configuration.yaml file in Home Assistant then you do an automation for example every 5 min to trigger send_temp. You need to add the address to your OlsGrow API, your OlsGrow API key and the name of the sensors.

Update an area
rest_command:
  send_temp:
    url: "https://youraddress/api/areas/1"
    method: PATCH
    headers:
      authorization: "Bearer <OLSGROW API KEY>"
      content-type: "application/json"
    payload: '{"temperature": "{{ states("sensor.tempsensor") }}","humidity": {{ states("sensor.humiditysensor") }} }'