Knowledge Base

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I resolve an empty server reply when making a REST call?

When making a REST API call with a curl command, how can I resolve an empty server reply?

 

Problem

When making a REST call with a curl command, an empty server reply server results:

 

Command:

curl  --user <user>@<account >:password "http://<controller url>/controller/rest/applications/<app-name>/metrics"

 

The output is:

* Trying [Redacted for sercurity reasons by ^  , AppD Community Manager]...
* Connected to cloud2019092621461.saas.appdynamics.com ([Redacted for sercurity reasons by ^  , AppD Community Manager]) port 443 (#0)
* Server auth using Basic with user 'govind.kumar@cloud2019092621461'
> GET /controller/rest/applications/Java-App/metrics HTTP/1.1
> Host: cloud2019092621461.saas.appdynamics.com:443
> Authorization: Basic [Redacted for sercurity reasons by ^  , AppD Community Manager]
> User-Agent: curl/7.47.0
> Accept: */*
>
* Empty reply from server
* Connection #0 to host cloud201909262146143.saas.appdynamics.com left intact

 

Solution

Use HTTPS in the Controller URL, as follows:

 

Command : curl --user <user>@<account >:password "https://<controller url>/controller/rest/applications/<app-name>/metrics"

 

 

Additional Resources

 

Version history
Revision #:
8 of 8
Last update:
‎07-19-2021 07:41 PM
Updated by:
 


Found this article helpful? Click the Thumbs Up button.
Have an additional comment? Post it below.
0 Kudos