Author: jspeidel
Date: Thu Feb 14 22:16:53 2013
New Revision: 1446365
URL: http://svn.apache.org/r1446365
Log:
AMBARI-1429. Update API docs
Modified:
incubator/ambari/trunk/CHANGES.txt
incubator/ambari/trunk/ambari-server/docs/api/v1/clusters-cluster.md
incubator/ambari/trunk/ambari-server/docs/api/v1/clusters.md
incubator/ambari/trunk/ambari-server/docs/api/v1/components-component.md
incubator/ambari/trunk/ambari-server/docs/api/v1/components.md
incubator/ambari/trunk/ambari-server/docs/api/v1/host-component.md
incubator/ambari/trunk/ambari-server/docs/api/v1/host-components.md
incubator/ambari/trunk/ambari-server/docs/api/v1/hosts-host.md
incubator/ambari/trunk/ambari-server/docs/api/v1/hosts.md
incubator/ambari/trunk/ambari-server/docs/api/v1/index.md
incubator/ambari/trunk/ambari-server/docs/api/v1/services-service.md
incubator/ambari/trunk/ambari-server/docs/api/v1/services.md
Modified: incubator/ambari/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/CHANGES.txt?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/CHANGES.txt (original)
+++ incubator/ambari/trunk/CHANGES.txt Thu Feb 14 22:16:53 2013
@@ -40,6 +40,8 @@ Trunk (unreleased changes):
IMPROVEMENTS
+ AMBARI-1429. Update API docs. (jspeidel)
+
AMBARI-1430. Increase UI timeout for long running API operations. (yusaku)
AMBARI-1427. Add ability to increase the time range for the zoomed-in graphs
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/clusters-cluster.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/clusters-cluster.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/clusters-cluster.md
(original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/clusters-cluster.md Thu
Feb 14 22:16:53 2013
@@ -1,4 +1,4 @@
-<!---
+ <!---
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
@@ -28,97 +28,98 @@ Returns information for the specified cl
200 OK
{
- "href" : "http://your.ambari.server/api/v1/clusters/MyCluster",
- "Clusters" : {
- "cluster_name" : "MyCluster",
- "cluster_id" : 1,
- "version" : "HDP-1.2.0"
- },
- "services" : [
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/NAGIOS",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "NAGIOS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HCATALOG",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "HCATALOG"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/PIG",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "PIG"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/MAPREDUCE",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "MAPREDUCE"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/GANGLIA",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "GANGLIA"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HIVE",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "HIVE"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS",
- "ServiceInfo" : {
- "cluster_name" : "MyIE9",
- "service_name" : "HDFS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/ZOOKEEPER",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "ZOOKEEPER"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HBASE",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "HBASE"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/OOZIE",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "OOZIE"
- }
- } ],
- "hosts" : [
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/hosts/some.cluster.host",
- "Hosts" : {
- "cluster_name" : "MyCluster",
- "host_name" : "some.cluster.host"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/hosts/another.cluster.host",
- "Hosts" : {
- "cluster_name" : "MyCluster",
- "host_name" : "another.cluster.host"
- }
- } ]
+ "href" : "http://your.ambari.server/api/v1/clusters/c1",
+ "Clusters" : {
+ "cluster_name" : "c1",
+ "cluster_id" : 1,
+ "version" : "HDP-1.2.0"
+ },
+ "services" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/NAGIOS",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "NAGIOS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HCATALOG",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "HCATALOG"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/PIG",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "PIG"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/MAPREDUCE",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "MAPREDUCE"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/GANGLIA",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "GANGLIA"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HIVE",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "HIVE"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS",
+ "ServiceInfo" : {
+ "cluster_name" : "MyIE9",
+ "service_name" : "HDFS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/ZOOKEEPER",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "ZOOKEEPER"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HBASE",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "HBASE"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/OOZIE",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "OOZIE"
+ }
+ }
+ ],
+ "hosts" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1",
+ "Hosts" : {
+ "cluster_name" : "c1",
+ "host_name" : "some.cluster.host"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host2",
+ "Hosts" : {
+ "cluster_name" : "c1",
+ "host_name" : "another.cluster.host"
+ }
+ ]
}
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/clusters.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/clusters.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/clusters.md (original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/clusters.md Thu Feb 14
22:16:53 2013
@@ -1,3 +1,4 @@
+
<!---
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
@@ -29,11 +30,13 @@ Returns a collection of the currently co
200 OK
{
"href" : "http://your.ambari.server/api/v1/clusters",
- "items" : [ {
- "href" : "http://your.ambari.server/api/v1/clusters/MyCluster",
- "Clusters" : {
- "cluster_name" : "MyCluster",
- "version" : "HDP-1.2.0"
- }
- } ]
- }
+ "items" : [
+ {
+ "href" : "http://your.ambari.server/api/v1/clusters/c1",
+ "Clusters" : {
+ "cluster_name" : "c1",
+ "version" : "HDP-1.2.0"
+ }
+ }
+ ]
+ }
Modified:
incubator/ambari/trunk/ambari-server/docs/api/v1/components-component.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/components-component.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/components-component.md
(original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/components-component.md
Thu Feb 14 22:16:53 2013
@@ -28,47 +28,58 @@ Refers to a specific component identifie
200 OK
{
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/DATANODE",
- "metrics" : {
- "rpc" : {
- ...
- },
- "dfs" : {
- "datanode" : {
- ...
- }
- },
- "disk" : {
- ...
- },
- "cpu" : {
- ...
- },
- "jvm" : {
- ...
- },
- "load" : {
- ...
- },
- "memory" : {
- ...
- },
- "network" : {
- ...
- },
- },
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "DATANODE",
- "service_name" : "HDFS"
- },
- "host_components" : [
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/hosts/some.cluster.host/host_components/DATANODE",
- "HostRoles" : {
- "cluster_name" : "MyCluster",
- "component_name" : "DATANODE",
- "host_name" : "some.cluster.host"
- }
- } ]
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/DATANODE",
+ "metrics" : {
+ "process" : {
+ ...
+ },
+ "rpc" : {
+ ...
+ },
+ "ugi" : {
+ ...
+ },
+ "dfs" : {
+ "datanode" : {
+ ...
+ }
+ },
+ "disk" : {
+ ...
+ },
+ "cpu" : {
+ ...
+ },
+ "rpcdetailed" : {
+ ...
+ },
+ "jvm" : {
+ ...
+ },
+ "load" : {
+ ...
+ },
+ "memory" : {
+ ...
+ },
+ "network" : {
+ ...
+ },
+ },
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "service_name" : "HDFS"
+ "state" : "STARTED"
+ },
+ "host_components" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1/host_components/DATANODE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "host_name" : "host1"
+ }
+ }
+ ]
}
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/components.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/components.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/components.md (original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/components.md Thu Feb 14
22:16:53 2013
@@ -28,38 +28,39 @@ Refers to a collection of all components
200 OK
{
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components",
- "items" : [
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/DATANODE",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "DATANODE",
- "service_name" : "HDFS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/SECONDARY_NAMENODE",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "SECONDARY_NAMENODE",
- "service_name" : "HDFS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/NAMENODE",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "NAMENODE",
- "service_name" : "HDFS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/HDFS_CLIENT",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "HDFS_CLIENT",
- "service_name" : "HDFS"
- }
- } ]
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components",
+ "items" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/DATANODE",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "service_name" : "HDFS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/SECONDARY_NAMENODE",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "SECONDARY_NAMENODE",
+ "service_name" : "HDFS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/NAMENODE",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "NAMENODE",
+ "service_name" : "HDFS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/HDFS_CLIENT",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "HDFS_CLIENT",
+ "service_name" : "HDFS"
+ }
+ }
+ ]
}
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/host-component.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/host-component.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/host-component.md
(original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/host-component.md Thu Feb
14 22:16:53 2013
@@ -27,3 +27,57 @@ Returns information for a specific role
**Response**
200 OK
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1/host_components/DATANODE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "host_name" : "host1",
+ "state" : "STARTED"
+ },
+ "host" : {
+ "href" :
"http://localhost:8080/api/v1/clusters/c1/hosts/dev.hortonworks.com"
+ },
+ "metrics" : {
+ "process" : {
+ ...
+ },
+ "ugi" : {
+ ...
+ },
+ "dfs" : {
+ "datanode" : {
+ ...
+ }
+ },
+ "disk" : {
+ ...
+ },
+ "cpu" : {
+ ...
+ },
+ "jvm" : {
+ ...
+ },
+ "load" : {
+ ...
+ },
+ "memory" : {
+ ...
+ },
+ "network" : {
+ ...
+ },
+ },
+ "component" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/DATANODE",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "service_name" : "HDFS"
+ }
+ }
+ ]
+ }
+
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/host-components.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/host-components.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/host-components.md
(original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/host-components.md Thu Feb
14 22:16:53 2013
@@ -27,4 +27,31 @@ Returns a collection of components runni
**Response**
200 OK
-
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1/host_components",
+ items" : [
+ {
+ "href" :
"your.ambari.server/api/v1/clusters/c1/hosts/host1/host_components/DATANODE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "host_name" : "host1"
+ },
+ "host" : {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1"
+ }
+ },
+ {
+ "href" :
"your.ambari.server/api/v1/clusters/c1/hosts/host1/host_components/HBASE_CLIENT",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "HBASE_CLIENT",
+ "host_name" : "host1"
+ },
+ "host" : {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1"
+ }
+ },
+ ...
+ ]
+ }
\ No newline at end of file
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/hosts-host.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/hosts-host.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/hosts-host.md (original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/hosts-host.md Thu Feb 14
22:16:53 2013
@@ -27,4 +27,74 @@ Returns information about a single host
**Response**
200 OK
+ {
+ "href" : "http://your.ambari.server/api/v1/clusters/c1/hosts/host1",
+ "metrics" : {
+ "process" : {
+ ...
+ },
+ "rpc" : {
+ ...
+ },
+ "ugi" : {
+ ...
+ }
+ "disk" : {
+ ...
+ },
+ "cpu" : {
+ ...
+ },
+ "rpcdetailed" : {
+ ...
+ },
+ "jvm" : {
+ ...
+ },
+ "load" : {
+ ...
+ },
+ "memory" : {
+ ...
+ },
+ "network" : {
+ ...
+ },
+ },
+ "Hosts" : {
+ "cluster_name" : "c1",
+ "host_name" : "host1",
+ "host_state" : "HEALTHY",
+ "public_host_name" : "host1.yourDomain.com",
+ "cpu_count" : 1,
+ "rack_info" : "rack-name",
+ "os_arch" : "x86_64",
+ disk_info : [
+ {
+ "available" : "41497444",
+ "used" : "9584560",
+ "percent" : "19%",
+ "size" : "51606140",
+ "type" : "ext4",
+ "mountpoint" : "/"
+ }
+ ],
+ "ip" : "10.0.2.15",
+ "os_type" : "rhel6",
+ "total_mem" : 2055208,
+ ...
+ },
+ "host_components" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1/host_components/DATANODE",
+ "HostRoles" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "host_name" : "host1"
+ }
+ },
+ ...
+ ]
+ }
+
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/hosts.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/hosts.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/hosts.md (original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/hosts.md Thu Feb 14
22:16:53 2013
@@ -27,3 +27,22 @@ Returns a collection of all hosts in a g
**Response**
200 OK
+ {
+ "href" : "http://your.ambari.server/api/v1/clusters/c1/hosts/",
+ "items" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host1",
+ "Hosts" : {
+ "cluster_name" : "c1",
+ "host_name" : "host1"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/hosts/host2",
+ "Hosts" : {
+ "cluster_name" : "c1",
+ "host_name" : "host2"
+ }
+ }
+ ]
+ }
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/index.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/index.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/index.md (original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/index.md Thu Feb 14
22:16:53 2013
@@ -18,7 +18,7 @@ limitations under the License.
Ambari API Reference v1
=========
-The Ambari API provides access to monitoring and metrics information of a
Apache Hadoop cluster. This document describes the resources used in the Ambari
API and is intended for developers who want to integrate with Ambari.
+The Ambari API provides access to monitoring and metrics information of a
Apache Hadoop cluster. This document describes the resources and syntax used in
the Ambari API and is intended for developers who want to integrate with Ambari.
- [Release Version](#release-version)
- [Authentication](#authentication)
@@ -30,7 +30,7 @@ The Ambari API provides access to monito
Release Version
----
-_Last Updated December 28, 2012_
+_Last Updated February 13, 2013_
Authentication
----
@@ -54,58 +54,82 @@ There are 2 types of resources in the Am
- **Instance Resource:** This resource type refers to a single specific
resource. For example:
- /clusters/MyCluster
+ /clusters/c1
- _Refers to the cluster resource identified by the id "MyCluster"_
-
-### Clusters
+ _Refers to the cluster resource identified by the id "c1"_
+### clusters
- [List clusters](clusters.md)
- [View cluster information](clusters-cluster.md)
-### Services
-
+### services
- [List services](services.md)
- [View service information](services-service.md)
-- [View service components](components.md)
-- [View component information](components-component.md)
-### Hosts
+### components
+- [List service components](components.md)
+- [View component information](components-component.md)
+### hosts
- [List hosts](hosts.md)
- [View host information](hosts-host.md)
+
+### host_components
- [List host components](host-components.md)
- [View host component information](host-component.md)
Partial Response
----
-A mechanism used to control which fields are returned by a query. Partial
response can be used to restrict which fields are returned and additionally, it
allows a query to reach down and return data from sub-resources. The keyword
âfieldsâ is used to specify a partial response. Only the fields listed
will be returned to the client. To specify sub-elements, use the notation
âa/b/câ. The wildcard â*â can be used to show all fields for a
resource. This can be combined to provide âexpandâ functionality for
sub-components. Some fields are always returned for a resource regardless of
the specified partial response fields. These fields are the fields which
uniquely identify the resource. This would be the primary id field of the
resource and the foreign keys to the primary id fields of all ancestors of the
resource.
+Used to control which fields are returned by a query. Partial response can be
used to restrict which fields are returned and additionally, it allows a query
to reach down and return data from sub-resources. The keyword âfieldsâ is
used to specify a partial response. Only the fields specified will be returned
to the client. To specify sub-elements, use the notation âa/b/câ.
Properties, categories and sub-resources can be specified. The wildcard
â*â can be used to show all categories, fields and sub-resources for a
resource. This can be combined to provide âexpandâ functionality for
sub-components. Some fields are always returned for a resource regardless of
the specified partial response fields. These fields are the fields, which
uniquely identify the resource. This would be the primary id field of the
resource and the foreign keys to the primary id fields of all ancestors of the
resource.
-**Example: Partial Response (Name and All metrics)*
+**Example: Using Partial Response to restrict response to a specific field**
- GET
/api/v1/clusters/MyCluster/services/HDFS/components/NAMENODE?fields=name,metrics
+ GET
/api/v1/clusters/c1/services/HDFS/components/NAMENODE?fields=metrics/disk/disk_total
+ 200 OK
{
âhrefâ:
â.../api/v1/clusters/c1/services/HDFS/components/NAMENODE?fields=metrics/disk/disk_totalâ,
âServiceComponentInfoâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : NAMENODEâ,
âservice_nameâ : âHDFSâ
},
âmetricsâ : {
"disk" : {
"disk_total" : 100000
}
}
}
+
**Example: Using Partial Response to restrict response to specified category**
- 200 OK
- {
- âhrefâ
:â.../api/v1/clusters/MyCluster/services/HDFS/components/NAMENODE?fields=name,metricsâ,
- ânameâ: âNAMENODEâ,
- âmetricsâ: [
- {
- ...
- }
- ]
- }
+ GET
/api/v1/clusters/c1/services/HDFS/components/NAMENODE?fields=metrics/disk
+
+ 200 OK
{
âhrefâ:
â.../api/v1/clusters/c1/services/HDFS/components/NAMENODE?fields=metrics/diskâ,
âServiceComponentInfoâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : NAMENODEâ,
âservice_nameâ : âHDFSâ
},
âmetricsâ : {
"disk" : {
"disk_total" : 100000,
âdisk_freeâ : 50000,
âpart_max_usedâ : 1010
}
}
}
+
+**Example â Using Partial Response to restrict response to multiple
fields/categories**
+
+ GET
/api/v1/clusters/c1/services/HDFS/components/NAMENODE?fields=metrics/disk/disk_total,metrics/cpu
+
+ 200 OK
{
âhrefâ:
â.../api/v1/clusters/c1/services/HDFS/components/NAMENODE?fields=metrics/disk/disk_total,metrics/cpuâ,
âServiceComponentInfoâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : NAMENODEâ,
âservice_nameâ : âHDFSâ
},
âmetricsâ : {
"disk" : {
"disk_total" : 100000
},
âcpuâ : {
âcpu_speedâ : 10000000,
âcpu_numâ : 4,
âcpu_idleâ : 999999,
...
}
}
}
**Example â Using Partial Response to restrict response to a sub-resource**
+
GET /api/v1/clusters/c1/hosts/host1?fields=host_components
+
200 OK
{
âhrefâ:
â.../api/v1/clusters/c1/hosts/host1?fields=host_componentsâ,
âHostsâ : {
âcluster_nameâ : âc1â,
âhost_nameâ : âhost1â
},
âhost_componentsâ: [
{
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/NAMENODEâ
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : âNAMENODEâ,
âhost_nameâ : âhost1â
}
},
{
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/DATANODEâ
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : DATANODEâ,
âhost_nameâ : âhost1â
}
},
+ ...
]
}
**Example â Using Partial Response to expand a sub-resource one level deep**
+
GET /api/v1/clusters/c1/hosts/host1?fields=host_components/*
+
200 OK
{
âhrefâ:
â.../api/v1/clusters/c1/hosts/host1?fields=host_components/*â,
âHostsâ : {
âcluster_nameâ : âc1â,
âhost_nameâ : âhost1â
},
+ âhost_componentsâ: [
{
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/DATANODEâ
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : DATANODEâ,
âhost_nameâ : âhost1â,
âstateâ : âRUNNINGâ,
...
},
"host" : {
"href" : ".../api/v1/clusters/c1/hosts/host1"
},
âmetricsâ : {
"disk" : {
"disk_total" : 100000000,
"disk_free" : 5000000,
"part_max_used" : 10101
},
...
},
"component" : {
"href" :
"http://ambari.server/api/v1/clusters/c1/services/HDFS/components/NAMENODE",
âServiceComponentInfoâ : {
"cluster_name" : "c1",
"component_name" : "NAMENODE",
"service_name" : "HDFS"
}
}
},
...
]
}
+**Example â Using Partial Response for multi-level expansion of
sub-resources**
+
+ GET /api/v1/clusters/c1/hosts/host1?fields=host_components/component/*
+
+ 200 OK
{
âhrefâ:
âhttp://ambari.server/api/v1/clusters/c1/hosts/host1?fields=host_components/*â,
âHostsâ : {
âcluster_nameâ : âc1â,
âhost_nameâ : âhost1â
...
},
+ âhost_componentsâ: [
+ {
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/DATANODEâ,
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : DATANODEâ,
âhost_nameâ : âhost1â
},
"component" : {
"href" :
"http://ambari.server/api/v1/clusters/c1/services/HDFS/components/DATANODE",
âServiceComponentInfoâ : {
"cluster_name" : "c1",
"component_name" : "DATANODE",
"service_name" : "HDFS"
...
},
âmetricsâ: {
âdfsâ: {
âdatanodeâ : {
âblocks_written " : 10000,
âblocks_read" : 5000,
...
}
},
âdiskâ: {
"disk_total " : 1000000,
âdisk_free" : 50000,
...
},
...
+ }
}
},
{
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/NAMENODEâ,
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : NAMENODEâ,
âhost_nameâ : âhost1â
},
"component" : {
"href" :
"http://ambari.server/api/v1/clusters/c1/services/HDFS/components/NAMENODE",
âServiceComponentInfoâ : {
"cluster_name" : "c1",
"component_name" : "NAMENODE",
"service_name" : "HDFS"
},
âmetricsâ: {
âdfsâ: {
ânamenodeâ : {
âFilesRenamed " : 10,
âFilesDeleted" : 5
â¦
}
+ },
âdiskâ: {
"disk_total " : 1000000,
âdisk_free" : 50000,
...
}
},
...
}
},
...
]
}
**Example: Using Partial Response to expand collection resource instances one
level deep**
+
GET /api/v1/clusters/c1/hosts?fields=*
+
200 OK
{
âhrefâ :
âhttp://ambari.server/api/v1/clusters/c1/hosts/?fields=*â,
âitemsâ: [
{
âhrefâ :
âhttp://ambari.server/api/v1/clusters/c1/hosts/host1â,
âHostsâ : {
âcluster_nameâ : âc1â,
âhost_nameâ : âhost1â
},
âmetricsâ: {
âprocessâ: {
"proc_total" : 1000,
"proc_run" : 1000
},
...
},
âhost_componentsâ: [
{
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/NAMENODEâ
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : âNAMENODEâ,
âhost_nameâ : âhost1â
}
},
{
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/DATANODEâ
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : DATANODEâ,
âhost_nameâ : âhost1â
}
},
...
},
...
},
{
âhrefâ :
âhttp://ambari.server/api/v1/clusters/c1/hosts/host2â,
âHostsâ : {
âcluster_nameâ : âc1â,
âhost_nameâ : âhost2â
},
âmetricsâ: {
âprocessâ: {
"proc_total" : 555,
"proc_run" : 55
},
...
},
âhost_componentsâ: [
{
âhrefâ:
ââ¦/api/v1/clusters/c1/hosts/host1/host_components/DATANODEâ
âHostRolesâ : {
âcluster_nameâ : âc1â,
âcomponent_nameâ : âDATANODEâ,
âhost_nameâ : âhost2â
}
},
...
],
...
},
...
]
}
### Additional Partial Response Examples
+
**Example â For each cluster, get cluster name, all hostnameâs and all
service names**
+
GET
/api/v1/clusters?fields=Clusters/cluster_name,hosts/Hosts/host_name,services/ServiceInfo/service_name
+
**Example - Get all hostnameâs for a given component**
+
GET
/api/v1/clusters/c1/services/HDFS/components/DATANODE?fields=host_components/HostRoles/host_name
+
**Example - Get all hostnameâs and component names for a given service**
+
GET
/api/v1/clusters/c1/services/HDFS?fields=components/host_components/HostRoles/host_name,
+
components/host_components/HostRoles/component_name
-Query Parameters
+Query Predicates
----
-This mechanism limits which data is returned by a query based on a
predicate(s). Providing query parameters does not result in any link expansion
in the data that is returned to the client although it may result in expansion
on the server to apply predicates on sub-objects.
+Used to limit which data is returned by a query. This is synonymous to the
âwhereâ clause in a SQL query. Providing query parameters does not result
in any link expansion in the data that is returned, with the exception of the
fields used in the predicates. Query predicates can only be applied to
collection resources. A predicate consists of at least one relational
expression. Predicates with multiple relational expressions also contain
logical operators, which connect the relational expressions. Predicates may
also use brackets for explicit grouping of expressions.
-_Note: Only applies to collection resources. And all URLs must be properly URL
encoded_
-
-**Query Operators**
+###Relational Query Operators
<table>
<tr>
@@ -115,58 +139,169 @@ _Note: Only applies to collection resour
</tr>
<tr>
<td>=</td>
- <td>name=host1</th>
- <td>String or numerical equals</td>
+ <td>name=host1</td>
+ <td>String or numerical EQUALS</td>
</tr>
<tr>
<td>!=</td>
- <td>host!=host1</th>
- <td>String or numerical not equals</td>
+ <td>name!=host1</td>
+ <td>String or numerical NOT EQUALS</td>
</tr>
<tr>
<td><</td>
- <td>disk_total<50</th>
- <td>Numerical less than</td>
+ <td>disk_total<50</td>
+ <td>Numerical LESS THAN</td>
</tr>
<tr>
<td>></td>
- <td>disk_total>50</th>
- <td>Numerical greater than</td>
+ <td>disk_total>50</td>
+ <td>Numerical GREATER THAN</td>
</tr>
<tr>
<td><=</td>
- <td>disk_total<=50</th>
- <td>Numerical less than or equals</td>
+ <td>disk_total<=50</td>
+ <td>Numerical LESS THAN OR EQUALS</td>
</tr>
<tr>
<td>>=</td>
- <td>disk_total>=50</th>
- <td>Numerical greater than or equals</td>
+ <td>disk_total>=50</td>
+ <td>Numerical GREATER THAN OR EQUALS</td>
+ </tr>
+</table>
+
+###Logical Query Operators
+
+<table>
+ <tr>
+ <th>Operator</th>
+ <th>Example</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>|</td>
+ <td>name=host1|name=host2</td>
+ <td>Logical OR operator</td>
+ </tr>
+ <tr>
+ <td>&</td>
+ <td>prop1=foo&prop2=bar</td>
+ <td>Logical AND operator</td>
</tr>
<tr>
- <td>or</td>
- <td>disk_total>50 or disk_free<100</th>
- <td>Logial 'or'</td>
+ <td>!</td>
+ <td>!prop<50</td>
+ <td>Logical NOT operator</td>
</tr>
</table>
-**Example: Get all hosts with less than 100 "disk_total"**
+**Logical Operator Precedence**
- GET /api/v1/clusters/c1/hosts?metrics/disk/disk_total<100
+Standard logical operator precedence rules apply. The above logical operators
are listed in order of precedence starting with the lowest priority.
-Errors
+###Brackets
+
+<table>
+ <tr>
+ <th>Bracket</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>(</td>
+ <td>Opening Bracket</td>
+ </tr>
+ <tr>
+ <td>)</td>
+ <td>Closing Bracket</td>
+ </tr>
+
+</table>
+
+Brackets can be used to provide explicit grouping of expressions. Expressions
within brackets have the highest precedence.
+
+###Operator Functions
+
+<table>
+ <tr>
+ <th>Operator</th>
+ <th>Example</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>in()</td>
+ <td>name.in(foo,bar)</td>
+ <td>IN function. More compact form of name=foo|name=bar. </td>
+ </tr>
+ <tr>
+ <td>isEmpty()</td>
+ <td>category.isEmpty()</td>
+ <td>Used to determine if a category contains any properties. </td>
+ </tr>
+</table>
+Operator functions behave like relational operators and provide additional
functionality. Some operator functions, such as in(), act as binary operators
like the above relational operators, where there is a left and right operand.
Some operator functions are unary operators, such as isEmpty(), where there is
only a single operand.
+
+###Query Examples
+
+**Example â Get all hosts with âHEALTHYâ status that have 2 or more cpu**
+
+ GET
/api/v1/clusters/c1/hosts?Hosts/host_status=HEALTHY&Hosts/cpu_count>=2
+
+**Example â Get all hosts with less than 2 cpu or host status != HEALTHY**
+
GET
/api/v1/clusters/c1/hosts?Hosts/cpu_count<2|Hosts/host_status!=HEALTHY
**Example â Get all ârhel6â hosts with less than 2 cpu or âcentos6â
hosts with 3 or more cpu**
+
GET
/api/v1/clusters/c1/hosts?Hosts/os_type=rhel6&Hosts/cpu_count<2|Hosts/os_type=centos6&Hosts/cpu_count>=3
**Example â Get all hosts where either state != âHEALTHYâ or
last_heartbeat_time < 1360600135905 and rack_info=âdefault_rackâ**
GET
/api/v1/clusters/c1/hosts?(Hosts/host_status!=HEALTHY|Hosts/last_heartbeat_time<1360600135905)
+ &Hosts/rack_info=default_rack
**Example â Get hosts with host name of host1 or host2 or host3 using IN
operator**
+ GET /api/v1/clusters/c1/hosts?Hosts/host_name.in(host1,host2,host3)
**Example â Get and expand all HDFS components, which have at least 1
property in the âmetrics/jvmâ category (combines query and partial response
syntax)**
GET
/api/v1/clusters/c1/services/HDFS/components?!metrics/jvm.isEmpty()&fields=*
Temporal Metrics
+----
+
+Some metrics have values that are available across a range in time. To query
a metric for a range of values, the following partial response syntax is used.
To get temporal data for a single property:
?fields=category/property[start-time,end-time,step]
To get temporal data for all properties in a category:
?fields=category[start-time,end-time,step]
start-time: Required field. The start time for the query in Unix epoch time
format.
end-time: Optional field, defaults to now. The end time for the query in Unix
epoch time format.
step: Optional field, defaults to the corresponding metrics systemâs default
value. If provided, end-time must also be provided. The interval of time
between returned data points specified in seconds. The larger the value
provided, the fewer data points returned so this can be used to limit how much
data is returned for the given time range. This is only used as a suggestion
so the result interval may differ from the one specified.
The returned result is a list of data points over the specified time range.
Each data point is a value / timestamp pair.
**Note**: It is important to understand that requesting large amounts of
temporal data may result in severe performance degradation. **Always** request
the minimal amount of information necessary. If large amounts of data are
required, consider splitting the request up into multiple smaller requests.
+
**Example â Temporal Query for a single property using only start-time**
+
GET
/api/v1/clusters/c1/hosts/host1?fields=metrics/jvm/gcCount[1360610225]
+
+ 200 OK
{
âhrefâ :
â¦/api/v1/clusters/c1/hosts/host1?fields=metrics/jvm/gcCount[1360610225]â,
...
âmetricsâ: [
{
âjvmâ: {
"gcCount" : [
[10, 1360610165],
[12, 1360610180],
[13, 1360610195],
[14, 1360610210],
[15, 1360610225]
]
}
}
]
}
**Example â Temporal Query for a category using start-time, end-time and
step**
+
GET
/api/v1/clusters/c1/hosts/host1?fields=metrics/jvm[1360610200,1360610500,100]
+
200 OK
{
âhrefâ :
â¦/clusters/c1/hosts/host1?fields=metrics/jvm[1360610200,1360610500,100]â,
...
âmetricsâ: [
{
âjvmâ: {
"gcCount" : [
[10, 1360610200],
[12, 1360610300],
[13, 1360610400],
[14, 1360610500]
],
"gcTimeMillis" : [
[1000, 1360610200],
[2000, 1360610300],
[5000, 1360610400],
[9500, 1360610500]
],
...
}
}
]
}
+
+HTTP Return Codes
----
-This section describes how errors are represented in a response.
+The following HTTP codes may be returned by the API.
+<table>
+ <tr>
+ <th>HTTP CODE</th>
+ <th>Description</th>
+ </tr>
+ <tr>
+ <td>200</td>
+ <td>OK</td>
+ </tr>
+ <tr>
+ <td>400</td>
+ <td>Bad Request</td>
+ </tr>
+ <tr>
+ <td>401</td>
+ <td>Unauthorized</td>
+ </tr>
+ <tr>
+ <td>403</td>
+ <td>Forbidden</td>
+ </tr>
+ <tr>
+ <td>404</td>
+ <td>Not Found</td>
+ </tr>
+ <tr>
+ <td>500</td>
+ <td>Internal Server Error</td>
+ </tr>
+</table>
+
+
+Errors
+----
-**Response**
+**Example errors responses**
- 404 Not Found
- {
- âstatusâ: 404,
- âmessageâ: âstandard messageâ,
- âdeveloperMessageâ: âverbose developers messageâ,
- âcodeâ: 1234,
- âmoreInfoâ, â...â
- }
+ 404 Not Found
{
"status" : 404,
"message" : "The requested resource doesn't exist: Cluster not found,
clusterName=someInvalidCluster"
}
+
400 Bad Request
{
"status" : 400,
"message" : "The properties [foo] specified in the request or predicate
are not supported for the
+ resource type Cluster."
}
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/services-service.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/services-service.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/services-service.md
(original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/services-service.md Thu
Feb 14 22:16:53 2013
@@ -28,43 +28,45 @@ Refers to a specific service identified
200 OK
{
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "HDFS"
- },
- "components" : [
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/NAMENODE",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "NAMENODE",
- "service_name" : "HDFS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/DATANODE",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "DATANODE",
- "service_name" : "HDFS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/HDFS_CLIENT",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "HDFS_CLIENT",
- "service_name" : "HDFS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HDFS/components/SECONDARY_NAMENODE",
- "ServiceComponentInfo" : {
- "cluster_name" : "MyCluster",
- "component_name" : "SECONDARY_NAMENODE",
- "service_name" : "HDFS"
- }
- } ]
+ "href" : "http://your.ambari.server/api/v1/clusters/c1/services/HDFS",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "HDFS",
+ "state" : "STARTED"
+ },
+ "components" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/NAMENODE",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "NAMENODE",
+ "service_name" : "HDFS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/DATANODE",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "DATANODE",
+ "service_name" : "HDFS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/HDFS_CLIENT",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "HDFS_CLIENT",
+ "service_name" : "HDFS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HDFS/components/SECONDARY_NAMENODE",
+ "ServiceComponentInfo" : {
+ "cluster_name" : "c1",
+ "component_name" : "SECONDARY_NAMENODE",
+ "service_name" : "HDFS"
+ }
+ }
+ ]
}
Modified: incubator/ambari/trunk/ambari-server/docs/api/v1/services.md
URL:
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/docs/api/v1/services.md?rev=1446365&r1=1446364&r2=1446365&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/docs/api/v1/services.md (original)
+++ incubator/ambari/trunk/ambari-server/docs/api/v1/services.md Thu Feb 14
22:16:53 2013
@@ -28,28 +28,28 @@ Returns a collection of the services in
200 OK
{
- "href" : "http://your.ambari.server/api/v1/clusters/MyCluster/services",
- "items" : [
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/NAGIOS",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "NAGIOS"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/HCATALOG",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "HCATALOG"
- }
- },
- {
- "href" :
"http://your.ambari.server/api/v1/clusters/MyCluster/services/PIG",
- "ServiceInfo" : {
- "cluster_name" : "MyCluster",
- "service_name" : "PIG"
- }
- }
- ]
- }
+ "href" : "http://your.ambari.server/api/v1/clusters/c1/services",
+ "items" : [
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/NAGIOS",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "NAGIOS"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/HCATALOG",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "HCATALOG"
+ }
+ },
+ {
+ "href" :
"http://your.ambari.server/api/v1/clusters/c1/services/PIG",
+ "ServiceInfo" : {
+ "cluster_name" : "c1",
+ "service_name" : "PIG"
+ }
+ }
+ ]
+ }
\ No newline at end of file