@PUT
  @Consumes(MediaType.TEXT_PLAIN)
  @Produces(MediaType.APPLICATION_JSON)
  public Response writeConfiguration(String requestBody) {
    LOG.debug("writeConfiguration for request : {} ", requestBody);
    JSONObject response;
    try {

      if (isOperator() == false) {
        LOG.error("returning 401 as not an operator.");
        return Response.status(401).build();
      }

      Map<String, String> headers = new HashMap<String, String>();
      headers.put("Content-Type", "application/x-www-form-urlencoded");
      String responseString = ambariApi.requestClusterAPI("", "PUT",requestBody, headers);
      response = getJsonObject(responseString);

    } catch (WebApplicationException ex) {
      LOG.error("Exception occurred : ", ex);
      throw ex;
    } catch (Exception ex) {
      LOG.error("Exception occurred : ", ex);
      throw new ServiceFormattedException(ex.getMessage(), ex);
    }

    return Response.ok(response).build();
  }
Sets capacity scheduler configuration.

@return the http response
contrib/views/capacity-scheduler/src/main/java/org/apache/ambari/view/capacityscheduler/ConfigurationService.java