با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
میتوانید دستگاههایی را که با ویژگیهای خاص مطابقت دارند، با روش mobiledevices.list از Directory API جستجو کنید. این روش پارامتر query را می پذیرد که عبارت جستجویی است که یک یا چند عبارت جستجو را ترکیب می کند. هر عبارت جستجو از سه بخش تشکیل شده است:
میدان
ویژگی دستگاهی که جستجو می شود. مثلا serial .
اپراتور
تستی که بر روی داده ها انجام می شود تا مطابقت ارائه شود. برای مثال، عملگر : آزمایش می کند که آیا یک ویژگی متنی با مقداری مطابقت دارد یا خیر .
ارزش
محتوای صفتی که آزمایش می شود. به عنوان مثال، serialNumber .
چند بند با فضای خالی از هم جدا می شوند و به طور ضمنی توسط یک عملگر AND به هم می پیوندند.
نمونه ها
همه پرس و جوها از متد mobiledevices.list استفاده می کنند که درخواست HTTP مشابه موارد زیر دارد (قطعات خط برای خوانایی گنجانده شده است):
GET https://admin.googleapis.com/admin/directory/v1/customer/customerId/devices/mobile
?query=query parameters
پارامترهای query باید URL کد شده باشند. به عنوان مثال، query=brand:goo* URL است که به صورت query=brand%3goo* کدگذاری شده است. تمام مثال های موجود در این صفحه پارامترهای query رمزگذاری نشده را نشان می دهند. کتابخانه های سرویس گیرنده این کدگذاری URL را به طور خودکار مدیریت می کنند.
جستجوی دستگاههایی که با پیشوند شماره سریال مطابقت دارند
serial:525*
دستگاههایی را جستجو کنید که ایمیل آنها با fred شروع میشود
تاریخ آخرین بهروزرسانی 2025-05-14 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-05-14 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# Search for devices\n\nYou can search for devices matching certain attributes with the\n[`mobiledevices.list`](/workspace/admin/directory/v1/reference/mobiledevices/list)\nmethod of the Directory API. This method accepts the `query` parameter which is\na search query combining one or more search clauses. Each search clause is made\nup of three parts:\n\nField\n: Device attribute that is searched. For example, `serial`.\n\nOperator\n: Test that is performed on the data to provide a match. For example, the `:`\n operator tests if a text attribute *matches* a value.\n\nValue\n: The content of the attribute that is tested. For example, `serialNumber`.\n\nMultiple clauses are separated by whitespace and are implicitly joined by an\n`AND` operator.\n| **Note:** Most device data updates within 1 hour, however, it may take up to 36 hours for new data to be reflected in all search results.\n\nExamples\n--------\n\nAll queries use the [`mobiledevices.list`](/workspace/admin/directory/v1/reference/mobiledevices/list)\nmethod, which has an HTTP request similar to the following (line breaks included for readability): \n\n```\nGET https://admin.googleapis.com/admin/directory/v1/customer/customerId/devices/mobile\n?query=query parameters\n```\n\nThe `query` parameters must be URL encoded. For example, the query\n`query=brand:goo*` is URL encoded as `query=brand%3goo*`.\nAll examples on this page show unencoded `query` parameters.\nClient libraries handle this URL encoding automatically.\n\nSearch for devices matching an serial number prefix \n\n serial:525*\n\nSearch for devices with email starting with fred \n\n email:fred* email:contact*\n\n| **Note:** For a complete list of mobile device fields, refer to [Personal device search fields](/workspace/admin/directory/v1/search-operators)."]]