میتوانید دستگاههایی را که با ویژگیهای خاص مطابقت دارند، با روش 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-01-27 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-01-27 بهوقت ساعت هماهنگ جهانی."],[[["The `mobiledevices.list` method allows you to search for devices with specific attributes using a `query` parameter."],["A search query is built with clauses consisting of a field, operator, and value, separated by whitespace and implicitly joined by `AND`."],["Queries can use wildcards like `*` for partial matches and multiple clauses can be combined for more refined searches."],["It's important to note that data updates can take up to 36 hours to be reflected in search results."],["Refer to the \"Personal device search fields\" documentation for a complete list of searchable device attributes."]]],["The `mobiledevices.list` method in the Directory API allows searching for devices using the `query` parameter. A query consists of clauses: a Field (attribute), an Operator (test), and a Value (content). Clauses are implicitly joined by `AND`. For example, `serial:525*` searches for serial numbers starting with \"525\". Multiple fields can be used in a single query, such as `email:fred* email:contact*`. Queries are URL encoded, and client libraries manage this automatically. Data updates can take up to 36 hours to reflect in search results.\n"]]