### Get Plant Details API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Returns the default and custom attributes for a specified plant. ```http ANY /api/plants/get?plant=(plant ID) ``` -------------------------------- ### Get Plant List API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Retrieves a list of plants from a specific location, with options for limiting results, starting from a specific ID, and sorting. ```http ANY /api/plants/list?location=(plant location ID)&limit=(max amount of returned results)&from=(start from this ID)&sort=(asc/desc) ``` -------------------------------- ### Get Location List API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Retrieves a list of active locations, with options to include plants and additional information. Pagination is supported. ```http ANY /api/locations/list?only_active=(boolean)&include_plants=(boolean)&include_info=(string)&paginate=(number)&limit=(number) ``` -------------------------------- ### Get Location Info API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Fetches detailed information for a specific location, with an option to include associated plants. ```http ANY /api/locations/info?location=(location ID)&include_plants(boolean) ``` -------------------------------- ### Perform Backup Import API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Executes an import of a backup package. The package must be provided as a zip file. ```HTTP POST /api/backup/import?locations=(boolean)&plants=(boolean)&gallery=(boolean)&tasks=(boolean)&inventory=(boolean)&calendar=(boolean) FILE IDENT: "import" (zip) ``` -------------------------------- ### Perform Backup Export API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Initiates an export of selected resources and provides a URL to the resulting package upon success. ```HTTP ANY /api/backup/export?locations=(boolean)&plants=(boolean)&gallery=(boolean)&tasks=(boolean)&inventory=(boolean)&calendar=(boolean) ``` -------------------------------- ### Add New Task API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Creates a new task, requiring a title and description. Optional fields include a due date and a linked plant ID. ```http ANY /api/tasks/add?title=(title text)&description=(task description)&due_date=(Optional due date)&plant=(optional linked plant ID) ``` -------------------------------- ### Backup API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for performing data exports and imports. ```APIDOC ## Perform an export ### Description Creates an export with the given resources and returns the URL to the package on success. ### Method ANY ### Endpoint /api/backup/export ### Parameters #### Query Parameters - **locations** (boolean) - Required - Include locations in export. - **plants** (boolean) - Required - Include plants in export. - **gallery** (boolean) - Required - Include gallery in export. - **tasks** (boolean) - Required - Include tasks in export. - **inventory** (boolean) - Required - Include inventory in export. - **calendar** (boolean) - Required - Include calendar in export. ## Perform an import ### Description Performs an import of a backup package. ### Method POST ### Endpoint /api/backup/import ### Parameters #### Query Parameters - **locations** (boolean) - Required - Include locations in import. - **plants** (boolean) - Required - Include plants in import. - **gallery** (boolean) - Required - Include gallery in import. - **tasks** (boolean) - Required - Include tasks in import. - **inventory** (boolean) - Required - Include inventory in import. - **calendar** (boolean) - Required - Include calendar in import. ### Request Body - **import** (file) - Required - Zip file for import. ``` -------------------------------- ### Fetch Plant Log API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Retrieves the log entries for a specific plant, with options for pagination and limiting the number of returned entries. ```http ANY /api/plants/log/fetch?plant=(plant ID)&paginate=(starting number, descending order)&limit=(amount of maximum returned entries) ``` -------------------------------- ### Define Pixelart Theme Configuration Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/themes.md This JSON defines the structure and assets for a theme named 'pixelart'. It specifies the banner image, rules for its display, and optional icon and accessory assets with their respective positioning and styling. ```json { "name": "pixelart", "banner": "banner.jpg", "rules": { "height": "250px" }, "icon": { "asset": "banner-icon.png", "base": { "top": "210px", "left": "195px" }, "img": { "width": "72px", height": "72px" } }, "accessory": { "asset": "banner-accessory.png", "base": { "top": "172px", "right": "-83%" }, "img": { "width": "256px", height": "256px" } } } ``` -------------------------------- ### Update Plant Photo API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Updates a plant's preview photo, either by uploading a file or linking to an external URL. Set 'external' to 1 for external links. ```http ANY /api/plants/photo/update?plant=(plant ID)&external=0/1&photo=(link or photo file via POST) ``` -------------------------------- ### Fetch Inventory API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Retrieves the entire inventory list. ```http ANY /api/inventory/fetch ``` -------------------------------- ### API Authentication Token Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md All API calls require a 'token' parameter with your API key. This is a general requirement for all endpoints. ```text ?token=(your API token) ``` -------------------------------- ### Tasks API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for managing tasks. ```APIDOC ## GET /api/tasks/fetch ### Description Fetches a list of tasks. ### Method GET ### Endpoint /api/tasks/fetch ### Query Parameters - **done** (0/1) - Optional - Filter for completed (1) or incomplete (0) tasks. - **limit** (number) - Optional - Maximum amount of returned entries. ### Response #### Success Response (200) - **tasks** (array) - List of task objects. ### Response Example { "tasks": [ { "id": 1, "title": "Water the plants", "description": "Water all indoor plants.", "due_date": "2024-05-20", "done": 0 } ] } ## POST /api/tasks/add ### Description Adds a new task. ### Method POST ### Endpoint /api/tasks/add ### Query Parameters - **title** (string) - Required - The title of the task. - **description** (string) - Optional - The description of the task. - **due_date** (string) - Optional - The due date for the task (YYYY-MM-DD). - **plant** (number) - Optional - The ID of a plant to link to this task. ## PUT /api/tasks/edit ### Description Edit an existing task. ### Method PUT ### Endpoint /api/tasks/edit ### Query Parameters - **task** (task ID) - Required - The ID of the task to edit. - **title** (string) - Optional - The new title for the task. - **description** (string) - Optional - The new description for the task. - **due_date** (string) - Optional - The new due date for the task (YYYY-MM-DD). - **done** (0/1) - Optional - Mark the task as done (1) or incomplete (0). ## DELETE /api/tasks/remove ### Description Remove an existing task. ### Method DELETE ### Endpoint /api/tasks/remove ### Query Parameters - **task** (task ID) - Required - The ID of the task to remove. ``` -------------------------------- ### Add Plant Log Entry API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Appends a new entry to a plant's log, requiring the plant ID and the content of the log entry. ```http ANY /api/plants/log/add?plant=(plant ID)&content=(Log content) ``` -------------------------------- ### Include Stylesheet in Theme Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/themes.md Use the 'include' attribute within a theme's JSON configuration to reference a custom stylesheet file. ```json "include": "styles.css" ``` -------------------------------- ### Add Plant API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Adds a new plant to the database, requiring a name and its associated location ID. ```http ANY /api/plants/add?name=(Name of plant)&location=(location ID) ``` -------------------------------- ### Add Gallery Photo API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Adds a photo to a plant's gallery, supporting uploads or external links. Includes an option to set a label for the item. ```http ANY /api/plants/gallery/add?plant=(plant ID)&label=(item label text)&external=0/1&photo=(link or photo file via POST) ``` -------------------------------- ### Inventory API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for retrieving inventory data. ```APIDOC ## GET /api/inventory/fetch ### Description Fetches the entire inventory. ### Method GET ### Endpoint /api/inventory/fetch ### Response #### Success Response (200) - **inventory** (array) - List of inventory items. ### Response Example { "inventory": [ { "id": 1, "name": "Fertilizer", "quantity": 5, "unit": "kg" } ] } ``` -------------------------------- ### Include JavaScript in Theme Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/themes.md Use the 'script' attribute within a theme's JSON configuration to reference a custom JavaScript file for custom behavior. ```json "script": "behaviour.js" ``` -------------------------------- ### Add Calendar Entry API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Adds a new event to the calendar with a name, date range, and class descriptor. ```HTTP ANY /api/calendar/add?name=(entry name)&date_from=(starting date of event)&date_till=(end date of event)&class=(event class descriptor) ``` -------------------------------- ### Share Photo API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/sharing.md Use this POST endpoint to share a photo. Include photo details, workspace information, privacy settings, and the image file itself. The response contains identifiers and URLs for the shared item. ```HTTP POST /api/photo/share ``` -------------------------------- ### Plants API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for managing plant data, including details, attributes, photos, and logs. ```APIDOC ## GET /api/plants/get ### Description Returns default and custom plant attributes of a plant. ### Method GET ### Endpoint /api/plants/get ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant. ### Response #### Success Response (200) - **plant_data** (object) - Object containing plant attributes. ## POST /api/plants/add ### Description Adds a new plant with base data. ### Method POST ### Endpoint /api/plants/add ### Query Parameters - **name** (string) - Required - The name of the plant. - **location** (location ID) - Required - The ID of the location where the plant is added. ### Response #### Success Response (200) - **plant_id** (number) - The ID of the newly added plant. ## PUT /api/plants/update ### Description Updates a default attribute of a plant. ### Method PUT ### Endpoint /api/plants/update ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant to update. - **attribute** (string) - Required - The name of the attribute to update. - **value** (string) - Required - The new value for the attribute. ## DELETE /api/plants/remove ### Description Deletes a plant from your database. To move a plant to history, use the update endpoint with `history = 1`. ### Method DELETE ### Endpoint /api/plants/remove ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant to delete. ## GET /api/plants/list ### Description Returns a plant list from a location. ### Method GET ### Endpoint /api/plants/list ### Query Parameters - **location** (location ID) - Required - The ID of the plant location. - **limit** (number) - Optional - Maximum amount of returned results. - **from** (number) - Optional - Start from this ID. - **sort** (string) - Optional - Sort order (`asc` or `desc`). ## GET /api/plants/search ### Description Search through the plant database. ### Method GET ### Endpoint /api/plants/search ### Query Parameters - **expression** (string) - Required - The search token. - **limit** (number) - Optional - Maximum amount of returned results. ## POST /api/plants/attributes/add ### Description Adds a custom plant attribute to a specific plant. ### Method POST ### Endpoint /api/plants/attributes/add ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant. - **label** (string) - Required - The label for the attribute. - **datatype** (string) - Required - The data type (`bool`, `int`, `double`, `string`, `datetime`). - **content** (string) - Required - The data content for the attribute. ## PUT /api/plants/attributes/edit ### Description Edits an existing custom plant attribute of a specific plant. ### Method PUT ### Endpoint /api/plants/attributes/edit ### Query Parameters - **attribute** (attribute ID) - Required - The ID of the attribute to edit. - **label** (string) - Required - The new label for the attribute. - **datatype** (string) - Required - The data type (`bool`, `int`, `double`, `string`, `datetime`). - **content** (string) - Required - The new data content for the attribute. ## DELETE /api/plants/attributes/remove ### Description Removes an existing custom plant attribute of a specific plant. ### Method DELETE ### Endpoint /api/plants/attributes/remove ### Query Parameters - **attribute** (attribute ID) - Required - The ID of the attribute to remove. ## POST /api/plants/photo/update ### Description Updates a plant's preview photo by uploading a photo or by linking an external photo. ### Method POST ### Endpoint /api/plants/photo/update ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant. - **external** (0/1) - Required - Set to 1 for external links, 0 for uploads. - **photo** (string/file) - Required - The URL of the external photo or the photo file via POST. ## POST /api/plants/gallery/add ### Description Upload a gallery photo or add an external photo. ### Method POST ### Endpoint /api/plants/gallery/add ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant. - **label** (string) - Optional - Text label for the gallery item. - **external** (0/1) - Required - Set to 1 for external links, 0 for uploads. - **photo** (string/file) - Required - The URL of the external photo or the photo file via POST. ## PUT /api/plants/gallery/edit ### Description Edit a gallery photo item. ### Method PUT ### Endpoint /api/plants/gallery/edit ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant. - **item** (gallery item ID) - Required - The ID of the gallery item to edit. - **label** (string) - Required - The new label for the item. ## DELETE /api/plants/gallery/remove ### Description Remove a gallery photo item. ### Method DELETE ### Endpoint /api/plants/gallery/remove ### Query Parameters - **item** (gallery item ID) - Required - The ID of the gallery item to remove. ## POST /api/plants/log/add ### Description Adds a new entry to a plant's log. ### Method POST ### Endpoint /api/plants/log/add ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant. - **content** (string) - Required - The content of the log entry. ## PUT /api/plants/log/edit ### Description Edits an existing entry of a plant's log. ### Method PUT ### Endpoint /api/plants/log/edit ### Query Parameters - **logid** (log item ID) - Required - The ID of the log entry to edit. - **content** (string) - Required - The new content for the log entry. ## DELETE /api/plants/log/remove ### Description Removes an existing entry of a plant's log. ### Method DELETE ### Endpoint /api/plants/log/remove ### Query Parameters - **logid** (log item ID) - Required - The ID of the log entry to remove. ## GET /api/plants/log/fetch ### Description Fetches the plant log of a specific plant. ### Method GET ### Endpoint /api/plants/log/fetch ### Query Parameters - **plant** (plant ID) - Required - The ID of the plant. - **paginate** (number) - Optional - Starting number for pagination (descending order). - **limit** (number) - Optional - Amount of maximum returned entries. ### Response #### Success Response (200) - **log_entries** (array) - List of log entry objects. ### Response Example { "log_entries": [ { "id": 1, "content": "Watered the plant.", "timestamp": "2023-10-27T10:00:00Z" } ] } ``` -------------------------------- ### Add Inventory Item API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Use this endpoint to add a new item to the inventory. The photo can be uploaded via POST. ```HTTP ANY /api/inventory/add?name=(item name)&description=(item description)&location=(Optional location text)&group=(group ident text)&photo=(Photo to be used, use POST for file uploads) ``` -------------------------------- ### Fetch Calendar Entries API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Retrieves calendar entries within a specified date range. Defaults to the current date and the next 30 days if not provided. ```HTTP ANY /api/calendar/fetch?date_from=(inclusive starting date, if not provided current date is used)&date_till=(inclusive end date, if not provided current date +30 days is used) ``` -------------------------------- ### Chat API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for fetching chat content and adding new chat messages. ```APIDOC ## Fetch chat content ### Description Fetches recent content of the chat. ### Method ANY ### Endpoint /api/chat/fetch ### Parameters #### Query Parameters - **limit** (integer) - Required - Maximum amount of returned chat messages. ## Add chat message ### Description Adds a new chat message using `System` as username. ### Method ANY ### Endpoint /api/chat/message/add ### Parameters #### Query Parameters - **message** (string) - Required - Message content. ``` -------------------------------- ### Calendar API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for managing calendar entries, including fetching, adding, editing, and removing entries. ```APIDOC ## Fetch calendar entries ### Description Fetches calendar entries between a specific date range. ### Method ANY ### Endpoint /api/calendar/fetch ### Parameters #### Query Parameters - **date_from** (date) - Optional - Inclusive starting date. If not provided, current date is used. - **date_till** (date) - Optional - Inclusive end date. If not provided, current date +30 days is used. ## Add calendar entry ### Description Add a new calendar entry. ### Method ANY ### Endpoint /api/calendar/add ### Parameters #### Query Parameters - **name** (string) - Required - Entry name. - **date_from** (date) - Required - Starting date of event. - **date_till** (date) - Required - End date of event. - **class** (string) - Required - Event class descriptor. ## Edit calendar entry ### Description Edit an existing calendar entry. ### Method ANY ### Endpoint /api/calendar/edit ### Parameters #### Query Parameters - **ident** (string) - Required - Entry item ID. - **name** (string) - Required - Entry name. - **date_from** (date) - Required - Starting date of event. - **date_till** (date) - Required - End date of event. - **class** (string) - Required - Event class descriptor. ## Remove calendar entry ### Description Remove an existing calendar entry. ### Method ANY ### Endpoint /api/calendar/remove ### Parameters #### Query Parameters - **ident** (string) - Required - Entry item ID. ``` -------------------------------- ### Inventory Management API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for managing inventory items, including adding, editing, incrementing/decrementing counts, and removing items. ```APIDOC ## Add new inventory item ### Description Adds a new inventory item. ### Method ANY ### Endpoint /api/inventory/add ### Parameters #### Query Parameters - **name** (string) - Required - Item name. - **description** (string) - Required - Item description. - **location** (string) - Optional - Location text. - **group** (string) - Required - Group identifier text. - **photo** (file) - Optional - Photo to be used. Use POST for file uploads. ## Edit inventory item ### Description Edit an existing inventory item. ### Method ANY ### Endpoint /api/inventory/edit ### Parameters #### Query Parameters - **item** (string) - Required - Item ID. - **name** (string) - Required - Item name. - **description** (string) - Required - Item description. - **amount** (number) - Required - Numeric value. - **location** (string) - Optional - Location text. - **group** (string) - Required - Group identifier text. - **photo** (file) - Optional - Photo to be used. Use POST for file uploads. ## Increment inventory item count ### Description Increments the inventory items count. ### Method ANY ### Endpoint /api/inventory/amount/inc ### Parameters #### Query Parameters - **item** (string) - Required - Item ID. ## Decrement inventory item count ### Description Decrements the inventory items count. ### Method ANY ### Endpoint /api/inventory/amount/dec ### Parameters #### Query Parameters - **item** (string) - Required - Item ID. ## Remove inventory item ### Description Remove an existing inventory item. ### Method ANY ### Endpoint /api/inventory/remove ### Parameters #### Query Parameters - **item** (string) - Required - Item ID. ``` -------------------------------- ### Share Photo API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/sharing.md This endpoint is used to share a photo with optional details and keywords. ```APIDOC ## POST /api/photo/share ### Description This endpoint is used to share a photo. ### Method POST ### Endpoint /api/photo/share ### Parameters #### Request Body - **title** (String) - Required - Title of photo - **workspace** (String) - Required - Name of workspace - **public** (Boolean) - Required - Whether a photo is public or private - **description** (String) - Optional - Description of the photo - **keywords** (String) - Optional - Keywords of the photo for categorization (separated by spaces) - **hortusfox_photo** (File resource) - Required - The actual sent image file ### Response #### Success Response (200) - **code** (Integer) - Status code - **data** (Object) - Contains details of the shared photo - **ident** (String) - Item identifier - **url** (String) - URL to photo (prettified) - **asset** (String) - Full URL to image asset - **public** (Boolean) - Flag to indicate if public or private #### Response Example ```json { "code": 200, "data": { "ident": "Item identifier", "url": "URL to photo (prettified)", "asset": "Full URL to image asset", "public": true } } ``` #### Error Response (500) - **code** (Integer) - Status code - **msg** (String) - String with further information #### Error Response Example ```json { "code": 500, "msg": "String with further information" } ``` ``` -------------------------------- ### Fetch Tasks API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Retrieves a list of tasks, with an option to filter by completion status (done/not done) and limit the number of results. ```http ANY /api/tasks/fetch?done=(0/1)&limit=(amount of maximum returned entries) ``` -------------------------------- ### Search Plants API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Searches the plant database using a provided expression and limits the number of returned results. ```http ANY /api/plants/search?expression=(search token)&limit=(max amount of returned results) ``` -------------------------------- ### API Success Response Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Standard JSON response for a successful API operation. May include additional data. ```JSON { "code": 200 } ``` ```JSON { "code": 200, "data": ... } ``` -------------------------------- ### Share Photo Success Response Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/sharing.md A successful photo sharing request returns a 200 status code with data including the item's identifier, a prettified URL, the full asset URL, and the public/private flag. ```JSON { "code": 200, "data": { "ident": "Item identifier", "url": "URL to photo (prettified)", "asset": "Full URL to image asset", "public": "Flag to indicate if public or private" } } ``` -------------------------------- ### Add Chat Message API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Appends a new message to the chat. This message will be attributed to the 'System' user. ```HTTP ANY /api/chat/message/add?message=(message content) ``` -------------------------------- ### Edit Gallery Photo API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Edits an existing gallery photo item for a plant, allowing updates to its label. ```http ANY /api/plants/gallery/edit?plant=(plant ID)&item=(gallery item ID)&label=(item label text) ``` -------------------------------- ### Remove Inventory Item API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Deletes an existing item from the inventory. ```HTTP ANY /api/inventory/remove?item=(item ID) ``` -------------------------------- ### Fetch Chat Content API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Retrieves recent chat messages, with an optional limit on the number of messages returned. ```HTTP ANY /api/chat/fetch?limit=(maximum amount of returned chat messages) ``` -------------------------------- ### Delete Plant API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Removes a plant from the database. To move a plant to history instead, use the update endpoint with 'history = 1'. ```http ANY /api/plants/remove?plant=(plant ID) ``` -------------------------------- ### Remove Photo Success Response Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/sharing.md A successful photo removal request returns a 200 status code. ```JSON { "code": 200 } ``` -------------------------------- ### Locations API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Endpoints for retrieving location data. ```APIDOC ## GET /api/locations/list ### Description Returns a list of locations. ### Method GET ### Endpoint /api/locations/list ### Query Parameters - **only_active** (boolean) - Optional - Filter for only active locations. - **include_plants** (boolean) - Optional - Include plants associated with each location. - **include_info** (string) - Optional - Specify information to include for each location. - **paginate** (number) - Optional - Enable pagination. - **limit** (number) - Optional - Maximum number of results to return. ### Response #### Success Response (200) - **locations** (array) - List of location objects. ### Response Example { "locations": [ { "id": 1, "name": "Garden Shed", "active": true, "plants": [] } ] } ## GET /api/locations/info ### Description Get details info of a location. ### Method GET ### Endpoint /api/locations/info ### Query Parameters - **location** (location ID) - Required - The ID of the location to retrieve. - **include_plants** (boolean) - Optional - Include plants associated with the location. ### Response #### Success Response (200) - **location_info** (object) - Detailed information about the location. ### Response Example { "location_info": { "id": 1, "name": "Garden Shed", "active": true, "plants": [] } } ``` -------------------------------- ### Edit Plant Log Entry API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Modifies an existing log entry for a plant, identified by its log ID and updated content. ```http ANY /api/plants/log/edit?logid=(log item ID)&content=(Log content) ``` -------------------------------- ### API Call Results Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Standardized responses for API calls, indicating success or failure. ```APIDOC ### Success Response ```json { "code": 200, "data": ... (optional, further data) } ``` ### Error Response ```json { "code": 500, "msg": "(Error message with further details)" } ``` ``` -------------------------------- ### Edit Inventory Item API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Modify an existing inventory item's details. The photo can be updated via POST. ```HTTP ANY /api/inventory/edit?item=(item ID)&name=(item name)&description=(item description)&amount=(numeric value)&location=(Optional location text)&group=(group ident text)&photo=(Photo to be used, use POST for file uploads) ``` -------------------------------- ### Add Custom Plant Attribute API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Adds a custom attribute to a specific plant, defining its label, data type, and content. ```http ANY /api/plants/attributes/add?plant=(plant ID)&label=(attribute label)&datatype=(bool/int/double/string/datetime)&content=(data content) ``` -------------------------------- ### API Error Response Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md JSON response indicating an API operation failure, including an error message. ```JSON { "code": 500, "msg": "(Error message with further details)" } ``` -------------------------------- ### Remove Plant Log Entry API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Deletes a specific log entry from a plant's log using its log ID. ```http ANY /api/plants/log/remove?logid=(log item ID) ``` -------------------------------- ### Remove Gallery Photo API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Removes a specific photo item from a plant's gallery using its item ID. ```http ANY /api/plants/gallery/remove?item=(gallery item ID) ``` -------------------------------- ### Edit Task API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Modifies an existing task, identified by its task ID. Allows updates to title, description, due date, and completion status. ```http ANY /api/tasks/edit?task=(task ID)&title=(title text)&description=(task description)&due_date=(Optional due date)&done=(0/1) ``` -------------------------------- ### Remove Photo API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/sharing.md This endpoint, accessible via ANY HTTP method, is used to remove a photo. It requires the photo's identifier and a return type indicator. ```HTTP ANY /api/photo/remove ``` -------------------------------- ### Increment Inventory Item Count API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Increases the quantity of a specified inventory item. ```HTTP ANY /api/inventory/amount/inc?item=(item ID) ``` -------------------------------- ### Remove Task API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Deletes an existing task from the system using its task ID. ```http ANY /api/tasks/remove?task=(task ID) ``` -------------------------------- ### Update Plant Default Attribute API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Modifies a default attribute of an existing plant. Specify the plant ID, attribute name, and the new value. ```http ANY /api/plants/update?plant=(plant ID)&attribute=(attribute name)&value=(new value) ``` -------------------------------- ### Edit Calendar Entry API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Modifies an existing calendar entry using its unique identifier. ```HTTP ANY /api/calendar/edit?ident=(entry item ID)&name=(entry name)&date_from=(starting date of event)&date_till=(end date of event)&class=(event class descriptor) ``` -------------------------------- ### Edit Custom Plant Attribute API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Modifies an existing custom plant attribute, allowing updates to its label, data type, and content. ```http ANY /api/plants/attributes/edit?attribute=(attribute ID)&label=(attribute label)&datatype=(bool/int/double/string/datetime)&content=(data content) ``` -------------------------------- ### Remove Photo API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/sharing.md This endpoint is used to remove a photo using its identifier. ```APIDOC ## ANY /api/photo/remove ### Description This endpoint is used to remove a photo upon request. ### Method ANY ### Endpoint /api/photo/remove ### Parameters #### Query Parameters - **ident** (String) - Required - Identifier of the photo (previously retrieved via `ident` property) - **ret** (String) - Required - Identifier of how to respond (Typical behaviour in this context is to return JSON) ### Response #### Success Response (200) - **code** (Integer) - Status code #### Response Example ```json { "code": 200 } ``` #### Error Response (500) - **code** (Integer) - Status code - **msg** (String) - String with further information #### Error Response Example ```json { "code": 500, "msg": "String with further information" } ``` ``` -------------------------------- ### Remove Calendar Entry API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Deletes a specific calendar entry by its identifier. ```HTTP ANY /api/calendar/remove?ident=(entry item ID) ``` -------------------------------- ### Share Photo Error Response Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/sharing.md An error during photo sharing will result in a non-200 status code, typically 500, with a message detailing the error. ```JSON { "code": 500, "msg": "String with further information" } ``` -------------------------------- ### Decrement Inventory Item Count API Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Decreases the quantity of a specified inventory item. ```HTTP ANY /api/inventory/amount/dec?item=(item ID) ``` -------------------------------- ### Remove Custom Plant Attribute API Endpoint Source: https://github.com/hortusfox/hortusfox.github.io/blob/main/api.md Deletes a custom plant attribute from a specific plant using its attribute ID. ```http ANY /api/plants/attributes/remove?attribute=(attribute ID) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.