Scott Lawrence wrote:
> On Mon, 2009-11-09 at 16:21 -0500, Paul Mossman wrote:
>> Scott wrote:
>> ...
>>>> So given that there will be one REST request per config file, does 
>>>> this make sense?
>>>>
>>>>    /phone/{phoneId}/profile/{name} - GET
>>>>
>>>> Where the body of the HTTP response would be the configuration file 
>>>> verbatim.
>>> What is {name}, and can it contain slashes?
>> It's the configuration file name.  Would {filename} be better?
>>
>> Excellent point about the slashes, as some config files are stored in
>> subdirectories.  (e.g. Nortel IP 12x0's Nortel/config/SIP<<<MAC>>>.xml.)
> 
> ... and more should be, since we're going to have to bite the bullet
> soon and support multiple versions of firmware for phones, which is
> going to be easily implemented using subdirectories for some of the
> files.

This seems unrelated. We are talking about retrieving a set of profiles for
a specific phone. Phone at any given moment only has a single set of
configuration files. One cannot take Acme phone 4.1 and ask it for profiles
for Acme 4.2.
One can however take 2 phones with different versions and ask them for
their profiles. Even if sipXconfig starts storing profiles in a more
elaborate directory structure than today, profile names (as opposed to
configuration file names) will not change.

> 
>> URL encoding the filename would solve that problem.
> 
> I'm not sure what problem you mean - since it's the end of the url, just
> leave the slashes alone.
> 
> 

Many REST server libs split URLs by slashes: supporting unquoted slashes as
a {name} might turn out to be be unnecessarily awkward.
Please remember that profile "name" is not the same as "file name". Maybe
we don't need slashes in profile names at all.
D.

_______________________________________________
sipx-dev mailing list [email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev
sipXecs IP PBX -- http://www.sipfoundry.org/

Reply via email to