# Retrieve FileVault encryption details for a macOS device gets the filevault info of the device ## Endpoints **GET** `/api/v1/mdm/devices/{device_id}/filevault` ## Request URL ``` https://{serverurl}/api/v1/mdm/devices/{device_id}/filevault ``` ## Scope ``` MDMOnDemand.MDMInventory.READ ``` ## Header ``` Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Path Parameters - **device_id** `string` (Mandatory) Unique identifier of the device. Obtain from the [Get Device List](https://www.manageengine.com/mobile-device-management/devices-get-device-list.html) response ### Query Parameters - **searchkey** `string` (Optional) Value to search for. Must be used in combination with searchfield to specify which field is searched - **searchfield** `string` (Optional) Name of the field to search against. Used together with searchkey (e.g., name, email, udid) - **is_allowed_apps** `boolean` (Optional) Set to true to return apps from the allow list, false to return apps from the block list - **is_app_purchased_from_portal** `boolean` (Optional) Set to true to restrict results to apps purchased through the enterprise app portal (VPP/managed Google Play). Default: false - **search** `string` (Optional) Free-text search string applied to the default searchable fields of the resource - **app_scope** `string` (Optional) Filter applications by their assignment scope. Allowed values: `1` = All `2` = Assigned to groups `3` = Assigned to devices - **platform** `string` (Optional) Filter results by device platform. Allowed values: `1` = iOS `2` = Android `3` = Windows `4` = macOS `6` = tvOS - **delta-token** `string` (Optional) Token used for delta/incremental fetches. Pass the token returned from a previous response to retrieve only items modified since that point - **skip-token** `string` (Optional) Pagination continuation token returned by a previous response. Pass it to fetch the next page of results - **limit** `integer` (Optional) Maximum number of records to return in a single response. Used together with offset for pagination ## Sample Request ### Curl ```bash curl --request GET \ --url https://appdomain/api/v1/mdm/devices/{device_id}/filevault \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' ``` ### Java ```java 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}/filevault")) .header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") .method("GET", HttpRequest.BodyPublishers.noBody()) .build(); HttpResponse response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("appdomain") headers = { 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("GET", "/api/v1/mdm/devices/{device_id}/filevault", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript headersMap = Map(); headersMap.put("Accept", "application/json"); response = invokeUrl [ url: "https://appDomain/api/v1/mdm/devices/{device_id}/filevault" type: GET headers: headersMap connection: connection_name ] info response; ``` ### PowerShell ```powershell $headers=@{} $headers.Add("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") $response = Invoke-WebRequest -Uri 'https://appdomain/api/v1/mdm/devices/{device_id}/filevault' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP code 200 Response Body - `application/json` - **filevault** `JSON object` FileVault encryption details for the macOS device - **filevault_status** `integer` FileVault status: `0` - Not compatible `10` - Disabled `20` - Enabled not through MDM `21` - Enabled by MDM PKR only `22` - Enabled by MDM IRK only `23` - Enabled by MDM both - **is_institution_recovery_key** `boolean` Whether an Institutional Recovery Key is configured - **is_personal_recovery_key** `boolean` Whether a Personal Recovery Key is configured - **resource_id** `long` Resource identifier for the device - **is_encryption_enabled** `boolean` Whether Full Disk Encryption is enabled ## Sample Response: HTTP 200 FileVault encryption details for macOS device ```json { "filevault": { "filevault_status": 10, "is_institution_recovery_key": true, "is_personal_recovery_key": true, "resource_id": 9508000000013120, "is_encryption_enabled": false } } ``` ## Possible HTTP Status Codes - **200** HTTP code ## Rate Limit **Duration:** 1 minute **Threshold:** 250 **Lock period:** 5 minutes - **Duration** - Time window for the threshold. - **Threshold** - Number of API calls allowed within the specified duration. - **Lock Period** - Wait time before consecutive API requests.