appd-client/src/main/java/com/signalfx/appd/client/MetricDataRequest.java
public List<MetricData> get() throws RequestException, UnauthorizedException {
        HttpResponse<String> response;
        try {
            response = Unirest.get(
                    this.appdURL + "/controller/rest/applications/" + appName + "/metric-data")
                    .header("accept", "application/json")
                    .basicAuth(this.appdUsername, this.appdPassword)
                    .queryString(getQueryString())
                    .queryString("output", "json")
                    .asString();
        } catch (UnirestException e) {
            throw new RequestException("Something was wrong with sending request.", e);
        }
        if (response == null) {
            throw new RequestException("Response is empty.");
        }
        switch (response.getStatus()) {
        case 200: {
            return process(new JsonNode(response.getBody()));
        }
        case 401: {
            throw new UnauthorizedException("Authentication failed");
        }
        default: {
            throw new RequestException("Unhandled response code " + response.getStatus());
        }
        }
    }
public List<MetricData> get() throws RequestException, UnauthorizedException {
        HttpResponse<String> response;
        try {
            response = Unirest.get(
                    this.appdURL + "/controller/rest/applications/" + appName + "/metric-data")
                    .header("accept", "application/json")
                    .basicAuth(this.appdUsername, this.appdPassword)
                    .queryString(getQueryString())
                    .queryString("output", "json")
                    .asString();
        } catch (UnirestException e) {
            throw new RequestException("Something was wrong with sending request.", e);
        }
        if (response == null) {
            throw new RequestException("Response is empty.");
        }
        switch (response.getStatus()) {
        case 200: {
            return process(new JsonNode(response.getBody()));
        }
        case 401: {
            throw new UnauthorizedException("Authentication failed");
        }
        default: {
            throw new RequestException("Unhandled response code " + response.getStatus());
        }
        }
    }
public List < MetricData > get ( ) throws RequestException , UnauthorizedException { HttpResponse < String > response ; try { response = Unirest . get ( this . appdURL + "/controller/rest/applications/" + appName + "/metric-data" ) . header ( "accept" , "application/json" ) . basicAuth ( this . appdUsername , this . appdPassword ) . queryString ( getQueryString ( ) ) . queryString ( "output" , "json" ) . asString ( ) ; } catch ( UnirestException e ) { throw new RequestException ( "Something was wrong with sending request." , e ) ; } if ( response == null ) { throw new RequestException ( "Response is empty." ) ; } switch ( response . getStatus ( ) ) { case 200 : { return process ( new JsonNode ( response . getBody ( ) ) ) ; } case 401 : { throw new UnauthorizedException ( "Authentication failed" ) ; } default : { throw new RequestException ( "Unhandled response code " + response . getStatus ( ) ) ; } } }
Perform retrieval of metrics from AppDynamics using specified parameters.

@return list of metric data.
@throws RequestException
when there was an error with request.
@throws UnauthorizedException
when unable to authorize with given credentials.
Perform retrieval of metrics from AppDynamics using specified parameters .