> ## 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/daily/

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

## الطلب

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

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

<ParamField query="days" type="integer" default="30">
  عدد الأيام السابقة المطلوب تضمينها، مُقيَّد بالنطاق `1`–`365`.
</ParamField>

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

<ResponseExample>
  ```json 200 OK theme={null}
  [
    { "date": "2026-08-10", "count": 812, "success_count": 799, "error_count": 13 },
    { "date": "2026-08-11", "count": 640, "success_count": 640, "error_count": 0 },
    { "date": "2026-08-12", "count": 0,   "success_count": 0,   "error_count": 0 },
    { "date": "2026-08-13", "count": 705, "success_count": 690, "error_count": 15 },
    { "date": "2026-08-14", "count": 918, "success_count": 918, "error_count": 0 },
    { "date": "2026-08-15", "count": 733, "success_count": 733, "error_count": 0 },
    { "date": "2026-08-16", "count": 214, "success_count": 214, "error_count": 0 }
  ]
  ```
</ResponseExample>

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

الاستجابة مصفوفة بعدد `days` من العناصر بالضبط، عنصر واحد لكل يوم تقويمي، من الأقدم إلى الأحدث.

<ResponseField name="date" type="string">
  تاريخ بصيغة ISO 8601 (‏`YYYY-MM-DD`).
</ResponseField>

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

<ResponseField name="success_count" type="integer">
  الطلبات التي أعادت رمز حالة أقل من `400`.
</ResponseField>

<ResponseField name="error_count" type="integer">
  الطلبات التي أعادت رمز حالة `400` أو أعلى.
</ResponseField>

<Note>
  الأيام بلا حركة تُملأ بأصفار بدلًا من حذفها، بحيث يكون طول المصفوفة دائمًا `days` بالضبط وآمنًا لرسمه في مخطط مباشرة دون سد الفجوات من جانب العميل.
</Note>

## الأخطاء

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

```json 400 Bad Request theme={null}
{ "days": ["days must be an integer."] }
```

## ذات صلة

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


## OpenAPI

````yaml api-reference/openapi/management-api.json GET /console/usage/daily/
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/daily/:
    get:
      summary: Daily usage
      operationId: getDailyUsage
      parameters:
        - name: environment
          in: query
          required: true
          schema:
            type: string
        - name: days
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: Per-day usage
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.

````