Skip to content

Commit 11dc2d7

Browse files
authored
API design - Enroll BYOD iOS/iPadOS hosts (#22312)
API design for the following story: #19448
1 parent 4889090 commit 11dc2d7

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

docs/Contributing/API-for-contributors.md

+69
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,7 @@ The MDM endpoints exist to support the related command-line interface sub-comman
543543
- [Get FileVault statistics](#get-filevault-statistics)
544544
- [Upload VPP content token](#upload-vpp-content-token)
545545
- [Disable VPP](#disable-vpp)
546+
- [Get an over the air (OTA) enrollment profile](#get-an-over-the-air-ota-enrollment-profile)
546547

547548

548549
### Generate Apple Business Manager public key (ADE)
@@ -3185,3 +3186,71 @@ Content-Disposition: attachment
31853186
Content-Length: <length>
31863187
Body: <blob>
31873188
```
3189+
3190+
### Get an over the air (OTA) enrollment profile
3191+
3192+
`GET /api/v1/fleet/enrollment_profiles/ota`
3193+
3194+
The returned value is a signed `.mobileconfig` OTA profile.
3195+
3196+
#### Parameters
3197+
3198+
| Name | Type | In | Description |
3199+
|-------------------|---------|-------|----------------------------------------------------------------------------------|
3200+
| enroll_secret | string | query | **Required**. The enroll secret of the team this host will be assigned to. |
3201+
3202+
#### Example
3203+
3204+
`GET /api/v1/fleet/enrollment_profiles/ota?enroll_secret=foobar`
3205+
3206+
##### Default response
3207+
3208+
`Status: 200`
3209+
3210+
**Note** To confirm success, it is important for clients to match content length with the response
3211+
header (this is done automatically by most clients, including the browser) rather than relying
3212+
solely on the response status code returned by this endpoint.
3213+
3214+
##### Example response headers
3215+
3216+
```http
3217+
Content-Length: 542
3218+
Content-Type: application/x-apple-aspen-config; charset=urf-8
3219+
Content-Disposition: attachment;filename="fleet-mdm-enrollment-profile.mobileconfig"
3220+
X-Content-Type-Options: nosniff
3221+
```
3222+
3223+
###### Example response body
3224+
3225+
```xml
3226+
<?xml version="1.0" encoding="UTF-8"?>
3227+
<!DOCTYPE plist PUBLIC "-//Apple Inc//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3228+
<plist version="1.0">
3229+
<dict>
3230+
<key>PayloadContent</key>
3231+
<dict>
3232+
<key>URL</key>
3233+
<string>https://foo.example.com/api/fleet/ota_enrollment?enroll_secret=foobar</string>
3234+
<key>DeviceAttributes</key>
3235+
<array>
3236+
<string>UDID</string>
3237+
<string>VERSION</string>
3238+
<string>PRODUCT</string>
3239+
<string>SERIAL</string>
3240+
</array>
3241+
</dict>
3242+
<key>PayloadOrganization</key>
3243+
<string>Acme Inc.</string>
3244+
<key>PayloadDisplayName</key>
3245+
<string>Acme Inc. enrollment</string>
3246+
<key>PayloadVersion</key>
3247+
<integer>1</integer>
3248+
<key>PayloadUUID</key>
3249+
<string>fdb376e5-b5bb-4d8c-829e-e90865f990c9</string>
3250+
<key>PayloadIdentifier</key>
3251+
<string>com.fleetdm.fleet.mdm.apple.ota</string>
3252+
<key>PayloadType</key>
3253+
<string>Profile Service</string>
3254+
</dict>
3255+
</plist>
3256+
```

0 commit comments

Comments
 (0)