Simple REST Adapter

This adapter helps to set values or get values using only POST/GET requests.

Authorization

You may add Basic Auth fill the inputs or leave empty for No Auth

Allowed topics

Allowed MQTT topics to set or get values. All topics are set by default # Also supports two different kinds of wildcards: single-level and multi-level.

The addon settings

Bridge launch

After starting the bridge a new string will be added with Service ID, this ID is used to get/set values in Postman.

The addon settings

Get value from the topic

This endpoint returns a value from topic:

{{APP_SCHEMA}}://{{APP_HOST}}/service/{{SERVICE_ID}}/api/v1/topics?topic={{TOPIC}}

Variables:

  • may be https or http
  • host where run 2smart standalone project
  • id from Simple REST adapter
  • this is a topic from mqtt 2smart standalone project.

For example topic may be:

sweet-home/34-ab-95-76-40-90/$name

Postman window

Set value to the topic

This endpoint set the value in request to the mqtt topic:

{{APP_SCHEMA}}://{{APP_HOST}}/service/{{SERVICE_ID}}/api/v1/topics/set

Request samples:

{
"topic": "sweet-home/34-ab-95-76-40-90/d/s",
"value": "true"
}

Response samples:

200 OK
403 Forbidden

Variables:

  • may be https or http
  • host where run 2smart standalone project
  • id from Simple REST adapter

Postman window

results matching ""

    No results matching ""