Scalefusion Developer API
We at Scalefusion realize that an enterprise might be using other ITSM software and/or internal applications that need a quick and direct access to their managed device inventory and in some cases perform actions on the managed devices. This ensures that the IT Team do not have to switch the context explicitly from the internal application to Scalefusion Dashboard to perform tasks.
To address this requirement, Scalefusion provides a Developer API, that can be integrated into your internal applications and perform device management operations. This document guides you on how to enable the Developer API, how to use the API Explorer with some examples and some frequently asked questions.
Before you Begin
- Ensure that you have a valid Scalefusion account with permission to view Developer API.
- To test the APIs (the examples show here), you need to have,
- A Device managed by Scalefusion
- Have at-least one Device Profile
- Have at-least one Device Group
Step 1: Generating the API Key
The first step is to generate the Developer API Key that is used to authorize the API calls from your applications. To do so,
- Login to Scalefusion Dashboard and navigate to Integrations > Developer API
- Click on Generate API Key to generate a new API Key. This will generate the API Key that you can use with your applications.
- You need to Copy/Paste the API Key and share it with your application developer to use it in the application. You will also need the key to use the Scalefusion API Explorer.
Step 2: Testing the API Key using Scalefusion API Explorer
Now that you have the API Key, you can use the API Explorer to test the key and try out APIs. We have given some examples below, but feel free to try out other APIs as well.
- Click on READ API DOCS to launch the API Explorer,
- The first step in the API Explorer is to paste the API Key that you generated in Step 1.
- Global options for API Explorer are,
- Show/Hide: Show or hide the API section
- List Operations: Lists the HTTP operations that can be performed on this API
- Expand Operations: Opens up the expanded view of API console so that you can try all the APIs.
Example: Getting the Device ID(s)
This is the precursor to most API, that gives you the IDs of the managed devices, that can be used in other APIs. To try this,
- Click on the Devices API title to expand the devices API. Click on Try it out
- page: Leave this parameter blank to get all the devices.
- Sample Output: This returns the device information such as name, battery, status, IMEI etc. You can obtain and cache the id parameter for further use.
Example: Getting the Last 10 Locations
- Click on the Locations API to expand it. Enter/Paste a device id that you obtained previously. Click Try it Out.
- Sample Output: The last 10 locations are printed.
Example: Getting Device Profile ID(s)
- To get your Profile ID’s, click on device_profiles.json API, located under device_profiles section and click on Try it out
- Sample Output: This provides the ID as well as the name of every device profile in your account. You can cache these device profile IDs when using the APIs related to Device Profiles.
Example: Getting Device Group ID(s)
- To get your Group ID’s, click on device_groups.json API, located under device_groups section and click on Try it out
- Sample Output: This provides the Device Group ID (beside “id”), the name of the group, and the ID of any Device Profile that is associated with that group. You can cache these device group IDs when using the APIs related to Device Groups.
Example: Removing Devices from a Device Profile
- To remove a device from a profile, expand the remove_from_device.json API and enter the additional parameters,
- id: Enter the Device Profile Id.
- device_ID: Enter the device id of the device that you want to remove from the profile.
- Click Try it out
- Sample Output: Upon a successful command, you should receive a status of success, as well as a 200 response code (HTTP response for success). If you view the device on the Dashboard, you will see that it no longer has a device profile!
Frequently Asked Questions
Question: Can we prevent our Admins to access this developer API Key?
Answer: Yes. Navigate to Admins and Roles and edit the hide the Visibility of Developer API.
Question: Why do we get an error, "Access to API has been blocked by CORS policy"?
Question: Are there any Rate Limits to the number of API calls that we can make?
Answer: Yes. The APIs are rate limited and you are allowed to make 30 API requests per minute and/or 43200 API requests per 24 hours. If the API calls exceed the provided limits, then the callers will get HTTP error 429.
List of APIs
We recommend using the API Explorer at https://app.scalefusion.com/api-docs for a complete and latest list of supported APIs. Here is a list of important APIs.
The basic API to get the list of managed Devices and their IDs. The IDs are used in most of the other APIs to manage.
Gets the Battery Information of one Device basing on the Id.
Send Buzz to an Android or iOS managed device.
This feature does not work on iOS, starting from OS13 onwards.
Send a Reboot command to the managed device. This works only on the supported devices.
Get the Monthly Data Usage of an Android or iOS device.
Update the Exit passcode of a single device that does not have any Device Profile.
Move the device to a new group.
Assign a Device group to a device.
Send a broadcast message to the Android or iOS device.
Send a Lock command that will apply the policies on the device.
Send an Unlock command that will relax the policies on the device.
Search your device inventory using IMEI or Serial Number.
Send a command to Clear Application Data.
Get complete information about a Device.
Fetch the latest 10 locations of the managed devices.
Fetch the browser shortcuts enabled on the device.
Fetch the applications that the user is allowed to use.
Fetch the applications that are installed on the device.
Get a List of all the Device Profiles in the account.
Apply the Device Profile to device.
The profile is applied on one device at a time
Remove the Device Profile from the device.
Get a List of all the Device Groups.
Remove a Device from the Group.
Lock (apply policies) on all the devices in a group.
Unlock (relax policies) on all the devices in a group.
Add a Device to a Device Group.
Supports DELETE and PATCH methods to delete the group and update the device profile of the group.