]> git.ipfire.org Git - thirdparty/asterisk.git/commit
ARI: Add support for push configuration of dynamic object 53/853/4
authorMatt Jordan <mjordan@digium.com>
Wed, 8 Jul 2015 21:39:35 +0000 (16:39 -0500)
committerMatt Jordan <mjordan@digium.com>
Fri, 17 Jul 2015 01:37:58 +0000 (20:37 -0500)
commit8bcf6d2801d1b1ed7073ab560bdbe3d0047b1b2c
tree360290ba1f6389bf5e609f7754f1951aec77da5b
parent00d858da87c77954778c6ea5dc559029d21e4bf5
ARI: Add support for push configuration of dynamic object

This patch adds support for push configuration of dynamic, i.e.,
sorcery, objects in Asterisk. It adds three new REST API calls to the
'asterisk' resource:
 * GET /asterisk/{configClass}/{objectType}/{id}: retrieve the current
   object given its ID. This returns back a list of ConfigTuples, which
   define the fields and their present values that make up the object.
 * PUT /asterisk/{configClass}/{objectType}/{id}: create or update an
   object. A body may be passed with the request that contains fields to
   populate in the object. The same format as what is retrieved using
   the GET operation is used for the body, save that we specify that the
   list of fields to update are contained in the "fields" attribute.
 * DELETE /asterisk/{configClass}/{objectType}/{id}: remove a dynamic
   object from its backing storage.

Note that the success/failure of these operations is somewhat
configuration dependent, i.e., you must be using a sorcery wizard that
supports the operation in question. If a sorcery wizard does not support
the create or delete mechanisms, then the REST API call will fail with a
403 forbidden.

ASTERISK-25238 #close

Change-Id: I28cd5c7bf6f67f8e9e437ff097f8fd171d30ff5c
CHANGES
res/ari/ari_model_validators.c
res/ari/ari_model_validators.h
res/ari/resource_asterisk.c
res/ari/resource_asterisk.h
res/res_ari_asterisk.c
rest-api/api-docs/asterisk.json