Return-Path: X-Original-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-ambari-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9FC0B10724 for ; Fri, 22 Nov 2013 02:40:37 +0000 (UTC) Received: (qmail 82678 invoked by uid 500); 22 Nov 2013 02:40:36 -0000 Delivered-To: apmail-incubator-ambari-dev-archive@incubator.apache.org Received: (qmail 82645 invoked by uid 500); 22 Nov 2013 02:40:36 -0000 Mailing-List: contact ambari-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ambari-dev@incubator.apache.org Delivered-To: mailing list ambari-dev@incubator.apache.org Received: (qmail 82563 invoked by uid 99); 22 Nov 2013 02:40:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Nov 2013 02:40:36 +0000 Date: Fri, 22 Nov 2013 02:40:36 +0000 (UTC) From: "Tom Beerbower (JIRA)" To: ambari-dev@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-3849) Need ability to filter out href field in requests MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-3849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13829609#comment-13829609 ] Tom Beerbower commented on AMBARI-3849: --------------------------------------- To get a minimal response, use the query string parameter *minimal_response=true*. This will remove all hrefs from the response. In addition, only minimal resource id fields and explicitly requested fields will be returned. For example, the normal request ... {code} /api/v1/clusters/c1/hosts?fields=Hosts/host_status,host_components/HostRoles/state { "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/hosts?fields=Hosts/host_status,host_components/HostRoles/state", "items" : [ { "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org", "Hosts" : { "cluster_name" : "c1", "host_name" : "c6401.ambari.apache.org", "host_status" : "HEALTHY" }, "host_components" : [ { "href" : "http://c6401.ambari.apache.org:8080/api/v1/clusters/c1/hosts/c6401.ambari.apache.org/host_components/DATANODE", "HostRoles" : { "cluster_name" : "c1", "component_name" : "DATANODE", "host_name" : "c6401.ambari.apache.org", "state" : "STARTED" } }, ... ] } ] } {code} will look like this with *minimal_response=true* ... {code} /api/v1/clusters/c1/hosts?fields=Hosts/host_status,host_components/HostRoles/state&minimal_response=true { "items" : [ { "Hosts" : { "host_name" : "c6401.ambari.apache.org", "host_status" : "HEALTHY" }, "host_components" : [ { "HostRoles" : { "component_name" : "DATANODE", "state" : "STARTED" } }, ... ] } ] } {code} > Need ability to filter out href field in requests > ------------------------------------------------- > > Key: AMBARI-3849 > URL: https://issues.apache.org/jira/browse/AMBARI-3849 > Project: Ambari > Issue Type: Task > Reporter: Tom Beerbower > Assignee: Tom Beerbower > > On some API requests on large clusters, half the time is spent in generating, and half the time in transporting content. To cut down on the amount of content transported, we need a way to filter out the 'href' field. > On a 2MB hosts response, 0.5MB is just the hrefs field. -- This message was sent by Atlassian JIRA (v6.1#6144)