Google Workspace Directory API की मदद से, अपने संगठन में मोबाइल डिवाइसों को मैनेज किया जा सकता है. इस पेज पर, अपने मोबाइल डिवाइसों की सूची बनाने, किसी डिवाइस की जानकारी पाने, और डिवाइस को जोड़ने या हटाने के उदाहरण दिए गए हैं.
इन उदाहरणों में, प्लेसहोल्डर customerId और resourceId का इस्तेमाल करके यह दिखाया गया है कि आपको ये आईडी कहां देने हैं. customerId को Users.get तरीके से पाया जा सकता है. किसी डिवाइस के लिए,
resourceId एक यूनीक Google आइडेंटिफ़ायर होता है. यह सभी मोबाइल डिवाइसों की जानकारी पाएं तरीके के रिस्पॉन्स में मिलता है.
सभी मोबाइल डिवाइसों को वापस पाना
किसी खाते के सभी मोबाइल डिवाइसों को वापस पाने के लिए, यहां दिए गए GET
अनुरोध का इस्तेमाल करें. साथ ही, अनुरोधों को अनुमति दें में बताई गई अनुमति शामिल करें. आसानी से पढ़ने के लिए,
इस उदाहरण में लाइन रिटर्न का इस्तेमाल किया गया है:
मोबाइल डिवाइस की प्रॉपर्टी वापस पाने के लिए, यहां दिए गए GET अनुरोध का इस्तेमाल करें और अनुरोधों को अनुमति दें में बताए गए अनुमति का ब्यौरा शामिल करें. आसानी से पढ़ने के लिए,
इस उदाहरण में लाइन रिटर्न का इस्तेमाल किया गया है:
किसी मोबाइल डिवाइस को अनुमति देने के लिए, यहां दिए गए POST अनुरोध का इस्तेमाल करें. साथ ही, अनुरोधों को अनुमति दें में बताई गई अनुमति शामिल करें.
इस उदाहरण में, आसानी से पढ़ने के लिए लाइन रिटर्न का इस्तेमाल किया गया है:
किसी मोबाइल डिवाइस को हटाने के लिए, यहां दिए गए DELETE अनुरोध का इस्तेमाल करें. साथ ही, अनुरोधों को अनुमति दें में बताई गई अनुमति शामिल करें.
इस उदाहरण में, आसानी से पढ़ने के लिए लाइन रिटर्न का इस्तेमाल किया गया है:
[null,null,["आखिरी बार 2025-08-29 (UTC) को अपडेट किया गया."],[],[],null,["# Directory API: Mobile Devices\n\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| 1. [Retrieve all mobile devices](#get_all_mobile_devices) 2. [Retrieve a mobile device](#get_mobile_device) 3. [Take action on a mobile device](#action_mobile_device) 4. [Remove a mobile device](#remove_mobile_device) |\n\n\nThe Google Workspace Directory API allows you to manage mobile devices within your organization. This page\nincludes examples of how to list your mobile devices, obtain details of a specific device, as well\nas adding or removing a device.\n\n\nThis document assumes you have successfully completed the\n[Prerequisites](/workspace/admin/directory/v1/guides/prerequisites#set_up_mobile).\nAndroid devices need to have the\n[device policy app](http://play.google.com/store/apps/details?id=com.google.android.apps.enterprise.dmagent)\ninstalled. iOS devices must be registered with the\n[Google Mobile Management service](https://support.google.com/a/answer/1734200).\n\n\nIn these examples, the placeholders \u003cvar translate=\"no\"\u003ecustomerId\u003c/var\u003e and \u003cvar translate=\"no\"\u003eresourceId\u003c/var\u003e are used to\nindicate where you would provide those IDs. The \u003cvar translate=\"no\"\u003ecustomerId\u003c/var\u003e can be obtained from the\n[Users.get](/workspace/admin/directory/v1/reference/users/get) method. The\n\u003cvar translate=\"no\"\u003eresourceId\u003c/var\u003e is a unique Google identifier for a device and is found in the response of\nthe [Retrieve all mobile devices](#get_all_mobile_devices) method.\n| **Note:** All of the API operations support delegated administrators and Google authorized resellers. However, in this version of the API, the Chrome and mobile device operations **don't** support remote administrative access for Google authorized resellers.\n\nRetrieve all mobile devices\n---------------------------\n\nTo retrieve all of an account's mobile devices, use the following `GET`\nrequest and include the authorization described in\n[Authorize requests](/workspace/admin/directory/v1/guides/authorizing). For readability,\nthis example uses line returns: \n\n```bash\nGET https://admin.googleapis.com/admin/directory/v1/customer/{my_customer|customerId}\n /devices/mobile?projection=\u003cvar translate=\"no\"\u003e{\u003c/var\u003eBASIC|FULL}&query=query\n &orderBy=orderBy category&sortOrder=\u003cvar translate=\"no\"\u003e{\u003c/var\u003eASCENDING|DESCENDING}\n &pageToken=token for next results page\n &maxResults=max number of results per page\n```\n\n\nFor the request and response properties, see the\n[API Reference](/workspace/admin/directory/v1/reference/mobiledevices/list).\n\n### JSON response\n\n```carbon\n{\n \"kind\": \"directory#mobiledevices\",\n \"mobiledevices\": [\n {\n \"kind\": \"directory#mobiledevice\",\n \"resourceId\": \"\u003cvar translate=\"no\"\u003eresourceId\u003c/var\u003e\",\n \"deviceId\": \"\u003cvar translate=\"no\"\u003edeviceId\u003c/var\u003e\",\n \"name\": [\n \"Sales\"\n ],\n \"email\": [\n \"sales@example.com\"\n ],\n \"model\": \"Nexus 4\",\n \"os\": \"Android 4.2.2\",\n \"type\": \"ANDROID\",\n \"status\": \"APPROVED\",\n \"hardwareId\": \"1234567890\",\n \"firstSync\": \"2013-05-15T17:30:04.325Z\",\n \"lastSync\": \"2013-06-05T17:30:04.325Z\",\n \"userAgent\": \"Google Apps Device Policy 4.14\",\n },\n {\n \"kind\": \"directory#mobiledevice\",\n \"resourceId\": \"\u003cvar translate=\"no\"\u003eresourceId\u003c/var\u003e\",\n \"deviceId\": \"\u003cvar translate=\"no\"\u003edeviceId\u003c/var\u003e\",\n \"name\": [\n \"Liz\"\n ],\n \"email\": [\n \"liz@example.com\"\n ],\n \"model\": \"Galaxy Nexus\",\n \"os\": \"Android 4.2.2\",\n \"type\": \"ANDROID\",\n \"status\": \"APPROVED\",\n \"hardwareId\": \"9123456780\",\n \"firstSync\": \"2013-06-05T17:30:04.325Z\",\n \"lastSync\": \"2013-08-12T17:30:04.325Z\",\n \"userAgent\": \"Google Apps Device Policy 4.14\",\n }\n ],\n \"nextPageToken\": \"next_page_token_value\"\n }\n```\n\nRetrieve a mobile device\n------------------------\n\nTo retrieve a mobile device's properties, use the following `GET` request\nand include the authorization described in\n[Authorize requests](/workspace/admin/directory/v1/guides/authorizing). For readability,\nthis example uses line returns: \n\n```bash\nGET https://admin.googleapis.com/admin/directory/v1/customer/{my_customer|customerId}\n /devices/mobile/resourceId?projection=\u003cvar translate=\"no\"\u003e{\u003c/var\u003eFULL|BASIC}\n```\n\n\nFor the request and response properties, see the\n[API Reference](/workspace/admin/directory/v1/reference/mobiledevices/get).\n\n### JSON request\n\nAn example request for the \u003cvar translate=\"no\"\u003eresourceId\u003c/var\u003e is: \n\n```bash\nGET https://admin.googleapis.com/admin/directory/v1/customer/my_customer/devices/\n mobile/resourceId?projection=FULL\n```\n\n### JSON response\n\n```\n{\n \"kind\": \"directory#mobiledevice\",\n \"resourceId\": \"resourceId\",\n \"deviceId\": \"deviceId\",\n \"name\": [\n \"Sales3\"\n ],\n \"email\": [\n \"sales@example.com\"\n ],\n \"model\": \"Nexus 4\",\n \"os\": \"Android 4.2.2\",\n \"type\": \"ANDROID\",\n \"status\": \"APPROVED\",\n \"hardwareId\": \"1234567890\",\n \"firstSync\": \"2010-05-15T17:30:04.325Z\",\n \"lastSync\": \"2013-06-05T17:30:04.325Z\",\n \"userAgent\": \"Google Apps Device Policy 4.14\",\n }\n```\n\nApprove a mobile device\n-----------------------\n\nTo approve a mobile device, use the following `POST` request and include the\nauthorization described in\n[Authorize requests](/workspace/admin/directory/v1/guides/authorizing).\nFor readability, this example uses line returns: \n\n```bash\nPOST https://admin.googleapis.com/admin/directory/v1/customer/{my_customer|customerId}\n /devices/mobile/resourceId/action\n```\n\n\nFor the request and response properties, see the\n[API Reference](/workspace/admin/directory/v1/reference/mobiledevices/action).\n\n### JSON request\n\nThe following JSON request shows a sample request to approve a device: \n\n```bash\nPOST https://admin.googleapis.com/admin/directory/v1/customer/my_customer/devices\n /mobile/resourceId/action\n```\n\nThe request body is: \n\n```text\n{\n \"action\": \"approve\"\n}\n```\n\nA successful request returns an\n[HTTP 200 status code](http://wikipedia.org/wiki/List_of_HTTP_status_codes).\n\nRemove a mobile device\n----------------------\n\nTo remove a mobile device, use the following `DELETE` request and include\nthe authorization described in\n[Authorize requests](/workspace/admin/directory/v1/guides/authorizing).\nFor readability, this example uses line returns: \n\n```bash\nDELETE https://admin.googleapis.com/admin/directory/v1/customer/{my_customer|customerId}\n /devices/mobile/resourceId\n```\n\n\nFor the request and response properties, see the\n[API Reference](/workspace/admin/directory/v1/reference/mobiledevices/delete).\n\nA successful request returns an\n[HTTP 200 status code](http://wikipedia.org/wiki/List_of_HTTP_status_codes)."]]