microapp-backend

command module
v0.0.0-...-24d884a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 13, 2023 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

API Documentation

Base URL

http://<your-server-address>:1323

Endpoints

1. POST /data
  • Description: Receives and stores data from sensors.
  • Parameters:
    • sensorId: Unique ID of the sensor.
    • groupId: Unique ID of the group.
    • dataType: Type of data (e.g., string, int, float, date).
    • dataUnit: Unit of the data, if relevant.
    • dataInfo: Information about the data.
    • data: The actual data being sent.
  • Response: Confirmation message with sensor ID, data type, and data.
2. POST /groups
  • Description: Creates a new group.
  • Body:
    • JSON object containing groupId, name, and description.
  • Response: JSON object of the created group.
3. PUT /groups/:id
  • Description: Updates an existing group.
  • Parameters:
    • id: Group ID.
  • Body:
    • JSON object with updated name and description.
  • Response: JSON object of the updated group.
4. GET /groups/:id
  • Description: Retrieves a specific group by ID.
  • Parameters:
    • id: Group ID.
  • Response: JSON object containing group details.
5. GET /groups
  • Description: Lists all groups.
  • Response: Array of JSON objects, each representing a group.
6. GET /groups/:groupId/sensors
  • Description: Retrieves sensors for a specific group.
  • Parameters:
    • groupId: Group ID.
  • Response: JSON array of sensor data.
7. POST /groups/sensors
  • Description: Retrieves sensor data for multiple groups.
  • Body:
    • JSON object with an array of groupIds.
  • Response: JSON object containing sensor data for the specified groups.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址