Jump to content

Accessing Folders/Programs via REST


matapan

Recommended Posts

Posted

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)

Posted

Try: https:/rest/programs/My%20Programs

 

%20 is the http placeholder for a space.

 

-Xathros

Posted

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.

Posted

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.

Posted

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

Posted

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.

Guest
This topic is now closed to further replies.

×
×
  • Create New...