Community discussions

MikroTik App
 
plm
just joined
Topic Author
Posts: 4
Joined: Fri Feb 19, 2016 8:24 am

routeros v6.48.6 RB951G - API active and reachable but not responding

Mon May 01, 2023 9:57 am

Hi,
I am testing API access using cURL following the doc (https://help.mikrotik.com/docs/display/ROS/REST+API).
Both api and api-ssl are enabled, and reachable.
When testing an API call in both modes, TCP session is brought up and active (as shown in cURL traces and Wireshark capture and tested with nc) but there is no answer at HTTP level, the only thing that happen are
the regular tcp session keep-alive.
I checked that the default user "admin" has API rights. I temporarily disabled all FW filters rules just in case.
Any hint at what I am doing wrong or a way forward?
Kind regards

curl -vvv -k -u admin: http://192.168.87.22:8728/rest/ip/address
* Trying 192.168.87.22:8728...
* TCP_NODELAY set
* Connected to 192.168.87.22 (192.168.87.22) port 8728 (#0)
* Server auth using Basic with user 'admin'
> GET /rest/ip/address HTTP/1.1
> Host: 192.168.87.22:8728
> Authorization: Basic YWRtaW46
> User-Agent: curl/7.68.0
> Accept: */*
>
curl -vvv -k -u admin: https://bungalow.ici:8729/rest/ip/address
* Trying 192.168.87.22:8729...
* TCP_NODELAY set
* Connected to bungalow.ici (192.168.87.22) port 8729 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server did not agree to a protocol
* Server certificate:
* subject: CN=bungalow.ici
* start date: Apr 30 17:47:06 2023 GMT
* expire date: Apr 27 17:47:06 2033 GMT
* issuer: CN=bungalow.ici
* SSL certificate verify result: self signed certificate in certificate chain (19), continuing anyway.
* Server auth using Basic with user 'admin'
> GET /rest/ip/address HTTP/1.1
> Host: bungalow.ici:8729
> Authorization: Basic YWRtaW46
> User-Agent: curl/7.68.0
> Accept: */*
>
 
zainarbani
Frequent Visitor
Frequent Visitor
Posts: 54
Joined: Thu Jul 22, 2021 9:42 am
Location: Pati, Indonesia

Re: routeros v6.48.6 RB951G - API active and reachable but not responding

Mon May 01, 2023 3:02 pm

REST API was introduced on RouterOS v7.1beta4
 
plm
just joined
Topic Author
Posts: 4
Joined: Fri Feb 19, 2016 8:24 am

Re: routeros v6.48.6 RB951G - API active and reachable but not responding

Mon May 01, 2023 3:07 pm

Thx Zainarbani, I discovered effectively that using that page was a mistake and that I had instead to look into
https://help.mikrotik.com/docs/display/ROS/API.

Who is online

Users browsing this forum: WiesiDeluxe and 19 guests