# Retrieve a list of all MDM profiles Get the profile detail list ## Endpoints **GET** `/api/v1/mdm/profiles` ## Request URL ``` https://{serverurl}/api/v1/mdm/profiles ``` ## Scope ``` MDMOnDemand.MDMDeviceMgmt.READ ``` ## Header ``` Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Query Parameters - **limit** (integer, Optional) Maximum number of records to return in a single response. Used together with offset for pagination - **skip-token** (string, Optional) Pagination continuation token returned by a previous response. Pass it to fetch the next page of results - **offset** (integer, Optional) Zero-based index of the first record to return. Used together with limit for pagination - **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 - **trashed** (boolean, Optional) When true, includes items that are in trash along with active items. Default: false - **trash_only** (boolean, Optional) When true, returns only items currently in trash. When false, excludes trashed items. Default: false - **search** (string, Optional) Free-text search string applied to the default searchable fields of the resource - **platform** (string, Optional) Filter results by device platform. Allowed values: 1 or ios, 2 or android, 3 or windows, 4=macOS, 5 or chrome, 6=tvOS. Supports comma-separated multiple values - **profile_status_id** (long, Optional) Filter profiles by status ID. Allowed values: 1=Draft, 2=Published, 3=Archived - **summary** (boolean, Optional) When true, returns only a lightweight summary projection of the resource instead of full details. Default: false - **modernmanagement** (boolean, Optional) When true, returns only modern-management (MDM) profiles. When false, returns legacy/agent-based profiles. Default: false - **createdormodifiedbyme** (boolean, Optional) When true, returns only resources created or last modified by the authenticated user. Default: false - **config_ids** (string, Optional) Comma-separated list of configuration IDs to filter the response by ## Sample Request ### Curl ```bash curl --request GET \ --url https://appdomain/api/v1/mdm/profiles \ --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/profiles")) .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/profiles", 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/profiles" 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/profiles' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP 200 Response Body - `application/json` - **profiles** (JSON array) Array of profile objects - **profile_id** (long) Unique identifier for the profile - **profile_name** (string) Name of the profile - **profile_description** (string) Description of the profile - **platform_type** (integer) Profile platform type: 1 - iOS, 2 - Android, 3 - Windows, 4 - Chrome, 5 - MAC and 6 - Apple TV - **scope** (integer) Scope of the profile. Android: 0 - devices, 1 - knox container Chrome: 0 - devices, 2 - user - **profile_version** (integer) Current version of the profile - **profile_status** (string) Status of the profile (e.g., Yet To Deploy) - **profile_status_id** (integer) Status ID for the profile: 1 - Yet to Deploy, 110 - Published - **collection_id** (long) Collection ID of the profile - **payloads** (array) List of payload type names in the profile - **creation_time** (long) Creation timestamp in milliseconds since epoch - **last_modified_time** (long) Last modified timestamp in milliseconds since epoch - **created_by** (long) User ID of the user who created the profile - **last_modified_by** (long) User ID of the user who last modified the profile - **is_moved_to_trash** (boolean) Whether the profile has been moved to trash ## Sample Response: HTTP 200 ### List of all configured profiles with metadata ```json { "profiles": [ { "creation_time": 12312321312312, "last_modified_time": 213123213123, "profile_version": 1, "payloads": [ "restrictionspolicy", "passcodepolicy" ], "last_modified_by": 213900719925474100000, "profile_description": "Test IOS Restrictions Policy", "created_by": 21321312312, "collection_id": 2132131231241, "profile_name": "IOS Restrictions Policy", "profile_status": "Yet To Deploy", "platform_type": 1, "is_moved_to_trash": false, "profile_id": 12321312312, "scope": 0, "profile_status_id": 1 } ] } ``` ### No profiles found ```json { "profiles": [] } ``` ## Possible HTTP Status Codes - **200** — HTTP code ## Rate Limit **Duration:** 1 minute **Threshold:** 120 **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.