API

GenFarmer API Documentation

Welcome to the GenFarmer API documentation. This guide helps you understand how to interact with the GenFarmer automation system via RESTful APIs.


🧠 Overview

GenFarmer provides endpoints to manage Automation Apps, Tasks, and Runs that can be assigned to devices for automation scenarios.


πŸ“¦ Base URL

http://127.0.0.1:55554/

πŸ“ Automation APIs

πŸ” List Apps

  • Method: GET

  • Endpoint: /automation/apps

cURL Example:

curl -X GET 'http://127.0.0.1:55554/automation/apps?userId=3&page=1&limit=25&order=desc&orderBy=updatedAt'

πŸ” Get App Details

  • Method: GET

  • Endpoint: /automation/apps/:id

cURL Example:

πŸ”§ Update App

  • Method: PUT

  • Endpoint: /automation/apps

cURL Example:

❌ Delete App

  • Method: DELETE

  • Endpoint: /automation/apps

cURL Example:


🧾 Task APIs

βž• Create Task

  • Method: POST

  • Endpoint: /automation/tasks

cURL Example:

πŸ“„ List Tasks

  • Method: GET

  • Endpoint: /automation/runs

cURL Example:

πŸ›  Update Task

  • Method: PUT

  • Endpoint: /automation/tasks/:id

cURL Example:

πŸ”— Assign Devices to Task

  • Method: PUT

  • Endpoint: /automation/tasks/:id/add-devices

cURL Example:

πŸ”— Remove Devices from Task

  • Method: PUT

  • Endpoint: /automation/tasks/:id/remove-devices

πŸ—‘ Delete Task

  • Method: DELETE

  • Endpoint: /automation/tasks

cURL Example:


πŸš€ Run APIs

▢️ Create Run

  • Method: POST

  • Endpoint: /automation/runs

cURL Example:

▢️ Execute Run

  • Method: PUT

  • Endpoint: /automation/runs/:id/run

cURL Example:

πŸ“Š Get Run Output

  • Method: GET

  • Endpoint: /automation/runs/:id/storages

cURL Example:


πŸ‘€ Me API

πŸ™‹β€β™‚οΈ Get Current User

  • Method: GET

  • Endpoint: /backend/auth/me

cURL Example:


πŸ“˜ Notes

  • Replace all :id placeholders with the actual id of your app, task, or run.

  • The script.flow field in Update App allows defining an automation logic visually using nodes and edges.


πŸ“₯ Download Postman Collection

πŸ“ž Support

For further help, please contact the GenFarmer support team.

Last updated