Domotys WTS
  • Installation
  • Views
  • Application
  • Datasheet
  • Installation
  • Receive Node
  • Send Node
  • Protocols
  • Variables
  • Requests
  • Events
  • English
  • Français
  • Installation
  • Views
  • Application
  • Datasheet
  • Installation
  • Receive Node
  • Send Node
  • Protocols
  • Variables
  • Requests
  • Events
  • English
  • Français
  • Protocols
  • Variables
    • Domains
      • action
      • alarm
      • buzzer
      • config
      • date_time
      • domotys
      • heat
      • home
      • home_action
      • information
      • lighting
      • message
      • network
      • opening
      • screen
      • sd
      • theme
      • update
      • view_list
    • Type Definitions
    • ID Definitions
  • Requests
    • Get JSON
    • Set JSON
    • Set States
    • Set States View List
    • Get Files
    • Get Files List
    • Get Screenshot
    • Diverse
  • Events

Set JSON

Applies new values to one or more domains, only variables with the Write attribute can be modified.

HTTP Request

  • Methods : GET/POST
  • URL multi domain : http://screen-address:8080/api/set/json
  • URL single domain : http://screen-address:8080/api/set/json/{domain}

JSON TCP Request

  • URL multi domain : /api/set/json
  • URL single domain : /api/set/json/{domain}

Parameters

AttributeDescription
jsonjson data stringified
passwordapi password (optional)
domainif set to 1, the response will contain the modified domains
no-saveif set to 1, the modified variables will not be saved in the screen memory

HTTP single domain exemple

Request :
GET http://screen-address:8080/api/set/json/screen?json={"screen_state":1}
Response :
{ "code": 200 }

HTTP multi domain exemple

Request :
GET http://screen-address:8080/api/set/json?json={"screen":{"screen_state":1},"buzzer":{"set":0}}
Response :
{ "code": 200 }

JSON TCP single domain exemple

Request :
{
	"request": {
        "url":"/api/set/json/screen",
        "data":[
            ["json","{\"screen_state\":1}"]
        ]
    },
    "id":"message-id", //Optional
    "password":"password" //If defined and only for the first request
}
Response :
{
	"request":{
        "response": {
            "code":200
        },
        "content_type":"application/json"
    },
    "id":"message-id" //Returns the received ID if defined.
}

JSON TCP multi domain exemple

Request :
{
	"request": {
        "url":"/api/set/json",
        "data":[
            ["json","{\"screen\":{\"screen_state\":1},\"buzzer\":{\"set\":0}}"]
        ]
    },
    "id":"message-id", //Optional
    "password":"password" //If defined and only for the first request
}
Response :
{
	"request":{
        "response": {
            "code":200
        },
        "content_type":"application/json"
    },
    "id":"message-id" //Returns the received ID if defined.
}
Prev
Get JSON
Next
Set States