يمكنك البحث عن الأجهزة التي تتطابق مع سمات معيّنة باستخدام الأسلوب
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*
البحث عن الأجهزة التي تحتوي على بريد إلكتروني يبدأ بـ "فريد"
تاريخ التعديل الأخير: 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"]]