API response is null

Hi,
I’m building a bouncer for https://lemonldap-ng.org
When I tried to API with /v1/decisions?ip=x.x.x.x I got a HTTP 200 response with a null value, is it normal ?

1 Like

Some info:

$ sudo cscli decisions list
+------+--------+------------------+------------------------------------+--------+---------+----+--------+---------------------+----------+
|  ID  | SOURCE |   SCOPE:VALUE    |               REASON               | ACTION | COUNTRY | AS | EVENTS |     EXPIRATION      | ALERT ID |
+------+--------+------------------+------------------------------------+--------+---------+----+--------+---------------------+----------+
| 1362 | cscli  | Ip:109.89.30.163 | manual 'ban' from                  | ban    |         |    |      1 | 22h21m17.795792286s |       19 |
|      |        |                  | 'dfeb2f1212e542ee9212de1cfe9f40b9' |        |         |    |        |                     |          |
+------+--------+------------------+------------------------------------+--------+---------+----+--------+---------------------+----------+
$ sudo curl -X GET -I "http://127.0.0.1:8080/v1/decisions?ip=109.89.30.163" -H  "accept: application/json" -H "X-Api-Key: xxx"
HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Date: Sat, 30 Jan 2021 20:59:19 GMT
Transfer-Encoding: chunked

Problem is due to -I parameter which hides content…