> ## Documentation Index
> Fetch the complete documentation index at: https://docs.scanova.io/llms.txt
> Use this file to discover all available pages before exploring further.

# الاستخدام حسب نقطة النهاية

> GET /console/usage/by-endpoint/

يعيد أعداد الطلبات مُجمَّعة حسب نقطة النهاية وطريقة HTTP — مفيد لمعرفة أي أجزاء من Management API يستخدمها تكامل فعليًا. يقع على مضيف Scanova API **العادي** (‏`qcg-api.scanova.io`)، مصادَقًا عليه برمز وصول OAuth الخاص بلوحة التحكم.

## الطلب

```
GET https://qcg-api.scanova.io/console/usage/by-endpoint/
Authorization: Bearer <your_oauth_access_token>
```

<ParamField query="environment" type="string" required>
  واحد من `sandbox`، `live`، `zapier`، `mcp`. يحدد سجلات أي المفاتيح تُجمَّع.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -G "https://qcg-api.scanova.io/console/usage/by-endpoint/" \
    -H "Authorization: Bearer <your_oauth_access_token>" \
    -d environment=live
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  [
    { "endpoint": "https://management.scanova.io/qr/", "method": "GET", "count": 2140, "error_rate": 0.004 },
    { "endpoint": "https://management.scanova.io/qr/", "method": "POST", "count": 318, "error_rate": 0.03 },
    { "endpoint": "https://management.scanova.io/qrcode/QR7K9M2XN/", "method": "PUT", "count": 96, "error_rate": 0.0 }
  ]
  ```
</ResponseExample>

### حقول الاستجابة

الاستجابة مصفوفة، عنصر واحد لكل زوج `(endpoint, method)` مميز شوهد في السجلات، مرتَّبة تنازليًا حسب `count`.

<ResponseField name="endpoint" type="string">
  رابط الطلب الكامل الذي سُجِّل، بما في ذلك القيمة الفعلية لمعلمة المسار (مثل `qrid` محدد) — وليس قالب مسار موحَّدًا. توقع عناصر مميزة كثيرة للمسارات ذات معلمات المسار إذا استدعيتها بمعرّفات مختلفة.
</ResponseField>

<ResponseField name="method" type="string">
  طريقة HTTP الخاصة بالطلب، مثل `GET`، `POST`، `PUT`، `DELETE`.
</ResponseField>

<ResponseField name="count" type="integer">
  إجمالي الطلبات المسجَّلة لزوج نقطة النهاية/الطريقة هذا.
</ResponseField>

<ResponseField name="error_rate" type="number">
  النسبة (`0`–`1`) من الطلبات إلى زوج نقطة النهاية/الطريقة هذا التي أعادت رمز حالة `400` أو أعلى.
</ResponseField>

<Note>
  خلافًا لـ [إحصاءات الاستخدام](/ar/api-reference/management-api/tokens/usage-stats) و[الاستخدام اليومي](/ar/api-reference/management-api/tokens/usage-daily)، لا تملك نقطة النهاية هذه نافذة `period`/`days` — إنها تُجمِّع عبر كامل فترة الاحتفاظ بالسجلات (تُحذف سجلات الطلبات بعد 6 أشهر).
</Note>

## الأخطاء

`environment` مطلوبة، نفس التحقق الموجود في [إحصاءات الاستخدام](/ar/api-reference/management-api/tokens/usage-stats#errors).

## ذات صلة

* [إحصاءات الاستخدام](/ar/api-reference/management-api/tokens/usage-stats) — نفس الحركة كإجمالي واحد ضمن نافذة متحركة بدلًا من تفصيل حسب نقطة النهاية.
* [الاستخدام اليومي](/ar/api-reference/management-api/tokens/usage-daily) — نفس الحركة مُفصَّلة حسب اليوم التقويمي بدلًا من المسار.
* [نظرة عامة على Management API](/ar/api-reference/management-api/overview) — قيم `environment` (‏`sandbox`، `live`، `zapier`، `mcp`) التي تُجمِّع نقطة النهاية هذه بحسبها.


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /console/usage/by-endpoint/
openapi: 3.1.0
info:
  title: Scanova Management API (v2)
  description: >-
    The complete Scanova Management API — every endpoint available at
    management.scanova.io (QR codes, folders, tags, leads, forms, analytics,
    plans, shared users & roles), plus the token-creation and usage-stats
    endpoints used to authenticate against it. Every path and request/response
    shape below was verified live against a real API key and the actual running
    backend (Phase 7, 2026-08-16) — not guessed from reading urls.py alone.
  version: 2.0.0
servers:
  - url: https://management.scanova.io
    description: Management API — QR/folder/tag/lead/form/analytics/plans endpoints
security:
  - apiKeyAuth: []
paths:
  /console/usage/by-endpoint/:
    get:
      summary: Usage by endpoint
      operationId: getUsageByEndpoint
      parameters:
        - name: environment
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Usage grouped by endpoint
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Send your Management API key as the raw value of the Authorization
        header — no "Bearer " or "Token " prefix, and no other characters.
        Example: `Authorization: 401f7ac837da42b97f613d789819ff93537bee6a`. A
        header containing more than one space-separated part is rejected
        outright. Requests also require the request's Host header to be the
        management API host (e.g. management.scanova.io) — the same key sent to
        the regular API host will not authenticate.

````