Update Service ===== [Back to Resources](index.md#resources) **Summary** Update the service identified by ":serviceName" of the cluster identified by ":clusterName". PUT /clusters/:clusterName/services/:serviceName **Response**
HTTP CODE Description
200 OK
202 Accepted
400 Bad Request
401 Unauthorized
403 Forbidden
500 Internal Server Error
**Example 1** Start the HDFS service (update the state of the HDFS service to be ‘STARTED’). PUT /clusters/c1/services/HDFS { "ServiceInfo": { "state" : "STARTED” } } 202 Accepted { "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/3", "Requests" : { "id" : 3, "status" : "InProgress" } } **Example 2** Stop the HDFS service (update the state of the HDFS service to be ‘INSTALLED’). PUT /clusters/c1/services/HDFS/ { "ServiceInfo": { "state" : "INSTALLED” } } 202 Accepted { "href" : "http://your.ambari.server/api/v1/clusters/c1/requests/4", "Requests" : { "id" : 4, "status" : "InProgress" } }