Dev's NoxDev's Nox
Relay

Send relay command

Send a raw command string to the relay process. Admin only.

POST
/api/relays/{id}/command

Authorization

bearer
AuthorizationBearer token

User session token. Obtained from POST /api/auth/login.

In: header

Path Parameters

id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

content*string

Command string to send to the relay process

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/relays/string/command" \  -H "Content-Type: application/json" \  -d '{    "content": "relay_stop"  }'
{
  "data": {
    "success": true
  },
  "error": null,
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}
{
  "data": null,
  "error": {
    "code": "NOT_FOUND",
    "message": "Resource not found.",
    "status": 404
  },
  "time": 1680000000000,
  "request": "/api/endpoint"
}