Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
192 changes: 117 additions & 75 deletions docs/Contributing/reference/api-for-contributors.md
Original file line number Diff line number Diff line change
Expand Up @@ -554,15 +554,15 @@ Delete pack by name.

The MDM endpoints exist to support the related command-line interface sub-commands of `fleetctl`, such as `fleetctl generate mdm-apple` and `fleetctl get mdm-apple`, as well as the Fleet UI.

- [Generate Apple Business public key (ADE)](#generate-apple-business-manager-public-key-ade)
- [Generate Apple Business public key (ADE)](#generate-apple-business-public-key-ade)
- [Request Certificate Signing Request (CSR)](#request-certificate-signing-request-csr)
- [Upload APNS certificate](#upload-apns-certificate)
- [Add ABM token](#add-abm-token)
- [Count ABM tokens](#count-abm-tokens)
- [Add AB token](#add-ab-token)
- [Count AB tokens](#count-ab-tokens)
- [Turn off Apple MDM](#turn-off-apple-mdm)
- [Update ABM token's fleets](#update-abm-tokens-fleets)
- [Renew ABM token](#renew-abm-token)
- [Delete ABM token](#delete-abm-token)
- [Update AB token's fleets](#update-ab-tokens-fleets)
- [Renew AB token](#renew-ab-token)
- [Delete AB token](#delete-ab-token)
- [Add VPP token](#add-VPP-token)
- [Update VPP token's fleets](#update-vpp-tokens-fleets)
- [Renew VPP token](#renew-vpp-token)
Expand Down Expand Up @@ -593,11 +593,11 @@ The MDM endpoints exist to support the related command-line interface sub-comman

### Generate Apple Business public key (ADE)

`GET /api/v1/fleet/mdm/apple/abm_public_key`
`GET /api/v1/fleet/mdm/apple/ab_public_key`

#### Example

`GET /api/v1/fleet/mdm/apple/abm_public_key`
`GET /api/v1/fleet/mdm/apple/ab_public_key`

##### Default response

Expand Down Expand Up @@ -667,9 +667,9 @@ Content-Type: application/octet-stream

`Status: 200`

### Add ABM token
### Add AB token

`POST /api/v1/fleet/abm_tokens`
`POST /api/v1/fleet/ab_tokens`

#### Parameters

Expand All @@ -679,7 +679,7 @@ Content-Type: application/octet-stream

#### Example

`POST /api/v1/fleet/abm_tokens`
`POST /api/v1/fleet/ab_tokens`

##### Request header

Expand All @@ -705,27 +705,41 @@ Content-Type: application/octet-stream
`Status: 200`

```json
"abm_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2024-10-20T00:00:00Z",
"terms_expired": false,
"macos_team": null,
"ios_team": null,
"ipados_team": null,
"byod_team": null,
"macos_fleet": null,
"ios_fleet": null,
"ipados_fleet": null,
"byod_fleet": null
{
"ab_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2024-10-20T00:00:00Z",
"terms_expired": false,
"macos_fleet": null,
"ios_fleet": null,
"ipados_fleet": null,
"byod_fleet": null
},
"abm_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2024-10-20T00:00:00Z",
"terms_expired": false,
"macos_fleet": null,
"ios_fleet": null,
"ipados_fleet": null,
"byod_fleet": null,
"macos_team": null,
"ios_team": null,
"ipados_team": null,
"byod_team": null
}
}
```

### Count AB tokens

`GET /api/v1/fleet/abm_tokens/count`
`GET /api/v1/fleet/ab_tokens/count`

Get the number of AB tokens on the Fleet server.

Expand All @@ -735,7 +749,7 @@ None.

#### Example

`GET /api/v1/fleet/abm_tokens/count`
`GET /api/v1/fleet/ab_tokens/count`

##### Default response

Expand All @@ -759,23 +773,23 @@ None.

`Status: 204`

### Update ABM token's fleets
### Update AB token's fleets

`PATCH /api/v1/fleet/abm_tokens/:id/fleets`
`PATCH /api/v1/fleet/ab_tokens/:id/fleets`

#### Parameters

| Name | Type | In | Description |
| ---- | ---- | -- | ----------- |
| id | integer | path | *Required* The Apple Business (AB) token's ID |
| macos_team_id | integer | body | macOS hosts are automatically added to this fleet when they appear in Apple Business. If not specified, defaults to "Unassigned". |
| ios_team_id | integer | body | iOS hosts are automatically added to this fleet when they appear in Apple Business. If not specified, defaults to "Unassigned". |
| ipados_team_id | integer | body | iPadOS hosts are automatically added to this fleet when they appear in Apple Business. If not specified, defaults to "Unassigned". |
| byod_team_id | integer | body | iOS/iPadOS BYOD hosts enrolling via Account-driven User Enrollment are automatically added to this fleet. If not specified, defaults to "Unassigned". |
| macos_fleet_id | integer | body | macOS hosts are automatically added to this fleet when they appear in Apple Business. If not specified, defaults to "Unassigned". |
| ios_fleet_id | integer | body | iOS hosts are automatically added to this fleet when they appear in Apple Business. If not specified, defaults to "Unassigned". |
| ipados_fleet_id | integer | body | iPadOS hosts are automatically added to this fleet when they appear in Apple Business. If not specified, defaults to "Unassigned". |
| byod_fleet_id | integer | body | iOS/iPadOS BYOD hosts enrolling via Account-driven User Enrollment are automatically added to this fleet. If not specified, defaults to "Unassigned". |

#### Example

`PATCH /api/v1/fleet/abm_tokens/1/fleets`
`PATCH /api/v1/fleet/ab_tokens/1/fleets`

##### Request body

Expand All @@ -793,37 +807,51 @@ None.
`Status: 200`

```json
"abm_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2024-11-29T00:00:00Z",
"terms_expired": false,
"macos_team": 1,
"ios_team": 2,
"ipados_team": 3,
"byod_team": 4,
"macos_fleet": 1,
"ios_fleet": 2,
"ipados_fleet": 3,
"byod_fleet": 4
{
"ab_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2024-11-29T00:00:00Z",
"terms_expired": false,
"macos_fleet": 1,
"ios_fleet": 2,
"ipados_fleet": 3,
"byod_fleet": 4
},
"abm_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2024-11-29T00:00:00Z",
"terms_expired": false,
"macos_fleet": 1,
"ios_fleet": 2,
"ipados_fleet": 3,
"byod_fleet": 4,
"macos_team": 1,
"ios_team": 2,
"ipados_team": 3,
"byod_team": 4
}
}
```

### Renew ABM token
### Renew AB token

`PATCH /api/v1/fleet/abm_tokens/:id/renew`
`PATCH /api/v1/fleet/ab_tokens/:id/renew`

#### Parameters

| Name | Type | In | Description |
| ---- | ---- | -- | ----------- |
| id | integer | path | *Required* The ABM token's ID |
| id | integer | path | *Required* The AB token's ID |

#### Example

`PATCH /api/v1/fleet/abm_tokens/1/renew`
`PATCH /api/v1/fleet/ab_tokens/1/renew`

##### Request header

Expand All @@ -849,37 +877,51 @@ Content-Type: application/octet-stream
`Status: 200`

```json
"abm_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2025-10-20T00:00:00Z",
"terms_expired": false,
"macos_team": null,
"ios_team": null,
"ipados_team": null,
"byod_team": null,
"macos_fleet": null,
"ios_fleet": null,
"ipados_fleet": null,
"byod_fleet": null
{
"ab_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2025-10-20T00:00:00Z",
"terms_expired": false,
"macos_fleet": null,
"ios_fleet": null,
"ipados_fleet": null,
"byod_fleet": null
},
"abm_token": {
"id": 1,
"apple_id": "apple@example.com",
"org_name": "Fleet Device Management Inc.",
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2025-10-20T00:00:00Z",
"terms_expired": false,
"macos_fleet": null,
"ios_fleet": null,
"ipados_fleet": null,
"byod_fleet": null,
"macos_team": null,
"ios_team": null,
"ipados_team": null,
"byod_team": null
}
}
```

### Delete ABM token
### Delete AB token

`DELETE /api/v1/fleet/abm_tokens/:id`
`DELETE /api/v1/fleet/ab_tokens/:id`

#### Parameters

| Name | Type | In | Description |
| ---- | ---- | -- | ----------- |
| id | integer | path | *Required* The ABM token's ID |
| id | integer | path | *Required* The AB token's ID |

#### Example

`DELETE /api/v1/fleet/abm_tokens/1`
`DELETE /api/v1/fleet/ab_tokens/1`

##### Default response

Expand Down Expand Up @@ -1361,7 +1403,7 @@ Content-Type: application/octet-stream

_Available in Fleet Premium_

Returns the raw data about a DEP device's current state from the [Get Device Details](https://developer.apple.com/documentation/devicemanagement/device-details) API. Supports only Apple hosts which are, or were, assigned to Fleet in Apple Business Manager.
Returns the raw data about a DEP device's current state from the [Get Device Details](https://developer.apple.com/documentation/devicemanagement/device-details) API. Supports only Apple hosts which are, or were, assigned to Fleet in Apple Business.

`GET /api/v1/fleet/hosts/:id/dep_assignment`

Expand Down Expand Up @@ -1403,7 +1445,7 @@ Returns the raw data about a DEP device's current state from the [Get Device Det
"response_updated_at": "2025-12-04T01:35:27Z",
"added_at": "2025-12-04T01:35:27Z",
"deleted_at": null,
"abm_token_id": 1,
"ab_token_id": 1,
"mdm_migration_deadline": "2025-12-05T00:00:00Z",
"mdm_migration_completed": "2025-12-05T00:00:00Z"
}
Expand Down
12 changes: 0 additions & 12 deletions docs/REST API/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -8152,26 +8152,14 @@ None.
"mdm_server_url": "https://example.com/mdm/apple/mdm",
"renew_date": "2023-11-29T00:00:00Z",
"terms_expired": false,
"macos_team": {
"name": "💻 Workstations",
"id": 1
},
"macos_fleet": {
"name": "💻 Workstations",
"id": 1
},
"ios_team": {
"name": "📱🏢 Company-owned iPhones",
"id": 2
},
"ios_fleet": {
"name": "📱🏢 Company-owned iPhones",
"id": 2
},
"ipados_team": {
"name": "🔳🏢 Company-owned iPads",
"id": 3
},
"ipados_fleet": {
"name": "🔳🏢 Company-owned iPads",
"id": 3
Expand Down
Loading