We are trying to create a new mobile device configuration profile.
From what I can see in https://developer.jamf.com/#/mobiledeviceconfigurationprofiles/createMobileDeviceConfigurationProfileById (by the way there is a mismatch between the example and the model. Example uses configuration_profile as root node and model call it mobile_device_configuration_profile, we had tried both without success)
So we are doing POST to /JSSResource/mobiledeviceconfigurationprofiles/id/0
sending the following body (we are trying to create a configuration profile which will create an airplay white list and scope it to a given device (10)):
<?xml version="1.0" encoding="utf-8"?>
<configuration_profile>
<general>
<name>API airplay whitelist 50:32:37:ab:6d:6d</name>
<deployment_method>Install Automatically</deployment_method>
<payloads>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1">
<dict>
<key>PayloadUUID</key>
<string>B1E156F0-AD1E-11E9-ACAC-697FF5EF5825</string>
<key>PayloadType</key>
<string>Configuration</string>
<key>PayloadOrganization</key>
<string>XXXXXXXXXXXX</string>
<key>PayloadIdentifier</key>
<string>B1E156F0-AD1E-11E9-ACAC-697FF5EF5825</string>
<key>PayloadDisplayName</key>
<string>Airplay testing 1</string>
<key>PayloadDescription</key><string/>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadEnabled</key><true/>
<key>PayloadRemovalDisallowed</key><true/>
<key>PayloadContent</key>
<array>
<dict>
<key>PayloadUUID</key>
<string>B1E17E00-AD1E-11E9-ACAC-697FF5EF5825</string>
<key>PayloadType</key>
<string>com.apple.airplay</string>
<key>PayloadOrganization</key>
<string>XXXXXXXXXXXX</string>
<key>PayloadIdentifier</key>
<string>A1AD9C76-D9ED-43EC-BB2B-6031892B4EB8</string>
<key>PayloadDisplayName</key>
<string>com.apple.airplay</string>
<key>PayloadDescription</key><string/>
<key>PayloadVersion</key>
<integer>1</integer>
<key>PayloadEnabled</key><true/>
<key>Whitelist</key>
<array>
<dict>
<key>DeviceID</key>
<string>50:32:37:ab:6d:6d</string>
</dict>
</array>
</dict>
</array>
</dict>
</plist>
</payloads>
</general>
<scope>
<mobile_devices>
<mobile_device>
<id>10</id>
</mobile_device>
</mobile_devices>
</scope>
</configuration_profile>
We are getting:
<html> <head> <title>Status page</title> </head> <body style="font-family: sans-serif;"> <p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Bad Request</p> <p>Error in XML file. Possible mismatch between resource specified in the URL and XML file</p> <p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1">here</a>.<br> Please continue your visit at our <a href="/">home page</a>. </p> </body> </html> "', error: '<html> <head> <title>Status page</title> </head> <body style="font-family: sans-serif;"> <p style="font-size: 1.2em;font-weight: bold;margin: 1em 0px;">Bad Request</p> <p>Error in XML file. Possible mismatch between resource specified in the URL and XML file</p> <p>You can get technical details <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10.4.1">here</a>.<br> Please continue your visit at our <a href="/">home page</a>. </p> </body> </html>
I would need to know which xml I need to send to create a mobile device configuration profile and scope it to some devices (given their ids)
Regards