ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antonenko Alexander (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (AMBARI-14899) UI part of rename Admin Setting API
Date Wed, 03 Feb 2016 15:18:39 GMT

     [ https://issues.apache.org/jira/browse/AMBARI-14899?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Antonenko Alexander updated AMBARI-14899:
-----------------------------------------
    Attachment: AMBARI-14899.patch

> UI part of rename Admin Setting API
> -----------------------------------
>
>                 Key: AMBARI-14899
>                 URL: https://issues.apache.org/jira/browse/AMBARI-14899
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-web
>    Affects Versions: 2.4.0
>            Reporter: Antonenko Alexander
>            Assignee: Antonenko Alexander
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-14899.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)

Mime
View raw message