واجهة برمجة التطبيقات لإعداد التقارير: تقرير نشاط تسجيل الدخول
تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
يعرض تقرير نشاط تسجيل الدخول معلومات عن أنشطة تسجيل الدخول لجميع مستخدمي حسابك. يستخدم كل تقرير طلب نقطة نهاية التقرير الأساسي مع مَعلمات خاصة بالتقرير، مثل البريد الإلكتروني للمستخدم. الحد الأقصى للفترة الزمنية لكل تقرير هو آخر 180 يومًا.
لا يجوز استخدام تقرير نشاط تسجيل الدخول إلا للأغراض القانونية بما يتوافق مع "اتفاقية العملاء".
استرداد أحداث تسجيل الدخول إلى Google Workspace لنطاق
لاسترداد جميع عمليات تسجيل الدخول لجميع خدمات نطاقك، استخدِم طلب HTTP التالي GET وأضِف رمز التفويض الموضّح في مستندات التفويض.
لمزيد من المعلومات حول سلاسل طلبات البحث وسمات الاستجابة، يُرجى الاطّلاع على مرجع واجهة برمجة التطبيقات.
لسهولة القراءة، تم تنسيق المثال التالي باستخدام أحرف الرجوع إلى أول السطر:
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all
/applications/login?endTime=end date&startTime=start date
&maxResults=maximum number of events returned on a response page
يحصل المثال التالي على تقرير عن جميع أحداث تسجيل الدخول إلى حسابك خلال آخر 180 يومًا. تؤدي مَعلمة طلب البحث maxResults إلى عرض هذا التقرير 25 نتيجة في كل صفحة.
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/login?maxResults=25
يحصل المثال التالي على تقرير عن جميع أحداث تسجيل الدخول الخاصة بأحد العملاء خلال آخر 180 يومًا. تحدّد السمة customerId العميل الذي سيتم استرداد التقرير الخاص به.
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/login?customerId=C03az79cb
استرداد أحداث تسجيل الدخول إلى Google Workspace حسب اسم الحدث
في بعض الحالات، قد تحتاج إلى استرداد أحداث معيّنة، مثل عمليات تسجيل الدخول الناجحة المريبة. لإجراء ذلك، استخدِم طلب HTTP GET بالتنسيق التالي:
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all
/applications/login?maxResults=maximum number of events returned on a response page
&eventName=name of the login event
&filters=event parameterrelational operatorparameter value
يوضّح المثال التالي كيفية استرداد جميع عمليات تسجيل الدخول الناجحة المريبة
لنطاق معيّن:
GET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/login?eventName=login_success&filters=is_suspicious==true&maxResults=25
تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-08-29 (حسب التوقيت العالمي المتفَّق عليه)"],[],[],null,["# Reports API: Login Activity Report\n\nThe login activity report returns information on the login activities of all of\nyour account's users. Each report uses the basic report endpoint request with\nreport-specific parameters such as a user's email. The\nmaximum time period for each report is the last 180 days.\n| **Note:** The login activity report only audits explicit password and SAML-based single sign-on (SSO) logins.\n\nThe login activity report may be used only for lawful purposes in accordance with your Customer Agreement.\n\nRetrieve Google Workspace login events for a domain\n---------------------------------------------------\n\nTo retrieve all logins for all of your domain's services, use the following\n`GET` HTTP request and include the authorization token described in the\n[authorization documentation](https://developers.google.com/workspace/admin/reports/v1/guides/authorizing.html).\nFor more information about the request query strings and response properties,\nsee the [API Reference](/workspace/admin/reports/v1/reference/activity-ref-appendix-a/login-event-names).\nFor readability purposes, the following example is formatted with line returns: \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all\n/applications/login?endTime=end date&startTime=start date\n&maxResults=maximum number of events returned on a response page\n```\n\nThe following example gets a report on all of your account's login events for\nthe past 180 days. The `maxResults` query parameter has this report return\n25 results per page. \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/login?maxResults=25\n```\n\nThe following example gets a report on all of a customer's login events for\nthe past 180 days. The `customerId` specifies which customer the report is\nto be retrieved for. \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/login?customerId=C03az79cb\n```\n\nRetrieve Google Workspace login events by event name\n----------------------------------------------------\n\nIn some instances, you may want to retrieve specific\n[events](/workspace/admin/reports/v1/reference/activity-ref-appendix-a/login-event-names),\nsuch as suspicious successful logins. To do this, use a `GET` HTTP request of\nthe following form: \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all\n/applications/login?maxResults=maximum number of events returned on a response page\n&eventName=name of the login event\n&filters=event parameter relational operator parameter value\n```\n\nThe following example shows how to retrieve all suspicious successful logins\nfor a domain: \n\n```\nGET https://admin.googleapis.com/admin/reports/v1/activity/users/all/applications/login?eventName=login_success&filters=is_suspicious==true&maxResults=25\n```"]]