{"info":{"_postman_id":"57305c7a-782e-48b8-b269-834190abaf4c","name":"Open Plantbook API Public","description":"<html><head></head><body><p>Documentation for Open Plantbook API.</p>\n<p><a href=\"https://open.plantbook.io\">https://open.plantbook.io</a></p>\n<p>This is free service but it requires registration and API credentials. The credentials need to be generated from Web UI under API keys.</p>\n<p>Project page:</p>\n<p><a href=\"https://plantbook.io\">https://plantbook.io</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"12627470","collectionId":"57305c7a-782e-48b8-b269-834190abaf4c","publishedId":"TVsxBRjD","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2020-12-26T03:46:48.000Z"},"item":[{"name":"Sensor-data","item":[{"name":"2. Plant-Instance Register","event":[{"listen":"test","script":{"id":"2facba92-0fb4-4b01-a759-01bdf50eafb7","exec":["if (pm.response.code == 200) {","    pm.test(\"Get Plant Instance ID\", function () {","        var response = pm.response.json();","        pm.collectionVariables.set(\"PlantInstaceID\", response.id);","    });","}"],"type":"text/javascript"}}],"id":"7ece7402-3c6f-4ed3-851e-9128c1726935","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"token_str_here"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\"custom_id\": \"Sample instance of abelia chinensis\", \"pid\": \"abelia chinensis\", \"location_country\": \"ZZ\"}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/sensor-data/instance","description":"<h2 id=\"register-plant-instance\">Register Plant Instance</h2>\n<p>Create User's Plant-Instance for the plant's sensors data uploading. The single entry uniquely identifies a plant instance and the set of bound sensors.<br />If either or is changed then new Plant-Instance is created.</p>\n<p>It includes the plant's location which helps to understand environment where the plant grows so it is highly encouraged to provide this information.</p>\n<p>There are 3 options in the order of priorities. Only 1 option needs to be specified:</p>\n<ol>\n<li>Coordinates longitude and latitude (preferable). Does not have to be precise location but just approximate coordinates.</li>\n<li>Location Country and Name. To specify country you must use ISO 3166-1 alpha-2 code (<a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\">https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2</a>). E.g.: \"AU\". Name is region name within country E.g. Name: \"Sydney, New South Wales\"</li>\n<li>Location is taken from IP address (default behaviour) The IP address is not stored but just used to identify approximate location.</li>\n</ol>\n<p>Location is only registered on Plant-Instance creation. It is not updated when registering the same plant (same and ) with different location.</p>\n<p>API client is expected to register Instance-Plant once and they store its ID. They reuse ID to upload sensor data. Although, client can make this call with the same and and the end-point return ID of the existing instance.</p>\n<h3 id=\"mandatory-attributes\">Mandatory attributes:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>- \"pid\" - Plant ID is unique plant identifier.\n- \"custom_id\" - This is a plant identified set by a user. It helps to differentiate plant instances when for example a user has 2 instances of the same plant (the same \"pid\")\n\n</code></pre><h3 id=\"optional-attributes\">Optional attributes:</h3>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>- \"location_lon\" - location longitude coordinate where plant is located.\n- \"location_lat\" - location latitude coordinate where plant is located.\n- \"location_by_IP\" - Default is \"true\" if not specified. \"false\" - disables the location by IP detection.\n- \"location_name\" - Location name in well known to the location format. API will make it is best to parse and derive the specific location.\n- \"location_region\" - Location region within country.\n- \"location_country\" - Location country code using ISO 3166-1 alpha-2 (2 chars length)\n\n</code></pre><h3 id=\"returns\">Returns:</h3>\n<p>Response includes ID in UUID format. This is a unique Plant-Instance identifier that is used as JTS \"node\" to upload sensor data.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>201 - New Plant-Instance has been created and location registered.\n200 - Plant-Instance (identified by &lt;pid&gt; and &lt;custom_id&gt;) already exists. No action.\n400 - Validation error E.g.: Plant's PID found neither in user-plants nor in public-plants or if a mandatory attribute has not been provided. \n\n</code></pre>","urlObject":{"path":["api","v1","sensor-data","instance"],"host":["https://open.plantbook.io"],"query":[],"variable":[]}},"response":[{"id":"3a2e31f7-a73e-4711-8ce3-a7fabae5c727","name":"Plant-Instance Register","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n  \"custom_id\": \"abelia chinensis on window\",\n  \"pid\": \"abelia chinensis\",\n  \n  \"location_name\": \"Sydney\",\n  \"location_region\": \"New South Wales\",\n  \"location_country\": \"Australia\",\n  \"location_lon\": \"43.11\",\n  \"location_lat\": \"-15.88\",\n  \"location_by_IP\": \"true\"\n}\n","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/sensor-data/instance"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Mon, 14 Nov 2022 11:17:21 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.9.15"},{"key":"Content-Type","value":"application/json"},{"key":"Allow","value":"POST, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"111"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"custom_id\": \"abelia chinensis on window\",\n    \"id\": \"61e7450e-1afe-49a3-937f-6d6e86a5b387\",\n    \"pid\": \"abelia chinensis\"\n}"}],"_postman_id":"7ece7402-3c6f-4ed3-851e-9128c1726935"},{"name":"3. Plant-data Upload","id":"5059cef1-8ddf-4e84-a637-6fdf138ef483","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"token_str_here"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"docType\": \"jts\",\n    \"version\": \"1.0\",\n    \"header\": {\n        \"columns\": {\n            \"0\": {\n                \"id\": \"\",\n                \"name\": \"temp\",\n                \"dataType\": \"NUMBER\",\n                \"format\": \"0.#\"\n            },\n            \"1\": {\n                \"id\": \"\",\n                \"name\": \"soil_moist\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"2\": {\n                \"id\": \"\",\n                \"name\": \"soil_ec\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"3\": {\n                \"id\": \"\",\n                \"name\": \"light_lux\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"4\": {\n                \"id\": \"\",\n                \"name\": \"env_humid\",\n                \"dataType\": \"NUMBER\"\n            }\n        }\n    },\n    \"data\": [\n        {\n            \"ts\": \"2022-08-16T02:05:40.000+1000\",\n            \"f\": {\n                \"0\": {\n                    \"v\": 10.4\n                },\n                \"1\": {\n                    \"v\": 55\n                },\n                \"2\": {\n                    \"v\": 23\n                },\n                \"3\": {\n                    \"v\": 2222\n                }\n            }\n        },\n        {\n            \"ts\": \"2022-08-16T02:06:40+1000\",\n            \"f\": {\n                \"0\": {\n                    \"v\": 12\n                },\n                \"1\": {\n                    \"v\": 55\n                }\n            }\n        },\n        {\n            \"ts\": \"2022-08-16T02:07:40+1000\",\n            \"f\": {\n                \"0\": {\n                    \"v\": 99\n                }\n            }\n        },\n        {\n            \"ts\": \"2022-08-16T02:08:40+1000\",\n            \"f\": {\n                \"0\": {\n                    \"v\": 28.22\n                }\n            }\n        },\n        {\n            \"ts\": \"2022-08-16T02:09:40+1000\",\n            \"f\": {\n                \"0\": {\n                    \"v\": 30.2\n                }\n            }\n        },\n        {\n            \"ts\": \"2022-08-16T02:10:40+1000\",\n            \"f\": {\n                \"0\": {\n                    \"v\": 29.2\n                }\n            }\n        },\n        {\n            \"ts\": \"2022-08-16T02:11:40+1000\",\n            \"f\": {\n                \"0\": {\n                    \"v\": 29.18\n                }\n            }\n        }\n    ]\n}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/sensor-data/upload","description":"<h1 id=\"sensor-data-upload\">Sensor data upload</h1>\n<p>Upload plants sensor data using JSON-time-series (JTS) protocol.\nFormal specification: <a href=\"https://docs.eagle.io/en/latest/reference/historic/jts.html\">https://docs.eagle.io/en/latest/reference/historic/jts.html</a></p>\n<p>Libraries to handle the specification:</p>\n<ul>\n<li>JavaScript: <a href=\"https://github.com/eagle-io/timeseries\">https://github.com/eagle-io/timeseries</a></li>\n<li>Python: <a href=\"https://github.com/slaxor505/json-timeseries-py\">https://github.com/slaxor505/json-timeseries-py</a></li>\n</ul>\n<p>To bind sensor data to a particular plant, Plant-Instance ID is used as  which needs to be registered first with \"Plant-Instance Register\" API call first.</p>\n<p>The endpoint supports \"dry_run=true\" query parameter. It instructs API to only validate JTS payload and does not commit values to the database. Please use it when developing/testing integration with mock or test data. It helps to keep DB in order and only store valid sensors data.</p>\n<p>Plantbook API specific JTS Document specification:</p>\n<h3 id=\"header-required\">Header (required)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Attribute</th>\n<th>Example</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>docType</td>\n<td>jts</td>\n<td>Required. Must be ‘jts’</td>\n</tr>\n<tr>\n<td>version</td>\n<td>1.0</td>\n<td>Required. Version ‘1.0’ supported</td>\n</tr>\n<tr>\n<td>header</td>\n<td></td>\n<td>Required. Object describing document data</td>\n</tr>\n<tr>\n<td>data</td>\n<td></td>\n<td>Required. Array of historic records in chronological order</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"header-columns-required\">Header Columns (required)</h3>\n<p>Below is only supported and defaults values of optional attributes if they are not specified</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Column Attribute</th>\n<th>Default</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>id</td>\n<td></td>\n<td>(Required) Plant-Instance ID (UUID)</td>\n</tr>\n<tr>\n<td>name</td>\n<td></td>\n<td>(Required) Name of sensor measurement. For supported values see below \"Units and Measurement\".</td>\n</tr>\n<tr>\n<td>dataType</td>\n<td></td>\n<td>(Required) Data type of associated node. Supported values: [NUMBER]</td>\n</tr>\n<tr>\n<td>renderType</td>\n<td>VALUE</td>\n<td>Rendering of ‘v’ attribute in records. Supported values: [VALUE]</td>\n</tr>\n<tr>\n<td>format</td>\n<td>0.#</td>\n<td>Format of the value. Supported values: [0.#]</td>\n</tr>\n</tbody>\n</table>\n</div><p>Note: if column attribute is omitted the it will be set to default value.</p>\n<p><strong>Units and Measurement.</strong> The units are the same as in DB. Currently unit conversion is not support so all the units needs to be converted prior uploading to supported ones.</p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Measurement value name</th>\n<th>Unit</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>soil_ec</td>\n<td>µS/cm</td>\n<td>Soil conductivity</td>\n</tr>\n<tr>\n<td>env_humid</td>\n<td>%</td>\n<td>Air humidity</td>\n</tr>\n<tr>\n<td>soil_moist</td>\n<td>%</td>\n<td>Soil moisture</td>\n</tr>\n<tr>\n<td>light_lux</td>\n<td>lux</td>\n<td>Light lux</td>\n</tr>\n<tr>\n<td>temp</td>\n<td>degrees C</td>\n<td>Environment temperature</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"data-required\">Data (required)</h3>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Record Attribute</th>\n<th>Example</th>\n<th>Description</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>ts</td>\n<td>2018-08-16T02:00:00.000+11:00</td>\n<td>(Required) ISO8601 timestamp of data point(s) <strong>IMPORTANT!</strong> Send timestamp with information about original TimeZone. Do not convert to UTC. Otherwise, TZ will be lost and it will be not impossible to determine day/night time for the plant.</td>\n</tr>\n<tr>\n<td>f</td>\n<td></td>\n<td>(Required) Object containing data for 1 or more columns (using column index as key)</td>\n</tr>\n<tr>\n<td>v</td>\n<td>10.4</td>\n<td>(Required) Value of column for the corresponding record timestamp Data type should match dataType option in header.</td>\n</tr>\n</tbody>\n</table>\n</div><h2 id=\"returns\">Returns:</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>200 - Successfully uploaded.\n400 - Malformed request. See detail field for specifics about a problem. E.g.: if validation or parsing failed. \n</code></pre><p>Note: JSON-schema validation returns pretty comprehensive error description which include lots of escaped text so it is recommended to unescape it for a better readability using for example <a href=\"https://onlinetexttools.com/unescape-text\">https://onlinetexttools.com/unescape-text</a></p>\n","urlObject":{"path":["api","v1","sensor-data","upload"],"host":["https://open.plantbook.io"],"query":[{"disabled":true,"description":{"content":"<p>Instructs API to only validate JTS payload but does not commit values to the database.</p>\n","type":"text/plain"},"key":"dry_run","value":"true"}],"variable":[]}},"response":[{"id":"eeae3627-beb7-4561-b187-c6247e79e559","name":"Plant-data Upload","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"docType\": \"jts\",\n    \"version\": \"1.0\",\n    \"header\": {\n        \"columns\": {\n            \"0\": {\n                \"id\": \"421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"temp\",\n                \"dataType\": \"NUMBER\",\n                \"format\": \"0.#\"\n            },\n            \"1\": {\n                \"id\": \"421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"soil_moist\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"2\": {\n                \"id\": \"421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"soil_ec\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"3\": {\n                \"id\": \"{421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"light_lux\",\n                \"dataType\": \"NUMBER\"\n            }\n        }\n    },\n    \"data\": [\n        {\n            \"ts\": \"2022-08-16T02:05:40.000+1000\",\n            \"f\": {\n                \"0\": {\"v\": 10.4},\n                \"1\": {\"v\": 55},\n                \"2\": {\"v\": 23},\n                \"3\": {\"v\": 2222}\n            }\n        },\n        {\n            \"ts\": \"2022-08-16T02:06:40+1000\",\n            \"f\": { \"0\": {\"v\": 12}, \"1\": {\"v\": 55} }\n        },\n        {\n            \"ts\": \"2022-08-16T02:07:40+1000\",\n            \"f\": { \"0\": {\"v\": 99} }\n        },\n        {\n            \"ts\": \"2022-08-16T02:08:40+1000\",\n            \"f\": { \"0\": {\"v\": 28.22 } }\n        },\n        {\n            \"ts\": \"2022-08-16T02:09:40+1000\",\n            \"f\": { \"0\": {\"v\": 30.2 } }\n        },\n        {\n            \"ts\": \"2022-08-16T02:10:40+1000\",\n            \"f\": { \"0\": {\"v\": 29.2 } }\n        },\n        {\n            \"ts\": \"2022-08-16T02:11:40+1000\",\n            \"f\": { \"0\": {\"v\": 29.18 } }\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":{"raw":"https://open.plantbook.io/api/v1/sensor-data/upload","host":["https://open.plantbook.io"],"path":["api","v1","sensor-data","upload"],"query":[{"key":"dry_run","value":"true","description":"Instructs API to only validate JTS payload but does not commit values to the database.","disabled":true}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null},{"id":"c51d6a0d-ca33-4670-a5b0-5b160e2c786c","name":"Plant-data Upload Multiple Instances","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"docType\": \"jts\",\n    \"version\": \"1.0\",\n    \"header\": {\n        \"columns\": {\n            \"0\": {\n                \"id\": \"421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"temp\",\n                \"dataType\": \"NUMBER\",\n                \"format\": \"0.#\"\n            },\n            \"1\": {\n                \"id\": \"421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"soil_moist\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"2\": {\n                \"id\": \"421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"soil_ec\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"3\": {\n                \"id\": \"421c8a5c-f619-4da6-ba57-ca361a47cfb0\",\n                \"name\": \"light_lux\",\n                \"dataType\": \"NUMBER\"\n            },\n            \"4\": {\n                \"id\": \"61e7450e-1afe-49a3-937f-6d6e86a5b387\",\n                \"name\": \"temp\"\n            },\n            \"5\": {\n                \"id\": \"61e7450e-1afe-49a3-937f-6d6e86a5b387\",\n                \"name\": \"soil_moist\"\n            }\n        }\n    },\n    \"data\": [\n        {\n            \"ts\": \"2018-08-16T02:05:40.000+1000\",\n            \"f\": {\n                \"0\": {\"v\": 10.4},\n                \"1\": {\"v\": 55},\n                \"2\": {\"v\": 23},\n                \"3\": {\"v\": 2222},\n                \"4\": {\"v\": 22},\n                \"5\": {\"v\": 33}\n            }\n        },\n        {\n            \"ts\": \"2018-08-16T02:06:40+1000\",\n            \"f\": { \"0\": {\"v\": 12}, \"1\": {\"v\": 55} }\n        },\n        {\n            \"ts\": \"2018-08-16T02:07:40+1000\",\n            \"f\": { \"0\": {\"v\": 99} }\n        },\n        {\n            \"ts\": \"2018-08-16T02:08:40+1000\",\n            \"f\": { \"0\": {\"v\": 28.22 } }\n        },\n        {\n            \"ts\": \"2018-08-16T02:09:40+1000\",\n            \"f\": { \"0\": {\"v\": 30.2 } }\n        },\n        {\n            \"ts\": \"2018-08-16T02:10:40+1000\",\n            \"f\": { \"0\": {\"v\": 29.2 } }\n        },\n        {\n            \"ts\": \"2018-08-16T02:11:40+1000\",\n            \"f\": { \"0\": {\"v\": 29.18 } }\n        }\n    ]\n}\n","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/sensor-data/upload"},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"5059cef1-8ddf-4e84-a637-6fdf138ef483"}],"id":"9728f561-a05b-4886-ba29-25722819150c","description":"<p>Plants' sensors data upload API calls.</p>\n<p>The feature allows users to share their own and see other users plants' sensor data. For example, if you grow Rose in Norway then you will be able to see environment conditions where these Roses are grown around the world. Moreover, you are not limited to the plants you have, and you will be able to see all users plants sensor’s data which Plantbook have been collected. It will include location (a country and perhaps city) where a particular plant grows bundled with its sensor data.</p>\n<p>The motivation for users to share their plant’s sensor data is if you are not sharing anything then you won’t see any sensor data from other users. Displayed information is going to be anonymous and only include approximate location, sensor data and related plant.</p>\n<p><a href=\"https://github.com/slaxor505/OpenPlantbook-client/blob/master/python/sensor-upload.py\">Sample Python code</a></p>\n","_postman_id":"9728f561-a05b-4886-ba29-25722819150c"},{"name":"1. Authentication","item":[{"name":"OAuth2 Client-Credentials OAuth Grant - Get token","event":[{"listen":"test","script":{"id":"8c1a6cb9-eb19-488d-a6cf-5983d433a1f9","exec":["if (pm.response.code == 200) {","    pm.test(\"Get inital access token\", function () {","        var response = pm.response.json();","        pm.collectionVariables.set(\"accessToken\", response.access_token);","    });","}"],"type":"text/javascript","packages":{}}}],"id":"69cb29d9-a9fe-42f2-8ed1-a92a28ffeb7f","protocolProfileBehavior":{"disableBodyPruning":true,"strictSSL":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"key":"grant_type","type":"text","value":"client_credentials"},{"description":"<p>Client ID from \"API keys\" in open.plantbook.io UI</p>\n","key":"client_id","type":"text","value":"client_id_here"},{"description":"<p>Client Secret from \"API keys\" in open.plantbook.io UI</p>\n","key":"client_secret","type":"text","value":"client_secret_here"},{"key":"scope","value":"read","type":"text","disabled":true}]},"url":"https://open.plantbook.io/api/v1/token/","description":"<p>Request OAuth2 access token to make API calls.<br />This is first step to work with the API. The token valid for \"expires_in\" seconds (value in the token) hence there is no need to request new token within this period.</p>\n","urlObject":{"path":["api","v1","token",""],"host":["https://open.plantbook.io"],"query":[],"variable":[]}},"response":[{"id":"f7b365d1-cd96-4bfd-bea3-9012ff7fd74d","name":"Get token Client Creds","originalRequest":{"method":"POST","header":[],"body":{"mode":"formdata","formdata":[{"description":"Must be literaly string \"client_credentials\" - determines OAuth grant type","key":"grant_type","type":"text","value":"client_credentials"},{"description":"Client ID from \"API keys\" in open.plantbook.io UI","key":"client_id","type":"text","value":"client_id_here"},{"description":"Client Secret from \"API keys\" in open.plantbook.io UI","key":"client_secret","type":"text","value":"client_secret_here"},{"key":"scope","value":"read","type":"text","disabled":true}]},"url":"https://open.plantbook.io/api/v1/token/"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"access_token\": \"HZzB1P....PrDYxYO2Mt\",\n    \"expires_in\": 86400,\n    \"token_type\": \"Bearer\",\n    \"scope\": \"read write\"\n}"},{"id":"73bb24f8-6c57-4a4f-bde1-bfe7fa041529","name":"OAuth token usage - Plant Search","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer NjJeh5Ew9arEiJKLU8zJELukbxebew","description":"Token value received from /api/v1/token/ endpoint with keyword \"Bearer\"","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"http://localhost:8000/api/v1/plant/search?alias=acer","protocol":"http","host":["localhost"],"port":"8000","path":["api","v1","plant","search"],"query":[{"key":"alias","value":"acer","description":"search string"},{"key":"userplant","value":"true","description":"True - search and return only user-plants, False - search and return only public-plants, absent - combined search user and public - return deduplicated result","type":"text","disabled":true}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"count\": 38,\n    \"next\": \"http://localhost:8000/api/v1/plant/search?alias=acer&limit=3&offset=23\",\n    \"previous\": \"http://localhost:8000/api/v1/plant/search?alias=acer&limit=3&offset=17\",\n    \"results\": [\n        {\n            \"pid\": \"acer pseudoplatanus\",\n            \"display_pid\": \"Acer pseudoplatanus\",\n            \"alias\": \"acer pseudoplatanus\",\n            \"category\": \"boom\"\n        },\n        {\n            \"pid\": \"acer rubrum\",\n            \"display_pid\": \"Acer rubrum\",\n            \"alias\": \"acer rubrum\",\n            \"category\": \"Aceraceae, Acer\"\n        },\n        {\n            \"pid\": \"acer rubrum 'franksred red sunset'\",\n            \"display_pid\": \"Acer rubrum 'Franksred Red Sunset'\",\n            \"alias\": \"acer rubrum franksred red sunset\",\n            \"category\": \"Aceraceae, Acer\"\n        }\n    ]\n}"},{"id":"836838d5-8feb-4d90-a541-4a1854006c7f","name":"API-key token usage - Plant Search","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Token 228d654c09c3a17106d5421eba175a9a15dca07e","description":"API-key token value from UI with keyword \"Token\""}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"https://open.plantbook.io/api/v1/plant/search?alias=acer","host":["https://open.plantbook.io"],"path":["api","v1","plant","search"],"query":[{"key":"userplant","value":"true","description":"True - search and return only user-plants, False - search and return only public-plants, absent - combined search user and public - return deduplicated result","disabled":true},{"key":"alias","value":"acer"}]}},"_postman_previewlanguage":null,"header":null,"cookie":[],"responseTime":null,"body":null}],"_postman_id":"69cb29d9-a9fe-42f2-8ed1-a92a28ffeb7f"}],"id":"56623c2d-7182-4b70-b31c-5cb8ed7b38c2","description":"<p>API supports two types of authentication:</p>\n<ul>\n<li>OAuth2 Client Credentials </li>\n<li>API-key</li>\n</ul>\n<p><strong>1) \"OAuth2 Client Credentials grant\".</strong></p>\n<p><strong>NOTE:</strong> This method is supported across all endpoints.</p>\n<p>The sequence:</p>\n<ul>\n<li>Generate ClientID and ClientSecret (client credentials) in UI.</li>\n<li>Using above Client's credentials, get OAuth2 Bearer token from API's token endpoint. The token is valid for limited time. So you need to request new token once it is expired (or prior any request for simplicity).</li>\n<li>Call API with the issued \"Bearer\" token. It is done with HTTP header \"Authorization\" and value of header consist key word \"Bearer\" and then token value.</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Bearer NjJeh5Ew9arEiJKLU9zJELukbxebew\n</code></pre><p>More information about OAuth \"Client Credentials\" grant: <a href=\"https://docs.pingidentity.com/bundle/developer/page/ixj1601508083821.html\">https://docs.pingidentity.com/bundle/developer/page/ixj1601508083821.html</a></p>\n<p><strong>2) \"API-key\" authentication.</strong></p>\n<p><strong>NOTE</strong> API-key is only supported for \"plant/search\" and \"plant/detail\" endpoints.</p>\n<p>This is simplified authentication based on permanent token which is generated when you enable \"API-key\" authentication in UI. This token will never expired and can be used infinite number of times. \nThe sequence:</p>\n<ul>\n<li>Enable \"Token\" authentication and take copy of permanent API-key token.</li>\n<li>Call API with the API-key token.\nIt is done with HTTP header \"Authorization\". The difference with OAuth authentication is that the KEY word is \"Token\"(!) and then token value.</li>\n</ul>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Authorization: Token 228d654c09c6a17006d5421eba175a9a15dca07e\n</code></pre>","_postman_id":"56623c2d-7182-4b70-b31c-5cb8ed7b38c2"},{"name":"2. Plant Search","id":"d8ed1e76-6866-493b-8ccf-dd8ee8688aa6","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"token_str_here"}]},"isInherited":false},"method":"GET","header":[],"body":{"mode":"formdata","formdata":[]},"url":"https://open.plantbook.io/api/v1/plant/search?alias=acer&limit=10&offset=20","description":"<h1 id=\"search-plants-by-text\">Search plants by text</h1>\n<p>Search any occurrences of text in \"display_pid\" and \"alias\" fields, and also Common names of plants.</p>\n<h1 id=\"query-parameters\">Query parameters:</h1>\n<ul>\n<li><p>'alias' - search string - MINIMUM LENGHT is 3 characters. This parameter is mandatory except when userplant=true. In this case endpoint returns all user's user-plants. Accepts UTF-8 string for multiligual common names search.<br />  <strong>Bear in mind</strong> that currently there is no indication that the search string matched a Plant's common name so the result include no reference to it hence the result can be confusing.</p>\n</li>\n<li><p>'userplant' - user/public plants search selector:<br />  true - search and return only user-plants belong to the current user,<br />  false - search and return only public-plants,<br />  if omitted - combined search across user own and public plants - returns deduplicated result</p>\n</li>\n</ul>\n<p>Deduplication algorithm works as:</p>\n<ol>\n<li><p>Search public-plants with a search string.</p>\n</li>\n<li><p>Search user-plants with a search string.</p>\n</li>\n<li><p>Exclude user-plants from public-plants list.</p>\n</li>\n<li><p>Also exclude public-plants which exist in user-plants but does not match search string.</p>\n</li>\n<li><p>Combine user-plants and public-plants in one list.</p>\n</li>\n</ol>\n<ul>\n<li>Pagination parameters: limit=X offset=Y <a href=\"https://www.django-rest-framework.org/api-guide/pagination/#limitoffsetpagination\">see here</a>.</li>\n</ul>\n","urlObject":{"path":["api","v1","plant","search"],"host":["https://open.plantbook.io"],"query":[{"description":{"content":"<p>search string</p>\n","type":"text/plain"},"key":"alias","value":"acer"},{"description":{"content":"<p>number of entries in the result</p>\n","type":"text/plain"},"key":"limit","value":"10"},{"description":{"content":"<p>results offset</p>\n","type":"text/plain"},"key":"offset","value":"20"},{"disabled":true,"description":{"content":"<p>True - search and return only user-plants, False - search and return only public-plants, absent - combined search user and public - return deduplicated result</p>\n","type":"text/plain"},"key":"userplant","value":"true"}],"variable":[]}},"response":[{"id":"695af052-e355-45f8-89e1-558e9389c8a5","name":"Plant Search","originalRequest":{"method":"GET","header":[{"key":"Authorization","value":"Bearer NjJeh5Ew9arEiJKLU8zJELukbxebew","description":"Token value received from /api/v1/token/ endpoint with keyword \"Bearer\"","type":"text"}],"body":{"mode":"formdata","formdata":[]},"url":{"raw":"http://localhost:8000/api/v1/plant/search?alias=acer&limit=10&offset=20","protocol":"http","host":["localhost"],"port":"8000","path":["api","v1","plant","search"],"query":[{"key":"alias","value":"acer","description":"search string"},{"key":"limit","value":"10","description":"number of entries in the result"},{"key":"offset","value":"20","description":"results offset"},{"key":"userplant","value":"true","description":"True - search and return only user-plants, False - search and return only public-plants, absent - combined search user and public - return deduplicated result","type":"text","disabled":true}]}},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"count\": 38,\n    \"next\": \"http://localhost:8000/api/v1/plant/search?alias=acer&limit=3&offset=23\",\n    \"previous\": \"http://localhost:8000/api/v1/plant/search?alias=acer&limit=3&offset=17\",\n    \"results\": [\n        {\n            \"pid\": \"acer pseudoplatanus\",\n            \"display_pid\": \"Acer pseudoplatanus\",\n            \"alias\": \"acer pseudoplatanus\",\n            \"category\": \"boom\"\n        },\n        {\n            \"pid\": \"acer rubrum\",\n            \"display_pid\": \"Acer rubrum\",\n            \"alias\": \"acer rubrum\",\n            \"category\": \"Aceraceae, Acer\"\n        },\n        {\n            \"pid\": \"acer rubrum 'franksred red sunset'\",\n            \"display_pid\": \"Acer rubrum 'Franksred Red Sunset'\",\n            \"alias\": \"acer rubrum franksred red sunset\",\n            \"category\": \"Aceraceae, Acer\"\n        }\n    ]\n}"}],"_postman_id":"d8ed1e76-6866-493b-8ccf-dd8ee8688aa6"},{"name":"3. Plant Details by Plant-ID","id":"c6cb33f4-e2c3-47d9-b086-786664db24d0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"token_str_here"}]},"isInherited":false},"method":"GET","header":[],"url":"https://open.plantbook.io/api/v1/plant/detail/acer buergerianum/","description":"<h2 id=\"get-plant-details\">Get plant details</h2>\n<p>Retrieve plant details and corresponding common names by \"pid\" (Plant ID) as: /api/v1/plant/detail/pid/</p>\n<p>E.g.:<br />/api/v1/plant/detail/acer buergerianum/</p>\n<h3 id=\"how-it-works\">How it works:</h3>\n<ul>\n<li><p>Endpoint searches own user-plants first. If found then returns the user_plant and add a field {\"user_plant\": True}</p>\n</li>\n<li><p>If no own user plants found then it searches public plants. If found the return public plant without adding extra field \"user_plant\".</p>\n</li>\n<li><p>Trialing slash is required!</p>\n</li>\n<li><p>Result will include {\"user_plant\": True} attribute if the plant is current user's own user-plant.</p>\n</li>\n<li><p>Result include {\"common_names\": []} JSON list of plant's common names. Non-English names are in UTF. See examples.</p>\n</li>\n</ul>\n<h3 id=\"language-parameter\">Language parameter:</h3>\n<ul>\n<li><p>The endpoint accepts an optional query parameter <code>lang</code> as either a 2-letter ISO 639-1 language code (<br />  e.g., \"en\") or a 5-character tag of the form ll-CC or ll_CC (e.g., \"en-GB\", \"pt_BR\"). Input is case-insensitive; the base language is normalized to lowercase.</p>\n</li>\n<li><p>If a common name exists for the requested language, the response <code>alias</code> field is overridden with that common name. When a regional tag is provided, the base language (ll) is used for the lookup.</p>\n</li>\n<li><p>Invalid <code>lang</code> values (e.g., empty, malformed, non-ISO language codes, or invalid country codes in ll-CC) result in HTTP 400 with a clear error message.</p>\n</li>\n</ul>\n<h3 id=\"cache-bust-parameter-for-api-images\">Cache-Bust Parameter for API Images</h3>\n<h4 id=\"problem-it-solves\">Problem it solves:</h4>\n<p>Plant images are stored at a <strong>deterministic path</strong>, so the URL never changes when an image is replaced. CDN caches responses aggressively, meaning the old image keeps being served even after a successful overwrite in Image Storage.</p>\n<h4 id=\"how-it-works-1\">How it works</h4>\n<p>The <code>image_url</code> property automatically appends a version query string whenever a custom image file is present:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-scheme\">https://opb-img.plantbook.io/rose.jpg?v=1711584000\n\n</code></pre>\n<p><strong>Version value selection (in priority order):</strong></p>\n<ol>\n<li><p><strong>Modified time</strong> — <code>?v=</code> from <code>storage.get_modified_time()</code>. Changes every time the file is overwritten.</p>\n</li>\n<li><p><strong>File size</strong> (fallback) — <code>?v=</code> if modified time is unavailable.</p>\n</li>\n<li><p><strong>No param</strong> — bare URL returned if both lookups fail.</p>\n</li>\n</ol>\n<blockquote>\n<p>Default/public plant images (no <code>image_file</code> set) use a static URL with no version param — they are not affected.</p>\n</blockquote>\n","urlObject":{"path":["api","v1","plant","detail","acer buergerianum",""],"host":["https://open.plantbook.io"],"query":[],"variable":[]}},"response":[{"id":"610a10e7-6945-46fb-b50e-b55548b5ab48","name":"Plant Details from Public plants","originalRequest":{"method":"GET","header":[],"url":"https://open.plantbook.io/api/v1/plant/detail/acer buergerianum/"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"pid\": \"acer buergerianum\",\n    \"display_pid\": \"Acer buergerianum\",\n    \"alias\": \"acer buergerianum\",\n    \"category\": \"Aceraceae, Acer\",\n    \"max_light_mmol\": 7200,\n    \"min_light_mmol\": 3000,\n    \"max_light_lux\": 75000,\n    \"min_light_lux\": 2800,\n    \"max_temp\": 35,\n    \"min_temp\": 5,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 30,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 15,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350,\n    \"image_url\": \"https://opb-img.plantbook.io/acer%20buergerianum.jpg\"\n}"},{"id":"fa5a1ca6-f868-4ec2-aeb8-7083543efcd1","name":"Plant Details from User plants","originalRequest":{"method":"GET","header":[],"url":"https://open.plantbook.io/api/v1/plant/detail/alcea 'carmine roset'/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Fri, 23 Sep 2022 09:29:36 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.9.14"},{"key":"Content-Type","value":"application/json"},{"key":"Vary","value":"Accept"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"447"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":"{\n    \"pid\": \"alcea 'carmine roset'\",\n    \"display_pid\": \"Alcea 'Carmine Roset'\",\n    \"alias\": \"alcea carmine roset\",\n    \"category\": \"dfghfdgdf\",\n    \"max_light_mmol\": 1111,\n    \"min_light_mmol\": 2500,\n    \"max_light_lux\": 30000,\n    \"min_light_lux\": 2500,\n    \"max_temp\": 32,\n    \"min_temp\": 10,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 30,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 15,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350,\n    \"image_url\": \"https://opb-img.plantbook.io/alcea%20%27carmine%20roset%27.jpg\",\n    \"user_plant\": true,\n    \"common_names\": []\n}"},{"id":"9bda9441-f7b1-4b8b-a67a-417c709b3712","name":"Plant Details with Common Names","originalRequest":{"method":"GET","header":[],"url":"https://open.plantbook.io/api/v1/plant/detail/acer buergerianum/"},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Mon, 22 Sep 2025 08:31:11 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Vary","value":"Accept, Accept-Language, origin"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Language","value":"en"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=1CQ4I0g9HM332sKeZckfr1l1o0sXpPvN6ZS8%2FxH8%2BvJmU6Uktq42Wcsg4fNyJjbZtWwC33ldCLrdjagL11Nn25wBLbSV%2FcP8dLr1sCs4tewr\"}]}"},{"key":"Content-Encoding","value":"br"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"983071cdbff7d634-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"pid\": \"acer buergerianum\",\n    \"display_pid\": \"Acer buergerianum\",\n    \"alias\": \"acer buergerianum\",\n    \"category\": \"Aceraceae, Acer\",\n    \"max_light_mmol\": 7200,\n    \"min_light_mmol\": 3000,\n    \"max_light_lux\": 75000,\n    \"min_light_lux\": 2800,\n    \"max_temp\": 35,\n    \"min_temp\": 5,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 30,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 15,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350,\n    \"image_url\": \"https://opb-img.plantbook.io/acer%20buergerianum.jpg\",\n    \"common_names\": [\n        {\n            \"name\": \"Acer lingii\",\n            \"language_code\": \"en\"\n        },\n        {\n            \"name\": \"Клён трёхраздельный\",\n            \"language_code\": \"ru\"\n        }\n    ]\n}"},{"id":"bc505476-e59d-4d47-972a-99d833157041","name":"Plant Details with LANG parameter","originalRequest":{"method":"GET","header":[],"url":{"raw":"https://open.plantbook.io/api/v1/plant/detail/acer buergerianum/?lang=ru","host":["https://open.plantbook.io"],"path":["api","v1","plant","detail","acer buergerianum",""],"query":[{"key":"lang","value":"ru"}]}},"status":"OK","code":200,"_postman_previewlanguage":null,"header":[{"key":"Date","value":"Mon, 22 Sep 2025 08:38:35 GMT"},{"key":"Content-Type","value":"application/json"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"Nel","value":"{\"report_to\":\"cf-nel\",\"success_fraction\":0.0,\"max_age\":604800}"},{"key":"Vary","value":"Accept, Accept-Language, origin"},{"key":"Allow","value":"GET, HEAD, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Language","value":"en"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"},{"key":"Cross-Origin-Opener-Policy","value":"same-origin"},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"group\":\"cf-nel\",\"max_age\":604800,\"endpoints\":[{\"url\":\"https://a.nel.cloudflare.com/report/v4?s=4mZv%2FhlndZiFsLp5GLMo%2FgHw9ei7NslcH%2Ba0Nl0B4kPI8A9YjgkPrGeCom6BYpeMYZDJvYDvFJBjJi5beJWn4UkG%2FPM5FOwAHxGFwjxz9sqf\"}]}"},{"key":"Content-Encoding","value":"br"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"98307ca14edac9ab-IAD"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"}],"cookie":[],"responseTime":null,"body":"{\n    \"pid\": \"acer buergerianum\",\n    \"display_pid\": \"Acer buergerianum\",\n    \"alias\": \"Клён трёхраздельный\",\n    \"category\": \"Aceraceae, Acer\",\n    \"max_light_mmol\": 7200,\n    \"min_light_mmol\": 3000,\n    \"max_light_lux\": 75000,\n    \"min_light_lux\": 2800,\n    \"max_temp\": 35,\n    \"min_temp\": 5,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 30,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 15,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350,\n    \"image_url\": \"https://opb-img.plantbook.io/acer%20buergerianum.jpg\",\n    \"common_names\": [\n        {\n            \"name\": \"Acer lingii\",\n            \"language_code\": \"en\"\n        },\n        {\n            \"name\": \"Клён трёхраздельный\",\n            \"language_code\": \"ru\"\n        }\n    ]\n}"}],"_postman_id":"c6cb33f4-e2c3-47d9-b086-786664db24d0"},{"name":"CREATE Plant","id":"4a6124aa-678c-4886-8994-9520980a33f2","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"token_str_here"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"display_pid\": \"Solanum lycopersicum\",\n    \"alias\": \"Tomato\",\n    \"category\": \"Tomato category\",\n    \"max_light_mmol\": 7600,\n    \"min_light_mmol\": 3200,\n    \"max_light_lux\": 55000,\n    \"min_light_lux\": 3000,\n    \"max_temp\": 33,\n    \"min_temp\": 12,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 15,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 20,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350\n}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/plant/create","description":"<h1 id=\"create-new-user-plant-or-modify-public-plant\">Create new user plant or modify public plant.</h1>\n<p>Accept JSON payload with parameters. See example.</p>\n<h2 id=\"mandatory-attributes\">Mandatory attributes:</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>&lt;display_pid&gt; - Scientific name of the plant. Based on this attribute &lt;pid&gt; (Plant ID) attribute will be automatically generated by lowering case of this attribute.\nE.g: &lt;display_pid&gt;=\"Tomato Red\" will result in &lt;pid&gt;=\"tomato red\". See postman example for details.\n</code></pre><p>All omitted non-mandatory attributes will have null value.</p>\n<h2 id=\"returns\">Returns:</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>201 - Successfully created.\n409 - Plant already exists either in user DB or main DB.\n400 - Malformed request e.g. if a mandatory attribute is not provided.\n</code></pre>","urlObject":{"path":["api","v1","plant","create"],"host":["https://open.plantbook.io"],"query":[],"variable":[]}},"response":[{"id":"57ea9611-2d5f-4dc6-a7d1-bf553ff539ae","name":"CREATE Plant","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"display_pid\": \"Solanum lycopersicum\",\n    \"alias\": \"Tomato\",\n    \"category\": \"Tomato category\",\n    \"max_light_mmol\": 7600,\n    \"min_light_mmol\": 3200,\n    \"max_light_lux\": 55000,\n    \"min_light_lux\": 3000,\n    \"max_temp\": 33,\n    \"min_temp\": 12,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 15,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 20,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350\n}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/plant/create"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"pid\": \"solanum lycopersicum\",\n    \"display_pid\": \"Solanum lycopersicum\",\n    \"alias\": \"Tomato\",\n    \"category\": \"Tomato category\",\n    \"max_light_mmol\": 7600,\n    \"min_light_mmol\": 3200,\n    \"max_light_lux\": 55000,\n    \"min_light_lux\": 3000,\n    \"max_temp\": 33,\n    \"min_temp\": 12,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 15,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 20,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350,\n    \"image_url\": \"https://opb-img.plantbook.io/solanum%20lycopersicum.jpg\",\n    \"user_plant\": true\n}"}],"_postman_id":"4a6124aa-678c-4886-8994-9520980a33f2"},{"name":"DELETE Plant","id":"4e47e18e-b35e-4d44-841e-3b228c8c6ac0","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"token_str_here"}]},"isInherited":false},"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"pid\": \"solanum lycopersicum\"\n}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/plant/delete","description":"<h1 id=\"delete-plant\">Delete plant</h1>\n<p>Delete plant from user-plants. Public-plants cannot be removed.</p>\n<h2 id=\"mandatory-attributes\">Mandatory attributes:</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>\"pid\" - Plant ID - unique plant identifier. Case SENSITIVE!\n</code></pre><h2 id=\"return\">Return:</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>204 - Successfully deleted.\n404 - Plant does not exist in user DB.\n400 - Malformed request e.g. if a mandatory attribute is not provided.    \n</code></pre><h2 id=\"known-issue\">Known issue:</h2>\n<p>It does not handle omitted mandatory attribute correctly and always return 404 Not Found even if \"pid\" is absent.</p>\n","urlObject":{"path":["api","v1","plant","delete"],"host":["https://open.plantbook.io"],"query":[],"variable":[]}},"response":[{"id":"ba6433c6-9be8-4c42-90f2-2bf758317a78","name":"DELETE Plant","originalRequest":{"method":"DELETE","header":[],"body":{"mode":"raw","raw":"{\n    \"pid\": \"solanum lycopersicum\"\n}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/plant/delete"},"status":"No Content","code":204,"_postman_previewlanguage":"plain","header":[{"key":"Date","value":"Sun, 18 Sep 2022 10:59:01 GMT"},{"key":"Server","value":"WSGIServer/0.2 CPython/3.9.13"},{"key":"Allow","value":"DELETE, OPTIONS"},{"key":"X-Frame-Options","value":"DENY"},{"key":"Content-Length","value":"0"},{"key":"X-Content-Type-Options","value":"nosniff"},{"key":"Referrer-Policy","value":"same-origin"}],"cookie":[],"responseTime":null,"body":null}],"_postman_id":"4e47e18e-b35e-4d44-841e-3b228c8c6ac0"},{"name":"UPDATE Plant","id":"415f8bdd-0d7d-448f-b22f-e6b0e0493005","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"token_str_here"}]},"isInherited":false},"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"pid\": \"acer pseudoplatanus\",\n    \"max_light_mmol\": 1111,\n    \"min_light_mmol\": 2222,\n    \"max_light_lux\": 4444,\n    \"min_light_lux\": 3333,\n    \"max_temp\": 66,\n    \"min_temp\": 55\n}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/plant/update","description":"<h1 id=\"update-plant\">Update plant</h1>\n<p>Method updates either user-plant or public-plant using JSON payload.\nUser-plant is attempted to update first. If user-plant not found then API searches 'pid' in public-plants. If found in public-plants then the public plant will be cloned and saved as user-plant with requested changes.</p>\n<p>Endpoint supports PATCH (partial update - updates only provided attributes), PUT is not supported</p>\n<h2 id=\"mandatory-attributes\">Mandatory attributes:</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>- \"pid\" - Plant ID is unique plant identifier. Case SENSITIVE!\n- at least 1 field with plant's attribute is required. This is to avoid dull duplicates.\n</code></pre><h2 id=\"returns\">Returns:</h2>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>200 - Successfully updated.\n404 - Plant exist neither in user-plants nor in public-plants\n400 - Malformed request e.g. if a mandatory attribute is not provided. \n\n</code></pre>","urlObject":{"path":["api","v1","plant","update"],"host":["https://open.plantbook.io"],"query":[],"variable":[]}},"response":[{"id":"2b5715b2-8464-458e-b221-fdf18c2d4a72","name":"UPDATE Plant","originalRequest":{"method":"PATCH","header":[],"body":{"mode":"raw","raw":"{\n    \"pid\": \"acer pseudoplatanus\",\n    \"max_light_mmol\": 1111,\n    \"min_light_mmol\": 2222,\n    \"max_light_lux\": 4444,\n    \"min_light_lux\": 3333,\n    \"max_temp\": 66,\n    \"min_temp\": 55\n}","options":{"raw":{"language":"json"}}},"url":"https://open.plantbook.io/api/v1/plant/update"},"_postman_previewlanguage":"json","header":null,"cookie":[],"responseTime":null,"body":"{\n    \"pid\": \"acer pseudoplatanus\",\n    \"display_pid\": \"Acer pseudoplatanus\",\n    \"alias\": \"acer pseudoplatanus\",\n    \"category\": \"boom\",\n    \"max_light_mmol\": 1111,\n    \"min_light_mmol\": 2222,\n    \"max_light_lux\": 4444,\n    \"min_light_lux\": 3333,\n    \"max_temp\": 66,\n    \"min_temp\": 55,\n    \"max_env_humid\": 80,\n    \"min_env_humid\": 30,\n    \"max_soil_moist\": 60,\n    \"min_soil_moist\": 15,\n    \"max_soil_ec\": 2000,\n    \"min_soil_ec\": 350,\n    \"image_url\": \"https://opb-img.plantbook.io/acer%20pseudoplatanus.jpg\",\n    \"user_plant\": true\n}"}],"_postman_id":"415f8bdd-0d7d-448f-b22f-e6b0e0493005"}],"event":[{"listen":"prerequest","script":{"id":"b9d402da-7cd7-46ae-a58b-b3d1ff194e93","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"d8e1d30b-158e-4b11-a32a-984e7ea563f0","type":"text/javascript","exec":[""]}}],"variable":[{"key":"oauth_client","value":"client_id_here"},{"key":"oauth_client_secret","value":"client_secret_here"},{"key":"accessToken","value":"token_str_here"},{"key":"url","value":"https://open.plantbook.io"},{"key":"PlantInstaceID","value":""},{"key":"PlantInstanceID","value":""}]}