iOS Device Group Management

Using the API and Webhooks

Your browser needs to be JavaScript capable to view this video

Try reloading this page, or reviewing your browser settings

In this video segment, learn how to manage SimpleMDM functions and settings with the SimpleMDM API library. Also learn how to send notifications when a device enrolls or un-enrolls from your SimpleMDM account with webhooks.


  • API
  • application programming interface
  • webhooks
  • settings
  • enroll
  • un-enroll
  • notification
  • account

About this video

Eric Butow
First online
20 December 2019
Online ISBN
Copyright information
© Eric Butow 2019

Video Transcript

Ann MacPhail: If you want to create a custom app to manage SimpleMDM functions and settings, you can use code in the SimpleMDM app API library to integrate your app with SimpleMDM, as I’ll discuss in this fourth topic video: Using the API and Webhooks.

For example, you can use the device groups API to automate the process of reassigning devices between groups. Use the apps API to automate the process for updating your custom apps and use Webhooks to send a Slack notification when a device enrolls into or unenrolled from your SimpleMDM account. There are two ways to view the API reference webpage. First, open the SimpleMDM website and click the API documentation link at the bottom of the home page, or if you’re logged into SimpleMDM, click Settings in the menu and then click API. Now click API documentation.

This webpage includes an introduction and 15 API categories. Starting with the Account Category, which is the fourth category in the list. You see the HTTP Request URL and any related information you need to add to your code. In the Categories menu, click on the category control to jump to that category description and view its controls. You can also type search terms into the Search box and any search results that match your terms appear underneath the box.

The introduction explains that the SimpleMDM API is designed to work over authenticated HTTPS secured channels. You can directly interact with the API using any HTTP client library. SimpleMDM also offers a Ruby client library if you use that particular programming language. If you want to integrate Ruby-based applications with SimpleMDM, click Ruby library to open a new browser tab that contains instructions on the GitHub website. On the right side of the API reference web page, you see the API shell code by default in the code area. You can view Ruby example code instead by clicking the Ruby tab at the top of the code area.

The Authentication category tells you how to add your API key to your code, so SimpleMDM will grant access to its functions. If you don’t know your API key, log into SimpleMDM and then click Settings. Now click API. In the API web page, the API key appears hidden in the Secret Access Key box. View the key by clicking reveal. If you reveal the API key, you can hide it again by clicking hide. Reset the key by clicking reset the key and then clicking Okay in the window. In the Errors category, you’ll learn how to enter text that will appear to your user when he encounters an error. For example, you can display the message: Object Not Found. The error message will also display an HTTP status and JSON-formatted text with additional details the user can share with you or the person who created the custom code.

In the Pagination category, many of the list API methods use cursor-based pagination, using the limit and starting after parameters as you can see in the example. This example shows you how to use webpage pagination when you define a list of apps. The Account category shows information about your account and also gives you the ability to update your account if it’s changed, including the account name and the Apple Store country code that SimpleMDM uses for your account. The Apps category shows you example code to perform several tasks, including listing all the apps in your SimpleMDM app catalog, retrieving an app so you can run it, adding an App Store app, uploading an Enterprise iOS app, or uploading a MacOS app package to your app catalog. Updating an app in the catalog. Be aware that when you update an app in the catalog, the app is not updated in the devices it’s installed on. And deleting an app from the catalog. When you delete an app from the catalog, you don’t remove the app from any iPhone or iPad the app is installed on.

The App Groups category shows you how to pair apps with device groups, so you can distribute those apps to your managed iPhones or iPads. Within this category, you can list a group, retrieve a group, create a new group, and determine if you want to deploy the group automatically or not. Update a group and deploy the update automatically or not. Delete a group. Assign an app to the group, unassign an app from the group. Assign and unassign and device group, assign and unassign a device to and from a group, respectively. Install apps to devices in a group and update apps on devices in a group.

If you have or want to manage custom attributes, the Custom Attribute category shows you how to list all active custom attributes in your SimpleMDM account, create a new custom attribute, delete a custom attribute and all of its values, show all custom attribute values assigned to a device and set a custom attribute value for a device. If you have or want to create custom configuration profiles for your managed iPhones and iPads, you can learn how to do the following in the Custom Configuration Profiles category. Show all custom configuration profiles, create a new custom configuration that requires a name and a mobile config file name, delete a custom configuration profile from your account and all devices that use that custom profile. Assign an unassign the profile from all iPhones and iPads in the device group.

The Devices category shows an example for each device control which includes listing all devices in your account, retrieving a device in your account, creating a new device in SimpleMDM that you can also assign to a group. Update the name of the device. Remove the users’ iPhone or iPad from your SimpleMDM account. List all apps installed on a specific iPhone or iPad. Push an app to an iPhone or iPad, restart and shut down an iPhone or iPad, lock an iPhone or iPad. You can also list a message and passcode to appear on the user’s screen. The user needs to enter the iPhone or iPad passcode to unlock it. Unlock and remove a users’ iPhone or iPad passcode. Erase all content from users’ iPhone or iPad. Unenroll the device from SimpleMDM and restore the device to its factory default configuration and update the device information and app inventory in your SimpleMDM account.

If you have one or more device groups, then in the Device Groups category, you can learn how to list all groups, retrieve a group and assign a device to a group. In the Enrollment Invitations category, you can send an invitation to a user’s iPhone or iPad to join your SimpleMDM group through an email message or text message. Once the user responds and agrees to your request, you’ll be able to manage their device. Within the Installed Apps category, you can retrieve information about an installed app and also uninstalling the app. There’s also a link to go back to the Devices category so you can learn how to list installed apps on a users’ iPhone or iPad. You can list all apps on a device, retrieve an app on a device, and remove an installed app from a device. If you want to remove an installed app, the app must be managed to remove it.

In the Managed App Configs category, you can learn how to retrieve, manage configurations for an app, create a new configuration using a variety of arguments and values, delete a managed app configuration and push your configuration updates that you’ve made to your users’ iPhones and/or iPads. The Push Certificate category contains information about controlling the Apple Push notifications certificate that SimpleMDM uses to push apps and configurations to your users’ iPhones and our iPads. You can show details about the push certificate, upload a new certificate, and replace the old one and download a signed SCSR file. This file is provided to Apple when a push certificate is created or renewed. In the Webhooks category, you can specify the URL that appears on your users’ iPhone or iPad when one of two events occur in SimpleMDM, the device is enrolled in, or it’s unenrolled from your SimpleMDM account.