You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Ajit Kumar (JIRA)" <ji...@apache.org> on 2016/01/21 00:05:39 UTC

[jira] [Created] (AMBARI-14750) Update CRUD API support for settings

Ajit Kumar created AMBARI-14750:
-----------------------------------

             Summary: Update CRUD API support for settings
                 Key: AMBARI-14750
                 URL: https://issues.apache.org/jira/browse/AMBARI-14750
             Project: Ambari
          Issue Type: Task
            Reporter: Ajit Kumar
            Assignee: Ajit Kumar


Introduce a new API for *admin-settings*
{code}
api/v1/admin-settings
{code}

There can be several class of system wide admin settings - motd  etc. These are like configurations - basically named property bags. It doesn't need version support.

*CRUD*
* create a new entry
{code}
POST  http://c6401.ambari.apache.org:8080/api/v1/admin-settings -d 
'{   "AdminSettings" : {
    "content" : "{test_content1 : test_value1}",
    "name" : "motd1",
    "setting_type" : "ambari-server",
    "updated_by" : "admin"
  }
}' 
{code}
* read any entry
{code}
GET  http://c6401.ambari.apache.org:8080/api/v1/admin-settings/motd1
{
  "href" : "http://c6401.ambari.apache.org:8080/api/v1/admin-settings/motd1",
  "AdminSettings" : {
    "content" : "{test_content1 : test_value1}",
    "name" : "motd1",
    "setting_type" : "ambari-server",
    "update_timestamp" : 1453315409437,
    "updated_by" : "admin"
  }
}
{code}
* update - update an entry
{code}
PUT  http://c6401.ambari.apache.org:8080/api/v1/admin-settings/motd -d '{   "AdminSettings" : {
    "content" : "{test_content1 : test_value1}",
    "setting_type" : "ambari-server",
    "updated_by" : "admin"
  }
}' 
{code}
* delete an entry
{code}
DELETE  http://c6401.ambari.apache.org:8080/api/v1/admin-settings/motd
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)