Assign or Unassign Devices to a Device Management Service or Release Devices
Assign or unassign devices to a device management service, manage a device management service migration for devices, or release devices from an organization.
URL
POST https://api-business.apple.com/v1/orgDeviceActivitiesResponse Codes
| Status | Reason | Type | Description |
|---|---|---|---|
| 201 | Created Content-Type: application/json | OrgDeviceActivityResponse | |
| 400 | Bad Request Content-Type: application/json | ErrorResponse | An error occurred with your request. |
| 401 | Unauthorized Content-Type: application/json | ErrorResponse | |
| 403 | Forbidden Content-Type: application/json | ErrorResponse | Request not authorized. |
| 409 | Conflict Content-Type: application/json | ErrorResponse | The request conflicts with the current state of one or more of the given resources — for example, an invalid device management service ID, an invalid device serial number, or a migration deadline outside the allowed range. |
| 422 | Content-Type: application/json | ErrorResponse | |
| 429 | Content-Type: application/json | ErrorResponse | Too Many Requests |
Example: Assign or Unassign Devices to a Device Management Service
Example: Assign Devices to a Device Management Service With a Device Management Service Migration Deadline
To assign devices to a device management service and schedule a device management service migration, use the ASSIGN_DEVICES_WITH_MDM_MIGRATION_DEADLINE activity type and include activityTypeMetadata.mdmMigrationDeadlineDateTime, an ISO 8601 date and time by which the migration needs to complete. The deadline can’t be more than 90 days in the future.
Example: Update a Device Management Service Migration Deadline
To update the deadline for an in-progress device management service migration, use the UPDATE_MDM_MIGRATION_DEADLINE activity type. This doesn’t require a mdmServer relationship. If the new deadline is earlier than the existing one, or in the past, the device honors it without giving the user an option to delay the migration.
If the request tries to update the deadline for a serial number that isn’t undergoing a device management service migration, the activity log result indicates a failure for that serial number.
Example: Cancel an MDM Migration
To cancel an in-progress device management service migration, use the CANCEL_MDM_MIGRATION activity type. This doesn’t require a mdmServer relationship or activityTypeMetadata.
If the request tries to cancel a device management service migration for a serial number that isn’t undergoing one, the activity log result indicates a failure for that serial number.
Example: Release Devices from an Organization
To release devices from an organization, use RELEASE_DEVICES activity type.
HTTP Body
Topics
Responses
See Also
Device Management Services
Get Device Management ServicesGet Device Management Service InformationCreate a Device Management ServiceUpdate a Device Management ServiceDelete a Device Management ServiceGet the Device Serial Numbers for a Device Management ServiceGet the Assigned Device Management Service ID for a DeviceGet the Assigned Device Management Service Information for a DeviceGet Organization Device Activity Information