You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Robert Levas (JIRA)" <ji...@apache.org> on 2017/11/13 18:31:00 UTC
[jira] [Updated] (AMBARI-22418) Make Ambari configuration API
consistent with existing API.
[ https://issues.apache.org/jira/browse/AMBARI-22418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Levas updated AMBARI-22418:
----------------------------------
Description:
Make Ambari configuration API consistent with existing API.
The current API entry point (as of AMBARI-21307) is {{/api/v1/ambariconfigs}}. This should be more inline with the existing entry point for Ambari server related data... {{/api/v1/services/AMBARI/components/AMBARI_SERVER}}.
The new API entry point for Ambari server related configuration data should be {{/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations}}.
Example Rest API calls:
*Create/Set configuration*
Used to create a new or explicitly set properties an existing Ambari Server configuration
{noformat:title=URL}
POST /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations
{noformat}
{code:title=Payload}
{
"Configuration": {
"category" : "ldap-configuration",
"properties": {
"ambari.ldap.bindanonymously": "true",
"ambari.ldap.server.port": "389",
"ambari.ldap.base.dn": "dc=example,dc=com",
"ambari.ldap.user.object.class":"person",
"ambari.ldap.user.name.attribute":"uid",
"ambari.ldap.user.search.base": "dc=example,dc=com",
"ambari.ldap.group.object.class":"groupOfUniqueNames",
"ambari.ldap.group.name.attribute":"cn",
"ambari.ldap.group.member.attribute":"uniqueMember",
"ambari.ldap.group.search.base": "dc=example,dc=com"
}
}
}
{code}
*Update configuration*
Used to update existing properties or add new properties to an existing Ambari Server configuration
{noformat:title=URL}
PUT /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration
{noformat}
{code:title=Payload}
{
"Configuration": {
"properties": {
"ambari.ldap.bindanonymously": "true",
"ambari.ldap.server.port": "389",
"ambari.ldap.base.dn": "dc=example,dc=com",
"ambari.ldap.user.object.class":"person",
"ambari.ldap.user.name.attribute":"uid",
"ambari.ldap.user.search.base": "dc=example,dc=com",
"ambari.ldap.group.object.class":"groupOfUniqueNames",
"ambari.ldap.group.name.attribute":"cn",
"ambari.ldap.group.member.attribute":"uniqueMember",
"ambari.ldap.group.search.base": "dc=example,dc=com"
}
}
}
{code}
*Delete configuration*
Deletes an existing Ambari Server configuration
{noformat:title=URL}
DELETE /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration
{noformat}
*Get configurations*
Used to retrieve a list of the existing Ambari Server configurations
{noformat:title=URL}
GET /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations
{noformat}
{code:title=Response}
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations",
"items" : [
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration",
"Configuration" : {
"category" : "ldap-configuration",
"component_name" : "AMBARI_SERVER",
"service_name" : "AMBARI"
}
}
]
}
{code}
*Get configuration*
Used to retrieve a the details about an existing Ambari Server configuration
{noformat:title=URL}
GET /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration
{noformat}
{code:title=Response}
{
"href" : "http://c6401.ambari.apache.org:8080/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration",
"Configuration" : {
"category" : "ldap-configuration",
"component_name" : "AMBARI_SERVER",
"service_name" : "AMBARI",
"properties" : {
"ambari.ldap.base.dn" : "dc=example,dc=com",
"ambari.ldap.bindanonymously" : "true",
"ambari.ldap.group.member.attribute" : "uniqueMember",
"ambari.ldap.group.name.attribute" : "cn",
"ambari.ldap.group.object.class" : "groupOfUniqueNames",
"ambari.ldap.group.search.base" : "dc=example,dc=com",
"ambari.ldap.server.port" : "389",
"ambari.ldap.user.name.attribute" : "uid",
"ambari.ldap.user.object.class" : "person",
"ambari.ldap.user.search.base" : "dc=example,dc=com"
}
}
}
{code}
was:
Make Ambari configuration API consistent with existing API.
The current API entry point (as of AMBARI-21307) is {{/api/v1/ambariconfigs}}. This should be more inline with the existing entry point for Ambari server related data... {{/api/v1/services/AMBARI/components/AMBARI_SERVER}}.
The new API entry point for Ambari server related configuration data should be {{/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations}}.
> Make Ambari configuration API consistent with existing API.
> -----------------------------------------------------------
>
> Key: AMBARI-22418
> URL: https://issues.apache.org/jira/browse/AMBARI-22418
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 3.0.0
> Reporter: Robert Levas
> Assignee: Robert Levas
> Fix For: 3.0.0
>
>
> Make Ambari configuration API consistent with existing API.
> The current API entry point (as of AMBARI-21307) is {{/api/v1/ambariconfigs}}. This should be more inline with the existing entry point for Ambari server related data... {{/api/v1/services/AMBARI/components/AMBARI_SERVER}}.
> The new API entry point for Ambari server related configuration data should be {{/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations}}.
> Example Rest API calls:
> *Create/Set configuration*
> Used to create a new or explicitly set properties an existing Ambari Server configuration
> {noformat:title=URL}
> POST /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations
> {noformat}
> {code:title=Payload}
> {
> "Configuration": {
> "category" : "ldap-configuration",
> "properties": {
> "ambari.ldap.bindanonymously": "true",
> "ambari.ldap.server.port": "389",
> "ambari.ldap.base.dn": "dc=example,dc=com",
> "ambari.ldap.user.object.class":"person",
> "ambari.ldap.user.name.attribute":"uid",
> "ambari.ldap.user.search.base": "dc=example,dc=com",
> "ambari.ldap.group.object.class":"groupOfUniqueNames",
> "ambari.ldap.group.name.attribute":"cn",
> "ambari.ldap.group.member.attribute":"uniqueMember",
> "ambari.ldap.group.search.base": "dc=example,dc=com"
> }
> }
> }
> {code}
> *Update configuration*
> Used to update existing properties or add new properties to an existing Ambari Server configuration
> {noformat:title=URL}
> PUT /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration
> {noformat}
> {code:title=Payload}
> {
> "Configuration": {
> "properties": {
> "ambari.ldap.bindanonymously": "true",
> "ambari.ldap.server.port": "389",
> "ambari.ldap.base.dn": "dc=example,dc=com",
> "ambari.ldap.user.object.class":"person",
> "ambari.ldap.user.name.attribute":"uid",
> "ambari.ldap.user.search.base": "dc=example,dc=com",
> "ambari.ldap.group.object.class":"groupOfUniqueNames",
> "ambari.ldap.group.name.attribute":"cn",
> "ambari.ldap.group.member.attribute":"uniqueMember",
> "ambari.ldap.group.search.base": "dc=example,dc=com"
> }
> }
> }
> {code}
> *Delete configuration*
> Deletes an existing Ambari Server configuration
> {noformat:title=URL}
> DELETE /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration
> {noformat}
> *Get configurations*
> Used to retrieve a list of the existing Ambari Server configurations
> {noformat:title=URL}
> GET /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations
> {noformat}
> {code:title=Response}
> {
> "href" : "http://c6401.ambari.apache.org:8080/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations",
> "items" : [
> {
> "href" : "http://c6401.ambari.apache.org:8080/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration",
> "Configuration" : {
> "category" : "ldap-configuration",
> "component_name" : "AMBARI_SERVER",
> "service_name" : "AMBARI"
> }
> }
> ]
> }
> {code}
> *Get configuration*
> Used to retrieve a the details about an existing Ambari Server configuration
> {noformat:title=URL}
> GET /api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration
> {noformat}
> {code:title=Response}
> {
> "href" : "http://c6401.ambari.apache.org:8080/api/v1/services/AMBARI/components/AMBARI_SERVER/configurations/ldap-configuration",
> "Configuration" : {
> "category" : "ldap-configuration",
> "component_name" : "AMBARI_SERVER",
> "service_name" : "AMBARI",
> "properties" : {
> "ambari.ldap.base.dn" : "dc=example,dc=com",
> "ambari.ldap.bindanonymously" : "true",
> "ambari.ldap.group.member.attribute" : "uniqueMember",
> "ambari.ldap.group.name.attribute" : "cn",
> "ambari.ldap.group.object.class" : "groupOfUniqueNames",
> "ambari.ldap.group.search.base" : "dc=example,dc=com",
> "ambari.ldap.server.port" : "389",
> "ambari.ldap.user.name.attribute" : "uid",
> "ambari.ldap.user.object.class" : "person",
> "ambari.ldap.user.search.base" : "dc=example,dc=com"
> }
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)