Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AC13618901 for ; Mon, 1 Feb 2016 18:18:39 +0000 (UTC) Received: (qmail 84289 invoked by uid 500); 1 Feb 2016 18:17:40 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 84234 invoked by uid 500); 1 Feb 2016 18:17:40 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 84188 invoked by uid 99); 1 Feb 2016 18:17:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Feb 2016 18:17:40 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 9D7DC2C14F7 for ; Mon, 1 Feb 2016 18:17:40 +0000 (UTC) Date: Mon, 1 Feb 2016 18:17:40 +0000 (UTC) From: "Ajit Kumar (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-14869) Rename Admin Setting API MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-14869?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ajit Kumar updated AMBARI-14869: -------------------------------- Attachment: rb42976.patch > Rename Admin Setting API > ------------------------ > > Key: AMBARI-14869 > URL: https://issues.apache.org/jira/browse/AMBARI-14869 > Project: Ambari > Issue Type: Task > Components: ambari-server > Affects Versions: 2.4.0 > Reporter: Ajit Kumar > Assignee: Ajit Kumar > Fix For: 2.4.0 > > Attachments: rb42976.patch > > > Currently API endpoint is /admin-settings. Change it to /settings and all modelling accordingly. > POST > {code} > curl -u admin:admin -H 'X-Requested-By: ambari' -X POST http://SERVER-NAME:8080/api/v1/settings -d '{"Settings" : { > "content" : "{test_content : test_value}", > "name" : "motd", > "setting_type" : "ambari-server" > }}' > Response: > { > "resources" : [ > { > "href" : "http://SERVER-NAME:8080/api/v1/settings/motd", > "Settings" : { > "name" : "motd" > } > } > ] > } > {code} > GET > {code} > curl -u admin:admin -H 'X-Requested-By: ambari' -X GET http://SERVER-NAME:8080/api/v1/settings/motd > Response: > { > "href" : "http://SERVER-NAME:8080/api/v1/settings/motd", > "Settings" : { > "content" : "{test_content : test_value}", > "name" : "motd", > "setting_type" : "ambari-server", > "update_timestamp" : 1454102699484, > "updated_by" : "admin" > } > } > {code} > PUT > {code} > curl -u admin:admin -H 'X-Requested-By: ambari' -X PUT http://SERVER-NAME:8080/api/v1/settings/motd -d '{"Settings" : { > "content" : "{test_content1 : test_value1}", > "setting_type" : "ambari-server" > }}' > {code} > LIST > {code} > curl -u admin:admin -H 'X-Requested-By: ambari' -X GET http://SERVER-NAME:8080/api/v1/settings > Response: > { > "href" : "http://SERVER-NAME:8080/api/v1/settings", > "items" : [ > { > "href" : "http://SERVER-NAME:8080/api/v1/settings/motd", > "Settings" : { > "name" : "motd" > } > } > ] > } > {code} > DELETE > {code} > curl -u admin:admin -H 'X-Requested-By: ambari' -X DELETE http://SERVER-NAME:8080/api/v1/settings/motd > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)