Show Contents

# Automate operations with web services

You can write HTTP clients that remotely manage all your devices. Examples of such clients include web pages and programs written in a language such as Python or Java.

These clients send requests to the Remote Manager server using standard HTTP requests to retrieve data and remotely control your devices, as you can do from the Remote Manager web interface.

These web services allow you to schedule operations to devices en masse:

- Monitor all your devices. Remotely retrieve and visualize data to determine your devices' health.
- Update the device firmware. Update the firmware of one or more devices at the same time.
- Access the file system. Interact with files on your devices and list, upload, download, or remove files.
- Manage all your devices. Remotely configure and send specific requests to trigger processes in your devices.

A good starting point is the API Explorer. This tool allows you to run any web services request and view the response data, as well as export code as Python, Java, Ruby, Perl, or C## code.

For example, you can automate the firmware using these HTTP requests. To do so, follow these steps:

1. Log in to your Remote Manager account (https://remotemanager.digi.com).
2. Go to Documentation > API Explorer.
3. Select Examples > SCI > Firmware > Update firmware. Remote Manager automatically creates the necessary code.
4. Replace the "device id" value with the ID of your device.
5. Edit the code block with the following changes:
   1. Add the filename attribute to the <update_firmware> element. Its value should be either manifest.txt for fragmented firmware updates or any name ending in .swu for full package updates.
   2. Replace <file>~/file.bin</file> with <data>[Base 64 encoded data]</data>. You must encode the manifest.txt file or the *.swu package you want to install in Base 64 and put it within the <data> element.

> >     <sci_request version="1.0">
> >       <update_firmware filename="[manifest.txt|update_package.swu]">
> >         <targets>
> >           <device id="XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXX"/>
> >         </targets>
> >         <data>[Base 64 encoded data]</data>
> >       </update_firmware>
> >     </sci_request>

1. Click Export and then select the programming language you prefer. Remote Manager will generate the necessary code to automate this process.
2. You can test the firmware or application update by clicking Send.

Note For web services usage and reference information, see the Remote Manager Programmer Guide.

© 2018 Digi International Inc. All rights reserved.
Automate operations with web services updated on 22 January 2018 05:40:15 PM