Changes

Last read
Line 28: Line 28:     
[[File:RMS_API_Add_new_access_token.png|alt=|border|frameless|1193x1193px]]
 
[[File:RMS_API_Add_new_access_token.png|alt=|border|frameless|1193x1193px]]
      
Next, input a name for this access token and select the necessary Scopes. Scopes are basically permissions – what the access token will be capable of doing in your account. For this example, we will be selecting these scopes:
 
Next, input a name for this access token and select the necessary Scopes. Scopes are basically permissions – what the access token will be capable of doing in your account. For this example, we will be selecting these scopes:
Line 42: Line 41:  
[[File:RMS_API_Access_Token_Example.png|alt=|border|frameless|500x500px]]
 
[[File:RMS_API_Access_Token_Example.png|alt=|border|frameless|500x500px]]
   −
<br>
      
Now that we have the access token, we can now use the RMS API. All information about each API endpoint can be found in the '''API reference'''.
 
Now that we have the access token, we can now use the RMS API. All information about each API endpoint can be found in the '''API reference'''.
Line 50: Line 48:  
==Setting up Postman==
 
==Setting up Postman==
 
To start using post efficiently you can download the [https://rms.teltonika-networks.com/api/openapi/compiled.yaml RMS API Reference YAML file] which you will be able to upload to your Postman desktop application by simply clicking the import button in the desktop app and then uploading the downloaded YAML file.
 
To start using post efficiently you can download the [https://rms.teltonika-networks.com/api/openapi/compiled.yaml RMS API Reference YAML file] which you will be able to upload to your Postman desktop application by simply clicking the import button in the desktop app and then uploading the downloaded YAML file.
  −
   
[[File:Networking rut configuration example RMS API upload YAML to postman v1.png|border|frameless|384x384px]]
 
[[File:Networking rut configuration example RMS API upload YAML to postman v1.png|border|frameless|384x384px]]
   
=== Adding RMS API access token to Postman ===
 
=== Adding RMS API access token to Postman ===
 
After that, you will be able to set authorization for RMS API from Postman. To do this:
 
After that, you will be able to set authorization for RMS API from Postman. To do this:
Line 62: Line 57:  
# Select '''Type''' as "Bearer Token";
 
# Select '''Type''' as "Bearer Token";
 
# Enter your saved '''RMS API token''' to the '''Token''' field;
 
# Enter your saved '''RMS API token''' to the '''Token''' field;
      
[[File:Networking rut configuration example RMS API entering bearer token v1.png|border|frameless|1121x1121px]]
 
[[File:Networking rut configuration example RMS API entering bearer token v1.png|border|frameless|1121x1121px]]
    
=== Setting up authorization for API calls ===
 
=== Setting up authorization for API calls ===
This will allow us to copy in only one Bearer toke, which API calls will be able to inherit. To set this up, whenever you open a new API call, go to '''Authorization''' tab and select the '''Type''' as "Inherit from parent".
+
This will allow us to copy in only one Bearer token, which API calls will be able to inherit. To set this up, whenever you open a new API call, go to '''Authorization''' tab and select the '''Type''' as "Inherit from parent".[[File:Networking rut configuration example RMS API authorization for calls v1.png|border|frameless|386x386px]]
 
  −
 
  −
[[File:Networking rut configuration example RMS API authorization for calls v1.png|border|frameless|386x386px]]
  −
 
   
=== Searching for API calls ===
 
=== Searching for API calls ===
 
To follow this configuration example more easily, you can search for all of the API calls in the list:
 
To follow this configuration example more easily, you can search for all of the API calls in the list:
Line 78: Line 68:     
==Getting the device ID in RMS==
 
==Getting the device ID in RMS==
To get the ID of the device, for which we will want to generate RMS connect remote accesses and generate link for them, we first need to execute '''GET /devices''' API call called '''Get all device''' in the collection list.
+
To get the ID of the device, for which we will want to generate RMS connect remote accesses and generate links for them, we first need to execute '''GET /devices''' API call called '''Get all device''' in the collection list.
   −
To get the RMS device ID we need to make this call with API call keys: '''fields''' and '''q'''. Fields will make it so that the response will only contain fields which we entered and q will make it so that only the serial number we entered is outputted.
+
To get the RMS device ID we need to make this call with API call keys: '''fields''' and '''q'''. Fields will make it so that the response will only contain fields which we entered and q will make it so that only the device with entered serial number we entered is outputted.
    
The parameters and the response can be seen in the following image:
 
The parameters and the response can be seen in the following image:
Line 88: Line 78:     
Field "id" in the response string is the device ID in RMS.
 
Field "id" in the response string is the device ID in RMS.
   
== Adding a new remote device ==
 
== Adding a new remote device ==
 
This section will tell you how to a new remote device to RMS Connect.
 
This section will tell you how to a new remote device to RMS Connect.
Line 105: Line 94:  
** Telnet
 
** Telnet
   −
The call needed to add a remote remote access device/service is '''Post /devices/remote/access''' and can be find by name '''Create a remote access configuration''' in the collection list. This API call only needs to have a quest body and no keys. An example request body to add a remote access to the routers WebUI and the response after sending the call:
+
The call needed to add a remote remote access device/service is '''Post /devices/remote/access''' and can be found by name '''Create a remote access configuration''' in the collection list. This API call only needs to have a quest body and no keys. An example request body to add a remote access to the routers WebUI and the response after sending the call:
 
  −
 
   
[[File:Networking rut configuration example RMS API create remote access v1.png|frameless|685x685px]]
 
[[File:Networking rut configuration example RMS API create remote access v1.png|frameless|685x685px]]
   Line 127: Line 114:  
When the remote access ID is known, we can generate the remote access link with the RMS API call '''POST /devices/connect''' that in the API collection is called '''Start a RMS Connect session'''. This call will require both the variable keys and the request body.
 
When the remote access ID is known, we can generate the remote access link with the RMS API call '''POST /devices/connect''' that in the API collection is called '''Start a RMS Connect session'''. This call will require both the variable keys and the request body.
   −
The only key required is '''access_id''' which will be used to identify for which remote access configuration the link will be created.
+
The only key required is '''access_id''' which will be used to identify for which remote access configuration the link will be created.[[File:Networking rut configuration example RMS API generate rms link keys v1.png|border|frameless|696x696px]]
 
  −
 
  −
[[File:Networking rut configuration example RMS API generate rms link keys v1.png|border|frameless|696x696px]]
  −
 
  −
 
  −
The request body need to contain the '''duration''' that will be entered in seconds. There is no limit to the maximum value but note, that our time standard has some limits.
        −
[[File:Networking rut configuration example RMS API generate rms link body response v1.png|border|frameless|698x698px]]
+
The request body needs to contain the '''duration''' that will be entered in seconds. There is no limit to the maximum value but note, that the time standard has some limits.[[File:Networking rut configuration example RMS API generate rms link body response v1.png|border|frameless|698x698px]]
      Line 142: Line 123:     
== Getting the remote access link ==
 
== Getting the remote access link ==
After the link has been created, we can use the RMS API call '''GET /devices/connect/:access_id/sessions''' which in the API collection is called '''Get RMS Connect sessions'''. This call will display all of the links that are generated the specified remote access ID.  
+
After the link has been created, we can use the RMS API call '''GET /devices/connect/:access_id/sessions''' which in the API collection is called '''Get RMS Connect sessions'''. This call will display all of the links that are generated the specified remote access ID. Field '''Active''' will make it so only active links are outputted for the '''access_id''' that is provided
     

Navigation menu