REST URLs vs device names

Forum rules

This is a legacy forum which is locked for new topics. New topics should be started in one of the other forums under Extending Indigo

Posted on
Thu May 23, 2013 2:23 am
rhanson offline
Posts: 192
Joined: Apr 30, 2013

REST URLs vs device names

Hi all,

How are people dealing with mapping human-readable device/action names to URL-appropriate names so that REST URLs are valid?

Jack's Bedroom Light => jacks-bedroom-light

- Is there a way to add additional methods in the webserver that are just pointers to valid methods? If so, I could create my own variations on jacks-bedroom-light.

- Is there a separate field that can be used to specify url-safe text instead of using the device name?

- Any way to make the device ID work?

When integrating with Siri, iMessage, other voice controlled things, there really isn't a chance to go through and fix capitalization, spacing and other issues. Having additional URLs would be one workaround. Or I could run text through some logic to guess at the right device/action name.

Open to all suggestions...

Posted on
Thu May 23, 2013 9:38 am
jay (support) offline
Site Admin
User avatar
Posts: 18200
Joined: Mar 19, 2008
Location: Austin, Texas

Re: REST URLs vs device names

The RESTful API was designed and built well before the Python API and the introduction of unique object IDs. In some future version we'll move the RESTful API over to use the python api at which point we can expose the IDs.

URL encoding the names before use is the right way to go - that should take care of special characters.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest