From f909214f886be3df20fe48b59bd21ea05d27b7ad Mon Sep 17 00:00:00 2001 From: Tobias Baube Date: Fri, 23 Nov 2018 06:14:18 +0100 Subject: [PATCH] Adds command to install apps from the AppStore (#545) --- tools/api/commands/install_appstore_application | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tools/api/commands/install_appstore_application diff --git a/tools/api/commands/install_appstore_application b/tools/api/commands/install_appstore_application new file mode 100644 index 00000000..c18e5cab --- /dev/null +++ b/tools/api/commands/install_appstore_application @@ -0,0 +1,14 @@ +#!/bin/bash +source $MICROMDM_ENV_PATH +endpoint="v1/commands" +jq -n \ + --arg request_type "InstallApplication" \ + --arg udid "$1" \ + --arg identifier "$2" \ + '.udid = $udid + |.request_type = $request_type + |.identifier = $identifier + '|\ + curl $CURL_OPTS \ + -H "Content-Type: application/json" \ + -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-