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

# Aggregated alias usage statistics

> Get the number of aliases in use.

Request URL parameters should be added as a query string after the endpoint.

The requested period is always expanded to whole calendar months, so a request for part of
a month returns the count for its entire containing month.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/cdn_reseller_api.yaml get /cdn/statistics/aliases_usage/aggregated
openapi: 3.1.0
info:
  title: Gcore OpenAPI – CDN Reseller API
  description: >-
    This OpenAPI is an aggregated OpenAPI specification that unifies all Gcore
    products into a single file. It covers Cloud, CDN, DNS, WAAP, DDoS
    Protection, Object Storage, Streaming, and FastEdge services.
  version: 965d3dff2da4
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: Account
    description: Information about CDN product settings in your account.
  - name: CDN service
    description: Information about the current state of CDN service in your account.
  - name: Features
    description: Information about free and paid features available for you account.
  - name: Balancer
    description: >-
      Balancer allows choosing CDN server locations that will be used for
      content delivery.


      To activate balancer, [set client’s balancer
      settings](/api-reference/cdn-resellers/balancer/set-client-balancer-settings).
  - name: CDN activity logs
    description: |-
      Get the history of users requests to CDN.
      It contains requests made both via the API and via the control panel.

      The following methods are not tracked in the activity logs:
      - HEAD
      - OPTIONS
  - name: Logs uploader
    description: Manage logs uploader configs for reseller accounts.
  - name: Statistics
    description: Statistics CDN usage and paid features usage.
  - name: Origin shielding
    description: >-
      Origin shielding helps protect your origin server from being overloaded
      with requests from multiple CDN servers.

      The option accumulates all CDN server requests at a special server called
      a shield or precache server.


      When shielding is enabled, only one precache server communicates with the
      origin host, not the entire CDN.
paths:
  /cdn/statistics/aliases_usage/aggregated:
    get:
      tags:
        - Statistics
      summary: Aggregated alias usage statistics
      description: >-
        Get the number of aliases in use.


        Request URL parameters should be added as a query string after the
        endpoint.


        The requested period is always expanded to whole calendar months, so a
        request for part of

        a month returns the count for its entire containing month.
      operationId: aggregated-aliases-usage-statistics
      parameters:
        - $ref: '#/components/parameters/query_statistics_From'
        - $ref: '#/components/parameters/query_statistics_To'
        - $ref: '#/components/parameters/query_statistics_GroupByPaidFeatures'
        - $ref: '#/components/parameters/query_statistics_Resource'
        - $ref: '#/components/parameters/query_statistics_Client'
        - $ref: '#/components/parameters/query_statistics_Flat'
      responses:
        '200':
          $ref: '#/components/responses/StatisticsPaidFeaturesAggregatedAliasUsage'
        '204':
          description: There is no data for the requested time period.
components:
  parameters:
    query_statistics_From:
      in: query
      name: from
      schema:
        type: string
      required: true
      description: |-
        Beginning of the requested time period (ISO 8601/RFC 3339 format, UTC.)

        Example:
        - &from=2018-12-01T00:00:00.000
    query_statistics_To:
      in: query
      name: to
      schema:
        type: string
      required: true
      description: |-
        End of the requested time period (ISO 8601/RFC 3339 format, UTC.)

        Example:
        - &to=2018-12-01T01:00:00.000
    query_statistics_GroupByPaidFeatures:
      in: query
      name: group_by
      schema:
        type: string
      description: |-
        Output data grouping.

        Possible values:
        - **client** - Data is grouped by clients.
        - **resource** - Data is grouped by CDN resources.

        To request multiple values, use:
        - &`group_by`=client&`group_by`=resource
    query_statistics_Resource:
      in: query
      name: resource
      schema:
        type: integer
      description: |-
        CDN resources IDs.

        To request multiple values, use:
        - &resource=1&resource=2
    query_statistics_Client:
      in: query
      name: client
      schema:
        type: integer
      description: |-
        Client accounts IDs.

        To request multiple values, use:
        - &client=1&client=2
    query_statistics_Flat:
      in: query
      name: flat
      schema:
        type: boolean
      description: |-
        The way the parameters are arranged in the response.

        Possible values:
        - **true** – Flat structure is used.
        - **false** – Embedded structure is used (default.)
  responses:
    StatisticsPaidFeaturesAggregatedAliasUsage:
      description: Successful.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StatisticsPaidFeaturesAggregatedAliasUsage'
          examples:
            default:
              $ref: '#/components/examples/StatisticsPaidFeaturesAggregatedAliasUsage'
  schemas:
    StatisticsPaidFeaturesAggregatedAliasUsage:
      type: object
      properties:
        resource:
          allOf:
            - $ref: '#/components/schemas/body_response_statistics_Resource'
        client:
          allOf:
            - $ref: '#/components/schemas/body_response_statistics_Client'
        metrics:
          type: object
          properties:
            alias_usage:
              allOf:
                - $ref: '#/components/schemas/body_response_statistics_AliasUsage'
    body_response_statistics_Resource:
      type: object
      description: Statistics information grouped by CDN resources.
    body_response_statistics_Client:
      type: object
      description: Statistics information grouped by client accounts IDs.
    body_response_statistics_AliasUsage:
      type: integer
      description: Number of aliases in use.
  examples:
    StatisticsPaidFeaturesAggregatedAliasUsage:
      value:
        resource:
          '1':
            metrics:
              alias_usage: 1
  securitySchemes:
    APIKey:
      description: >-
        API key for authentication. Make sure to include the word `apikey`,
        followed by a single space and then your token.

        Example: `apikey 1234_abcdef`
      type: apiKey
      in: header
      name: Authorization

````