# List certificates in the MDM certificate repository with filtering and pagination Get the list of certificates uploaded to the MDM certificate repository. Supports filtering by name, identity type, and certificate type with cursor-based pagination. ## Endpoints **GET** `/api/v1/mdm/profiles/certificates` ## Request URL ``` https://{serverurl}/api/v1/mdm/profiles/certificates ``` ## 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 skip token for cursor-based pagination - **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 - **search** (string, Optional) Filter certificates by display name (case-insensitive contains match) - **identity** (boolean, Optional) If true, returns only identity certificates (those with a private key). If false, returns non-identity certificates - **exclude_distribution_details** (boolean, Optional) If true, omits distribution details from the response - **type** (integer, Optional) Filter by certificate type. Default 0 (CA uploaded certificate). Use 3 for macOS FileVault institutional recovery certificates ## Sample Request ### Curl ```bash curl --request GET \ --url https://appdomain/api/v1/mdm/profiles/certificates \ --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/certificates")) .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/certificates", 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/certificates" 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/certificates' -Method GET -Headers $headers ``` ## Response Parameters ### HTTP 200 **Response Body**: `application/json` - **certificates** (JSON array) Array of certificate objects matching the query filters - **certificate_id** (string) Unique identifier of the certificate - **certificate_name** (string) Display name of the certificate (typically the CN from the subject DN) - **certificate_serial_number** (string) Serial number of the certificate - **certificate_subject_dn** (string) Full Subject Distinguished Name of the certificate - **certificate_issuer_dn** (string) Full Issuer Distinguished Name of the certificate - **certificate_notbefore** (string) Certificate validity start time in Unix milliseconds - **certificate_notafter** (string) Certificate expiry time in Unix milliseconds - **certificate_org** (string) Organization name extracted from the certificate subject - **issuer_org** (string) Organization name of the certificate issuer - **issuer_name** (string) Common Name (CN) of the certificate issuer - **certificate_file_name** (string) Original filename of the uploaded certificate file - **days_to_expire** (string) Number of days until the certificate expires - **is_identity** (boolean) true if the certificate is an identity certificate (has a private key / password), false otherwise - **metadata** (JSON object) Pagination metadata including total record count - **total_record_count** (string) Total number of certificates matching the query - **paging** (JSON object) Pagination links for navigating result pages. Present only when results are paginated - **next** (string) URL to fetch the next page of results - **previous** (string) URL to fetch the previous page of results ## Sample Response: HTTP 200 ### List of certificates with pagination metadata ```json { "metadata": { "total_record_count": "7" }, "certificates": [ { "days_to_expire": "343", "certificate_name": "APSP:99335a61-7acc-42a0-87fd-f564d36e2166", "is_identity": false, "certificate_notafter": "1572518494000", "certificate_org": "", "issuer_name": "Apple Application Integration 2 Certification Authority", "certificate_id": "9007199254741001", "certificate_issuer_dn": "C=US,O=Apple Inc.,OU=Apple Certification Authority,CN=Apple Application Integration 2 Certification Authority", "issuer_org": "Apple Inc.", "certificate_notbefore": "1540982494000", "certificate_subject_dn": "C=US, CN=APSP:99335a61-7acc-42a0-87fd-f564d36e2166, UID=com.apple.mgmt.External.99335a61-7acc-42a0-87fd-f564d36e2166", "certificate_file_name": "MDM__Zylker_Inc_Certificate__5_.pem", "certificate_serial_number": "7565549844070638883" }, { "days_to_expire": "7305", "certificate_name": "ZylkerCA", "is_identity": false, "certificate_notafter": "2174000445000", "certificate_org": "Zylker Inc", "issuer_name": "ZylkerCA", "certificate_id": "9007199254741007", "certificate_issuer_dn": "CN=ZylkerCA,O=Zylker Inc,OU=Zylker IT,ST=CA,C=US", "issuer_org": "Zylker Inc", "certificate_notbefore": "1542848445000", "certificate_subject_dn": "CN=ZylkerCA, O=Zylker Inc, OU=Zylker IT, ST=CA, C=US", "certificate_file_name": "cert", "certificate_serial_number": "2751265269709804611" } ], "paging": { "next": "https://server/api/v1/mdm/profiles/certificates?skip-token=Mzo3OjE6MTU0Mjg4NjY0NDEyNw%3D%3D", "previous": "https://server/api/v1/mdm/profiles/certificates?skip-token=MzoxOjI6MTU0Mjg4NjcyODY1MA%3D%3D" } } ``` ### No certificates found matching the query ```json { "metadata": { "total_record_count": "0" }, "certificates": [], "paging": {} } ``` ## 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.