You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by David Bosschaert <da...@gmail.com> on 2017/01/05 14:20:50 UTC

HTTP/REST access to webconsole configurations

Hi all,

From the documentation at I think that the webconsole supports POST
requests to create/modify configurations, but the documentation is a little
cryptic. Does anyone have any examples of how this can be used, e.g. from
curl?

Thanks,

David

[1]
http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#post-requests_1

Re: HTTP/REST access to webconsole configurations

Posted by Felix Meschberger <fm...@adobe.com>.
Hi

I think it is rather straight-forward, yet I would not call this documentation cryptic, but incomplete ;-)

E.g. to Create a config this.is<http://this.is>.the.pid:

  $ curl -Fcreate=1 -Fprop.value=abc http://localhost:8080/system/console/configuration/this.is.the.pid

Regards
Felix



Am 05.01.2017 um 15:20 schrieb David Bosschaert <da...@gmail.com>>:

Hi all,

From the documentation at I think that the webconsole supports POST
requests to create/modify configurations, but the documentation is a little
cryptic. Does anyone have any examples of how this can be used, e.g. from
curl?

Thanks,

David

[1]
http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#post-requests_1


Re: HTTP/REST access to webconsole configurations

Posted by David Bosschaert <da...@gmail.com>.
Thanks Felix and Carsten! I will update the documentation with some
examples soon.

Cheers,

David

On 5 January 2017 at 14:27, Carsten Ziegeler <cz...@apache.org> wrote:

> The easiest way to find this out is to use the web console and look at
> the post request it sends :)
>
> Afaik, the url should have the PID as a suffix. If you send add
> create=true, the configuration will be created. Afaik, you can't set
> properties, just create.
> For modificiation send apply=true then propertyList with a comma
> separate list of properties you want to apply and then for each property
> the parameter with the value. For example if you want to change/set a
> and b then it is:
> ?apply=true&propertyList=a,b&a=5&b=10
>
> It's ugly and has some historic reasons; would be great if a spec for a
> REST api for configurations existed....
>
> Carsten
>
> David Bosschaert wrote
> > Hi all,
> >
> >>From the documentation at I think that the webconsole supports POST
> > requests to create/modify configurations, but the documentation is a
> little
> > cryptic. Does anyone have any examples of how this can be used, e.g. from
> > curl?
> >
> > Thanks,
> >
> > David
> >
> > [1]
> > http://felix.apache.org/documentation/subprojects/
> apache-felix-web-console/web-console-restful-api.html#post-requests_1
> >
>
>
>
>
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: HTTP/REST access to webconsole configurations

Posted by Carsten Ziegeler <cz...@apache.org>.
The easiest way to find this out is to use the web console and look at
the post request it sends :)

Afaik, the url should have the PID as a suffix. If you send add
create=true, the configuration will be created. Afaik, you can't set
properties, just create.
For modificiation send apply=true then propertyList with a comma
separate list of properties you want to apply and then for each property
the parameter with the value. For example if you want to change/set a
and b then it is:
?apply=true&propertyList=a,b&a=5&b=10

It's ugly and has some historic reasons; would be great if a spec for a
REST api for configurations existed....

Carsten

David Bosschaert wrote
> Hi all,
> 
>>From the documentation at I think that the webconsole supports POST
> requests to create/modify configurations, but the documentation is a little
> cryptic. Does anyone have any examples of how this can be used, e.g. from
> curl?
> 
> Thanks,
> 
> David
> 
> [1]
> http://felix.apache.org/documentation/subprojects/apache-felix-web-console/web-console-restful-api.html#post-requests_1
> 


 

-- 
Carsten Ziegeler
Adobe Research Switzerland
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org