matapan Posted December 30, 2013 Share Posted December 30, 2013 I have my programs in ISY organized in a folder structure like this: My Programs Program Folder A (name with spaces) Program Subfolder A (name with spaces) I can make a call successfully like this: https:/rest/programs The url returns a list of the top level programs and folders after login. I can also make the following call successfully: https:/rest/programs?subfolder=true The url returns all the programs and folders in icy What I can't do without getting a 404 error is this: https:/rest/programs/My Programs I've tried the possibilities: https:/rest/programs/MyPrograms or https:/rest/programs/"My Programs" All to no avail. What am I doing wrong? The documentation doesn't seem to cover this. (Page 57 for v4.0.5) 404 errors are invalid reference errors (e.g. dead link, bad link reference) Link to comment
Xathros Posted December 30, 2013 Share Posted December 30, 2013 Try: https:/rest/programs/My%20Programs %20 is the http placeholder for a space. -Xathros Link to comment
matapan Posted December 30, 2013 Author Share Posted December 30, 2013 I also tried resolving the space in the name to its hex value. That did not work: https:///rest/programs/My%20Programs 404 error returned. Link to comment
LeeG Posted December 30, 2013 Share Posted December 30, 2013 A Program/Folder is accessed by the ID (/rest/programs/). My Programs is accessed with http://192.168.2.3/rest/programs/0001 My Programs Folder2 Not Saved Folder Test Folder Status Link to comment
PurdueGuy Posted December 30, 2013 Share Posted December 30, 2013 I can access the folders via their ID. I have a folder called "Downstairs" which is program ID "000E" I access it via: https:///rest/programs/000E That shows all my folders in that program. Link to comment
matapan Posted December 30, 2013 Author Share Posted December 30, 2013 How did you get the program ID associated with the folder/program? I viewed the raw output returned from /rest/programs using the Mac's TextEdit program. I only saw the name of the folder or program. Link to comment
LeeG Posted December 30, 2013 Share Posted December 30, 2013 Cannot speak to Mac. On a Windows system I issued http://192.168.2.3/rest/programs <program id="0001" status="true" folder="true"> My Programs Folder2 Not Saved Folder Test Folder Status Under Programs | Summary the ID of the item is in the right most column although My Programs is not listed as it is an ISY item rather than a user item. EDIT: I assume My Programs will always be 0001 Link to comment
matapan Posted December 30, 2013 Author Share Posted December 30, 2013 Thanks everyone. LeeG, thanks for the pointer about running on Windows. I tried the same reference to /rest/programs in Firefox and obtained more complete information. I'll bet others were scratching their head about what I was talking about! Takeaway: Don't use Safari for communicating with the REST interface interactively on a Mac. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.