Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
indigo_2025.1_documentation:api [2026/02/01 20:06] – [Schedule Objects] davel17indigo_2025.1_documentation:api [2026/03/23 12:52] (current) – [refresh folder server message] davel17
Line 97: Line 97:
 The WebSocket and HTTP APIs are designed to be familiar to those that have been using the legacy RESTful API. However, anyone with knowledge of Python, JavaScript or similar languages should be able to pick up the structure of the new APIs very quickly. To help those making the transition as well as those learning to use API calls for the first time, we've laid out several examples to show how API calls are made, as well as all the current API hooks available. The WebSocket and HTTP APIs are designed to be familiar to those that have been using the legacy RESTful API. However, anyone with knowledge of Python, JavaScript or similar languages should be able to pick up the structure of the new APIs very quickly. To help those making the transition as well as those learning to use API calls for the first time, we've laid out several examples to show how API calls are made, as well as all the current API hooks available.
  
-Here's a simple Python script to open the device-feed and print out any messages it receives (you'll need to ''**pip3 install websockets**'' before running it).+Here's a simple Python script to open the device-feed and print out any messages it receives (you'll need to ''**pip3 install websockets**'' before running it if it isn't already installed - Indigo installs it on the Indigo Server Mac so you won't need to install there).
  
 === Python Receiver Example === === Python Receiver Example ===
Line 784: Line 784:
 </code> </code>
  
-As of this release, this is the only way to get the current state of folders (there are not add/update/delete messages). If you think you need to refresh your folder list, then send the refresh message. Since folders are generally static, there really isn't much need to continually get the folder list.+As of this release, this is the only way to get the current state of folders (there are no add/update/delete messages). If you think you need to refresh your folder list, then send the refresh message. Since folders are generally static, there really isn't much need to continually get the folder list.
  
 ==== Log Feed ==== ==== Log Feed ====
Line 2308: Line 2308:
  
 <code json>{ <code json>{
-    "class": "indigo.Schedule", +  "class": "indigo.Schedule", 
-    "absoluteDate": null, +  "absoluteDate": null, 
-    "absoluteDateTime": null, +  "absoluteDateTime": null, 
-    "absoluteTime": null, +  "absoluteTime": null, 
-    "autoDelete": false, +  "autoDelete": false, 
-    "configured": true, +  "configured": true, 
-    "dateType": 0, +  "dateType": 0, 
-    "description": "", +  "description": "", 
-    "enabled": false, +  "enabled": false, 
-    "folderId": 0, +  "folderId": 0, 
-    "globalProps": {}, +  "globalProps": {}, 
-    "id": 12345678, +  "id": 12345678, 
-    "name": "My Schedule Name", +  "name": "My Schedule Name", 
-    "nextExecution": null, +  "nextExecution": null, 
-    "pluginProps": {}, +  "pluginProps": {}, 
-    "randomizeBy": 0, +  "randomizeBy": 0, 
-    "remoteDisplay": true, +  "remoteDisplay": true, 
-    "sharedProps": {}, +  "sharedProps": {}, 
-    "sunDelta": 0, +  "sunDelta": 0, 
-    "suppressLogging": false, +  "suppressLogging": false, 
-    "timeType": 3+  "timeType": 3
 } }
- 
 </code> </code>
  
Line 2349: Line 2348:
 ''objectId'' is the id of the schedule. ''objectId'' is the id of the schedule.
  
-** enable **+** enable ** ''[[schedule_class#enable|indigo.schedule.enable(123456789)]]''
 <code json> <code json>
 { {
Line 2367: Line 2366:
  
 <code json>{ <code json>{
-    "class": "indigo.Trigger", +  "class": "indigo.Trigger", 
-    "configured": true, +  "configured": true, 
-    "description": "A trigger description.", +  "description": "A trigger description.", 
-    "enabled": true, +  "enabled": true, 
-    "folderId": 12345678, +  "folderId": 12345678, 
-    "globalProps":+  "globalProps":
-        "com.indigodomo.indigoserver": {}, +    "com.indigodomo.indigoserver": {}, 
-        "com.indigodomo.webserver":+    "com.indigodomo.webserver":
-            "httpMethod": "GET", +      "httpMethod": "GET", 
-            "postProcessing": "JSON", +      "postProcessing": "JSON", 
-            "webhookId": "8aa4b5140c5c473ea170465239143839" +      "webhookId": "8aa4b5140c5c473ea170465239143839"
-        }, +
-        "emptyDict": {}+
     },     },
-    "id": 12345678, +    "emptyDict": {} 
-    "name": "My Trigger Name", +  }, 
-    "pluginProps": {}, +  "id": 12345678, 
-    "remoteDisplay": true, +  "name": "My Trigger Name", 
-    "sharedProps": {}, +  "pluginProps": {}, 
-    "suppressLogging": false+  "remoteDisplay": true, 
 +  "sharedProps": {}, 
 +  "suppressLogging": false
 } }
 </code> </code>
Line 2394: Line 2393:
 These are the available trigger commands. The ''id'' key is optional, but may contain a user generated ID that will be logged and returned to help match up with message requests. Custom ''id'' values should be strings. These are the available trigger commands. The ''id'' key is optional, but may contain a user generated ID that will be logged and returned to help match up with message requests. Custom ''id'' values should be strings.
  
-** execute **  ''[[schedule_class#execute|indigo.schedule.execute(123456789)]]''+** execute **  ''[[trigger_class#execute|indigo.trigger.execute(123456789)]]''
  
 <code json> <code json>
Line 2406: Line 2405:
 ''objectId'' is the id of the trigger. ''objectId'' is the id of the trigger.
  
-** enable **+** enable **   ''[[trigger_class#enable|indigo.trigger.enable(123456789)]]''
 <code json> <code json>
 { {
  • /www/perceptive/wiki/data/attic/indigo_2025.1_documentation/api.1769976408.txt.gz
  • Last modified: 2026/02/01 20:06
  • by davel17