Curl
Java
Python
Deluge
PowerShell
Copied!
curl --request POST \
--url https://appdomain/api/v1/mdm/devices/{device_id}/actions/re_apply_kiosk \
--header 'Accept: application/json' \
--header 'Authorization: d92d4xxxxxxxxxxxxx15f52' \
--header 'Content-Type: application/json' \
--data '{"unlock_pin":"1234.","lock_message":"This device has been locked by the administrator.","email_sent_to_user":"true.","phone_number":"000000000000.","device_ids":["9508000000013121","9508000000013691"]}'import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.io.IOException;
import java.net.http.HttpTimeoutException;
public class Main {
public static void main(String[] args) {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://appdomain/api/v1/mdm/devices/{device_id}/actions/re_apply_kiosk"))
.header("Content-Type", "application/json")
.header("Accept", "application/json")
.header("Authorization", " d92d4xxxxxxxxxxxxx15f52")
.method("POST", HttpRequest.BodyPublishers.ofString("{\"unlock_pin\":\"1234.\",\"lock_message\":\"This device has been locked by the administrator.\",\"email_sent_to_user\":\"true.\",\"phone_number\":\"000000000000.\",\"device_ids\":[\"9508000000013121\",\"9508000000013691\"]}"))
.build();
HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
import http.client
conn = http.client.HTTPSConnection("appdomain")
payload = "{\"unlock_pin\":\"1234.\",\"lock_message\":\"This device has been locked by the administrator.\",\"email_sent_to_user\":\"true.\",\"phone_number\":\"000000000000.\",\"device_ids\":[\"9508000000013121\",\"9508000000013691\"]}"
headers = {
'Content-Type': "application/json",
'Accept': "application/json",
'Authorization': " d92d4xxxxxxxxxxxxx15f52"
}
conn.request("POST", "/api/v1/mdm/devices/{device_id}/actions/re_apply_kiosk", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
headersMap = Map();
headersMap.put("Content-Type", "application/json");
headersMap.put("Accept", "application/json");
data=Map();
data_device_ids=List();
data.put("device_ids",data_device_ids);
data.put("phone_number","value");
data.put("lock_message","value");
data.put("unlock_pin","value");
data.put("email_sent_to_user",true);
response = invokeUrl
[
url: "https://appDomain/api/v1/mdm/devices/{device_id}/actions/re_apply_kiosk"
type: POST
headers: headersMap
body: data
connection: connection_name
]
info response;
$headers=@{}
$headers.Add("Content-Type", "application/json")
$headers.Add("Accept", "application/json")
$headers.Add("Authorization", " d92d4xxxxxxxxxxxxx15f52")
$response = Invoke-WebRequest -Uri 'https://appdomain/api/v1/mdm/devices/{device_id}/actions/re_apply_kiosk' -Method POST -Headers $headers -ContentType 'application/json' -Body '{"unlock_pin":"1234.","lock_message":"This device has been locked by the administrator.","email_sent_to_user":"true.","phone_number":"000000000000.","device_ids":["9508000000013121","9508000000013691"]}'Re-apply kiosk mode on device
Copied!
{
"unlock_pin": "1234.",
"lock_message": "This device has been locked by the administrator.",
"email_sent_to_user": "true.",
"phone_number": "000000000000.",
"device_ids": [
"9508000000013121",
"9508000000013691"
]
}
▼ Show full