@Override
  public SortRequest getSortRequest() {
    String sortByParams = m_uriInfo.getQueryParameters().getFirst(QueryLexer.QUERY_SORT);
    if (sortByParams != null && !sortByParams.isEmpty()) {
      String[] params = sortByParams.split(",");
      List<SortRequestProperty> properties = new ArrayList<>();
      if (params.length > 0) {
        for (String property : params) {
          SortRequest.Order order = SortRequest.Order.ASC;
          String propertyId = property;
          int idx = property.indexOf(".");
          if (idx != -1) {
            order = SortRequest.Order.valueOf(property.substring(idx + 1).toUpperCase());
            propertyId = property.substring(0, idx);
          }
          properties.add(new SortRequestProperty(propertyId, order));
        }
      }

      return new SortRequestImpl(properties);
    }
    return null;
  }
Parse the query string for the {@link QueryLexer#QUERY_FORMAT} property and obtain
a renderer from the associated resource definition based on this property value.
ambari-server/src/main/java/org/apache/ambari/server/api/services/BaseRequest.java