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

# Get purges history list

> Get purges history.



## OpenAPI

````yaml /api-reference/services_documented/cdn_api.yaml get /cdn/purge_statuses
openapi: 3.1.0
info:
  title: Gcore OpenAPI – CDN 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: '2026-05-14T07:00:22.640261+00:00'
servers:
  - url: https://api.gcore.com
security:
  - APIKey: []
tags:
  - name: CDN service
    description: Information about the current state of the CDN service in your account.
    x-displayName: CDN service
  - name: CDN resources
    x-displayName: CDN resources
  - name: Origins
    x-displayName: Origins
  - name: Rules
    description: >-
      Rules allow to set up custom settings for certain file types or paths.

      By default, the rule inherits all options values from the related CDN
      resource.


      Each option in rule settings can be in one of the following states:

      - **Inherit** - Option is not added to the rule. Option inherits its value
      from the CDN resource settings. In this case, the option value is
      **null**.

      - **ON** - Option is added to the rule and enabled. Option values
      configured in the rule will override values from the CDN resource
      settings.

      - **OFF** - Option is added to the rule and disabled. Option will be
      turned off.
    x-displayName: Rules
  - name: Rule templates
    x-displayName: Rule templates
  - name: SSL certificates
    x-displayName: SSL certificates
  - name: Let's Encrypt certificates
    x-displayName: Let's Encrypt certificates
  - name: CA certificates
    x-displayName: CA certificates
  - 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
    x-displayName: CDN activity logs
  - name: Log viewer
    description: >-
      Log viewer provides you with general information about CDN operation. This
      information does not contain all possible

      sets of fields and restricted by time. To receive full data, use Logs
      Uploader.
    x-displayName: Log viewer
  - name: Logs uploader
    description: >-
      Logs uploader allows you to upload logs with desired format to desired
      storages.


      Consists of three main parts:

      - **Policies** - rules that define which logs are uploaded and how they
      are uploaded.

      - **Targets** - destinations where logs are uploaded.

      - **Configs** - combinations of logs uploader policies, targets and
      resources to which they are applied.
    x-displayName: Logs uploader
  - name: Tools
    x-displayName: Tools
  - name: CDN Statistics
    description: >-
      Consumption statistics is updated in near real-time as a standard
      practice.

      However, the frequency of updates can vary, but they are typically
      available within a 24-hour period.

      Exceptions, such as maintenance periods, may delay data beyond 24 hours
      until servers resume and fill in the missing statistics.
    x-displayName: Statistics
  - name: Advanced analytics
    description: >-
      Advanced analytics allows to get statistics about unique visitors,
      traffic, and requests for countries, directories, browsers, devices, and
      operation systems for up to 90 days starting from today.


      Advanced analytics API is based on the [GraphQL
      framework](https://graphql.org/).


      Advanced analytics API has one single endpoint:

       https://api.gcore.com/cdn/advanced/v2/query

      You can pass the query parameters as a JSON object in the payload of a
      POST request to this endpoint.

      You can use curl to make requests to the Advanced analytics API.
      Alternatively, you can use a GraphQL client

      to construct queries and pass requests to the Advanced analytics API.


      You can write queries in GraphQL much like in SQL: specify the data set
      (CDN resource), the metrics

      to retrieve (such as unique visitors and traffic), and filter or group by
      dimensions (for example, a country).
    x-displayName: Advanced analytics
  - name: Origin shielding
    x-displayName: Origin shielding
  - name: IP addresses list
    x-displayName: IP addresses list
  - name: Purge history
    x-displayName: Purge history
paths:
  /cdn/purge_statuses:
    get:
      tags:
        - Purge history
      summary: Get purges history list
      description: Get purges history.
      operationId: get-purge-status-list
      parameters:
        - in: query
          name: cname
          schema:
            type: string
          description: |-
            Purges associated with a specific resource CNAME.

            Example:
            - &cname=example.com
        - in: query
          name: status
          schema:
            type: string
            description: |-
              Purge with a certain status.

              Possible values:
              - **In progress**
              - **Successful**
              - **Failed**
              - **Status report disabled**
        - in: query
          name: purge_type
          schema:
            type: string
            description: |-
              Purge requests with a certain purge type.

              Possible values:
              - **`purge_by_pattern`** - Purge by Pattern.
              - **`purge_by_url`** - Purge by URL.
              - **`purge_all`** - Purge All.
        - in: query
          name: from_created
          schema:
            type: string
          description: >-
            Start date and time of the requested time period (ISO 8601/RFC 3339
            format, UTC.)


            Examples:

            - &`from_created`=2021-06-14T00:00:00Z

            - &`from_created`=2021-06-14T00:00:00.000Z
        - in: query
          name: to_created
          schema:
            type: string
          description: >-
            End date and time of the requested time period (ISO 8601/RFC 3339
            format, UTC.)


            Examples:

            - &`to_created`=2021-06-15T00:00:00Z

            - &`to_created`=2021-06-15T00:00:00.000Z
        - in: query
          name: offset
          schema:
            type: integer
            default: 0
          description: >-
            Number of purge requests in the response to skip starting from the
            beginning of the requested period.
        - in: query
          name: limit
          schema:
            type: integer
            default: 100
            maximum: 100
          description: Maximum number of purges in the response.
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PurgeStatusesListResponse'
      x-codeSamples:
        - lang: Python
          source: |-
            import os
            from gcore import Gcore

            client = Gcore(
                api_key=os.environ.get("GCORE_API_KEY"),  # This is the default and can be omitted
            )
            response = client.cdn.list_purge_statuses()
            print(response)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/G-Core/gcore-go\"\n\t\"github.com/G-Core/gcore-go/cdn\"\n\t\"github.com/G-Core/gcore-go/option\"\n)\n\nfunc main() {\n\tclient := gcore.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.CDN.ListPurgeStatuses(context.TODO(), cdn.CDNListPurgeStatusesParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response)\n}\n"
components:
  schemas:
    PurgeStatusesListResponse:
      oneOf:
        - title: Plain list
          type: array
          items:
            $ref: '#/components/schemas/PurgeStatusResponse'
          example:
            - purge_id: 1
              status: Successful
              resource:
                id: 1
                cname: cdn.site.com
              payload:
                urls:
                  - http://example.com/path1/file1.jpg
                  - http://site.example.com/path-18/file2.jpg
              created: '2021-10-29T13:21:01.550849Z'
              purge_type: purge_by_url
        - title: Paginated list
          allOf:
            - $ref: '#/components/schemas/PaginatedResponse'
            - type: object
              properties:
                results:
                  type: array
                  items:
                    $ref: '#/components/schemas/PurgeStatusResponse'
          example:
            count: 1
            next: null
            previous: null
            results:
              - purge_id: 1
                status: Successful
                resource:
                  id: 1
                  cname: cdn.site.com
                payload:
                  urls:
                    - http://example.com/path1/file1.jpg
                    - http://site.example.com/path-18/file2.jpg
                created: '2021-10-29T13:21:01.550849Z'
                purge_type: purge_by_url
    PurgeStatusResponse:
      type: object
      properties:
        purge_id:
          $ref: '#/components/schemas/purge_id'
        status:
          $ref: '#/components/schemas/schemas-status'
        resource:
          $ref: '#/components/schemas/resource'
        payload:
          $ref: '#/components/schemas/payload'
        created:
          $ref: '#/components/schemas/schemas-created'
        purge_type:
          $ref: '#/components/schemas/purge_type'
    PaginatedResponse:
      type: object
      properties:
        count:
          type: integer
          description: Total number of items.
        next:
          type: string
          nullable: true
          description: >-
            URL to the next page of results. Null if current page is the last
            one.
        previous:
          type: string
          nullable: true
          description: >-
            URL to the previous page of results. Null if current page is the
            first one.
        results:
          type: array
          description: List of items on the current page.
      required:
        - count
        - next
        - previous
        - results
    purge_id:
      type: integer
      description: Purge ID.
      example: 1
    schemas-status:
      type: string
      description: |-
        Purge status.

        Possible values:
        - **In progress** - Purge is in progress.
        - **Successful** - Purge was successful.
        - **Failed** - Purge failed.
      enum:
        - In progress
        - Successful
        - Failed
    resource:
      type: object
      properties:
        id:
          type: integer
          description: Resource ID.
          example: 1
        cname:
          type: string
          description: CNAME of the resource.
          example: cdn.site.com
    payload:
      type: object
      description: |-
        Purge payload depends on purge type.

        Possible values:
        - **urls** - Purge by URL.
        - **paths** - Purge by Pattern and purge All.
      example:
        urls:
          - http://example.com/path1/file1.jpg
          - http://site.example.com/path-18/file2.jpg
    schemas-created:
      type: string
      description: >-
        Date and time when the purge was created (ISO 8601/RFC 3339 format,
        UTC).
      example: '2021-10-29T13:21:01.550849Z'
    purge_type:
      type: string
      description: |-
        Contains the name of the purge request type.

        Possible values:
        - **`purge_by_pattern`** - Purge by Pattern.
        - **`purge_by_url`** - Purge by URL.
        - **`purge_all`** - Purge All.
      example: purge_by_url
  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

````