🏒Objects & Devices API

Description: An API for controlling IoT devices like doors, barriers, and relays.

Server

URL: https://api.revtek.cloud/{version}

GET /objects

Summary: Get a list of objects

Response (200 OK): A list of objects

    
[
  {
    "id": "OID-00000000",
    "type": "building",
    "name": "Building A"
  },
  {
    "id": "OID-00000001",
    "type": "parking_garage",
    "name": "Garage 1"
  }
    
  

POST /objects

Summary: Create a new object

Request Body: New object details

Response (201 Created): Object created successfully

GET /objects/{object_id}

Parameters:

  • object_id (path) - The provided unique object identifier

Summary: Get details of a specific object

Response (200 OK): Object details

PUT /objects/{object_id}

Parameters:

  • object_id (path) - The provided unique object identifier

Summary: Update the object's details

Request Body: Updated object details

Response (204 No Content): Object updated successfully

DELETE /objects/{object_id}

Parameters:

  • object_id (path) - The provided unique object identifier

Summary: Delete a specific object

Response (204 No Content): Object deleted successfully

GET /objects/{object_id}/devices

Parameters:

  • object_id (path) - The provided unique object identifier

Summary: Get a list of devices in the object

Response (200 OK): A list of devices in the object

POST /objects/{object_id}/devices

Parameters:

  • object_id (path) - The provided unique object identifier

Summary: Add a device to the object

Request Body: Device details

Response (201 Created): Device added to the object successfully

POST /objects/{object_id}/devices/{device_id}/actions

Parameters:

  • object_id (path) - The provided unique object identifier

  • device_id (path) - The provided unique device identifier

Summary: Perform an action on a specific device

Request Body: Action details

Response (200 OK): Action initiated successfully

Definitions

Object

Type: object

Properties:

  • id (string)

  • type (string, enum: door, barrier, building, parking_garage)

  • name (string)

Device

Type: object

Properties:

  • id (string)

  • name (string)

  • type (string)

  • status (string)

Action

Type: object

Properties:

  • action (string)

Last updated