API rms-connect/restart

I would like to use the RMS API to restart the connection to my RMS CONNECT | Remote Access device.

I can manully restart the connection by browsing to https://rms.teltonika-networks.com/remote/access/<DEVICE_ID> and clicking the restart icon, but I would like to do this from a script.

I have tried running the following command:

curl \
--header "Authorization: Bearer $RMS_PERSONAL_ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--request POST \
--data "{\"url\":\"$RMS_DEVICE_URL\"}" \
https://api.rms.teltonika-networks.com/rms-connect/restart

Response:

{"success":true,"meta":{"channel":"<STATUS_CHANNEL>"}}

However, this does not seem to restart the connection. If I run the following to get the channel details:

curl \
--header "Authorization: Bearer $RMS_PERSONAL_ACCESS_TOKEN" \
--request GET \
https://rms.teltonika-networks.com/status/channel/<STATUS_CHANNEL>

Response:

{"code":"UNAUTHORIZED","message":"Unauthorized."}

Is there any way I can get this to work so I can reconnect the link to my Remote Access device using an API call, rather than having to do so manually through the RMS website UI?

[Edited to make my question clearer.]

Hi,

If you want to restart your device using an API call, then you can refer to this link. Please note that this is still under development but feel free to explore.

To start, open any HTTP client such as Postman. Open a New tab. Then choose Post → Input the following http://192.168.1.1/api/login. Note: change the IP based on your configured LAN IP.

Under Body, choose raw and place the router’s username and password. After clicking Send, you should be receiving a session ID that you will need to use for Authorization.

Next is to initialize reboot. For that, open a new tab, choose Post → Insert http://192.168.1.1/api/administration/general/actions/reboot. Under Headers, type Content-Type and application/json. Similar to below.

After clicking Send, you should be receiving a response similar to this:

image

This means that the device will start to reboot.

Hope this helps!

Regards,
Janmiguel

Thank you, but I think you misunderstand me. I don’t want to reboot my device. What I want to do is the equivalent of clicking the Reconnect link icon, as shown in the below screenshot:

How do I do this using API calls?

In my original post, I have described the API calls I have tried so far, without success.

This topic was automatically closed after 15 days. New replies are no longer allowed.