Bad Request on .../stats call

tdavid99
Participant I

I am making the call below and receiving a "Bad Request; Unknown Version" HTML response.

System is 4.18.0.5 Private Cloud.

Can someone tell me what is wrong with my request?

Request (crlfs added to avoid pasting problem):

curl -v "HOST/o/org/e /env/stats/traffic,response_status_code?select=sum(message_count),avg(total_response_time),tps&timeRange=09/25/2018 00:00~10/01/2018 23:59"

* Trying 10.10.53.21...

* Connected to <hostname> (10.10.53.21) port 8080 (#0)

* Server auth using Basic with user '<username>'

> Host: <hostname>:8080

> Authorization: Basic dGVycib<modified>G9jay5jb06JGt5cDFsMFQ=

> User-Agent: curl/7.47.0

> Accept: */*

Response:

< HTTP/1.1 400 Unknown Version

< Content-Type: text/html;charset=iso-8859-1

< Content-Length: 58

< Connection: close

< * Closing connection 0

<h1>Bad Message 400</h1><pre>reason: Unknown Version</pre>

[400]

Solved Solved
0 2 481
1 ACCEPTED SOLUTION

It looks right to me.

Maybe you need to url-encode the time range. Try that?

curl -v "HOST/o/org/e /env/stats/traffic,response_status_code?select=sum(message_count),avg(total_response_time),tps&timeRange=09%2F25%2F2018%2000%3A00~10%2F01%2F2018%2023%3A59"

View solution in original post

2 REPLIES 2

It looks right to me.

Maybe you need to url-encode the time range. Try that?

curl -v "HOST/o/org/e /env/stats/traffic,response_status_code?select=sum(message_count),avg(total_response_time),tps&timeRange=09%2F25%2F2018%2000%3A00~10%2F01%2F2018%2023%3A59"

I tried something similar

curl -v HOST/o/org/e/env/stats/traffic,response_status_code?"select=sum(message_count),avg(total_response_time),tps&timeRange=09/25/2018%2000:00~10/01/2018%2023:59&filter=(request_uri like '/health%')"

this too gives 400 unknown version error. but works w/o the filter