> ## 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 origin groups list

> Get all origin groups and related origin sources.



## OpenAPI

````yaml /api-reference/services_documented/cdn_api.yaml get /cdn/origin_groups
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/origin_groups:
    get:
      tags:
        - Origins
      summary: Get origin groups list
      description: Get all origin groups and related origin sources.
      operationId: get-origin-groups-list
      parameters:
        - in: query
          name: name
          schema:
            type: string
          description: Origin group name.
        - in: query
          name: sources
          schema:
            type: string
          description: Origin sources (IP addresses or domains) in the origin group.
        - in: query
          name: has_related_resources
          schema:
            type: boolean
          description: |-
            Defines whether the origin group has related CDN resources.

            Possible values:
            - **true** – Origin group has related CDN resources.
            - **false** – Origin group does not have related CDN resources.
        - $ref: '#/components/parameters/limit'
        - $ref: '#/components/parameters/offset'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OriginGroupsListResponse'
        '403':
          $ref: '#/components/responses/NoPermissions'
      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
            )
            origin_groups_list = client.cdn.origin_groups.list()
            print(origin_groups_list)
        - 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\toriginGroupsList, err := client.CDN.OriginGroups.List(context.TODO(), cdn.OriginGroupListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", originGroupsList)\n}\n"
components:
  parameters:
    limit:
      in: query
      name: limit
      schema:
        type: integer
        minimum: 1
        maximum: 1000
      description: Maximum number of items to return in the response. Cannot exceed 1000.
    offset:
      in: query
      name: offset
      schema:
        type: integer
        minimum: 0
      description: Number of items to skip from the beginning of the list.
  schemas:
    OriginGroupsListResponse:
      oneOf:
        - title: Plain list
          type: array
          items:
            $ref: '#/components/schemas/OriginGroupsResponse'
          example:
            - id: 1
              name: YourOriginGroup
              use_next: true
              proxy_next_upstream:
                - error
                - timeout
              auth_type: none
              sources:
                - backup: false
                  enabled: true
                  source: yourwebsite.com
              path: ''
              has_related_resources: true
        - title: Paginated list
          allOf:
            - $ref: '#/components/schemas/PaginatedResponse'
            - type: object
              properties:
                results:
                  type: array
                  items:
                    $ref: '#/components/schemas/OriginGroupsResponse'
          example:
            count: 1
            next: null
            previous: null
            results:
              - id: 1
                name: YourOriginGroup
                use_next: true
                proxy_next_upstream:
                  - error
                  - timeout
                auth_type: none
                sources:
                  - backup: false
                    enabled: true
                    source: yourwebsite.com
                path: ''
                has_related_resources: true
    OriginGroupsResponse:
      oneOf:
        - type: object
          title: None Auth
          description: >-
            Origin group with host origins, or mixed host and S3 origins using
            inline `origin_type` and `config` in sources.
          properties:
            id:
              $ref: '#/components/schemas/id'
            name:
              $ref: '#/components/schemas/name'
            use_next:
              $ref: '#/components/schemas/use_next'
            proxy_next_upstream:
              $ref: '#/components/schemas/proxy_next_upstream'
            auth_type:
              $ref: '#/components/schemas/auth_type_none'
            sources:
              $ref: '#/components/schemas/sources'
            path:
              $ref: '#/components/schemas/path'
            has_related_resources:
              $ref: '#/components/schemas/has_related_resources'
          required:
            - id
            - name
            - sources
        - type: object
          title: AWS Signature V4
          deprecated: true
          description: >-
            **Deprecated.** To create S3 origins, configure them directly in
            sources with `origin_type` and `config` instead.
          properties:
            id:
              $ref: '#/components/schemas/id'
            name:
              $ref: '#/components/schemas/name'
            use_next:
              $ref: '#/components/schemas/use_next'
            proxy_next_upstream:
              $ref: '#/components/schemas/proxy_next_upstream'
            auth_type:
              $ref: '#/components/schemas/auth_type_aws'
            auth:
              $ref: '#/components/schemas/auth'
            path:
              $ref: '#/components/schemas/path'
            has_related_resources:
              $ref: '#/components/schemas/has_related_resources'
          required:
            - id
            - name
            - auth_type
            - auth
    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
    id:
      type: integer
      description: Origin group ID.
      example: 1
    name:
      type: string
      description: Origin group name.
      example: YourOriginGroup
    use_next:
      type: boolean
      description: >-
        Defines whether to use the next origin from the origin group if origin
        responds with the cases specified in `proxy_next_upstream`.

        If you enable it, you must specify cases in `proxy_next_upstream`.


        Possible values:

        - **true** - Option is enabled.

        - **false** - Option is disabled.
      example: true
    proxy_next_upstream:
      description: >-
        Defines cases when the request should be passed on to the next origin.


        Possible values:

        - **error** - an error occurred while establishing a connection with the
        origin, passing a request to it, or reading the response header

        - **timeout** - a timeout has occurred while establishing a connection
        with the origin, passing a request to it, or reading the response header

        - **`invalid_header`** - a origin returned an empty or invalid response

        - **`http_403`** - a origin returned a response with the code 403

        - **`http_404`** - a origin returned a response with the code 404

        - **`http_429`** - a origin returned a response with the code 429

        - **`http_500`** - a origin returned a response with the code 500

        - **`http_502`** - a origin returned a response with the code 502

        - **`http_503`** - a origin returned a response with the code 503

        - **`http_504`** - a origin returned a response with the code 504
      type: array
      default:
        - error
        - timeout
      items:
        type: string
      example:
        - error
        - timeout
        - invalid_header
        - http_500
        - http_502
        - http_503
        - http_504
    auth_type_none:
      type: string
      deprecated: true
      default: none
      description: |-
        **Deprecated.** No longer necessary. Defaults to `none`.

        Origin authentication type.

        Possible values:
        - **none** - Used for public origins.
        - **awsSignatureV4** - Used for S3 storage.
      example: none
    sources:
      description: >-
        List of origin sources in the origin group. Each entry can be a host
        origin or an S3 origin.


        Host origins have a `source` field with the hostname or IP. S3 origins
        have `origin_type: s3`

        and a `config` object with S3 credentials. Both types can be mixed in
        the same origin group.
      type: array
      items:
        $ref: '#/components/schemas/SourceResponse'
      example:
        - source: yourwebsite.com
          backup: false
          enabled: true
          tag: default
          host_header_override: null
        - source: 1.2.3.4:5500
          backup: true
          enabled: true
          tag: default
          host_header_override: null
        - origin_type: s3
          config:
            s3_type: amazon
            s3_bucket_name: my-bucket
            s3_region: eu-west-1
            s3_access_key_id: SECRET_VALUE
            s3_secret_access_key: SECRET_VALUE
            s3_auth_type: awsSignatureV4
          backup: true
          enabled: true
          tag: default
          host_header_override: null
      x-stainless-collection-type: set
    path:
      type: string
      deprecated: true
      description: >-
        **Deprecated.** No longer necessary. Omit this field and the default
        origin path behavior will be used.


        Origin path prefix.
      example: ''
    has_related_resources:
      type: boolean
      description: |-
        Defines whether the origin group has related CDN resources.

        Possible values:
        - **true** - Origin group has related CDN resources.
        - **false** - Origin group does not have related CDN resources.
      example: true
    auth_type_aws:
      type: string
      deprecated: true
      description: >-
        **Deprecated.** To create S3 origins, configure them directly in sources
        with `origin_type` and `config` instead.


        Authentication type.


        **awsSignatureV4** value is used for S3 storage.
      example: awsSignatureV4
    auth:
      deprecated: true
      description: >-
        **Deprecated.** To create S3 origins, configure them directly in sources
        with `origin_type` and `config` instead.


        Credentials to access the private bucket.
      type: object
      properties:
        s3_type:
          type: string
          description: |-
            Storage type compatible with S3.

            Possible values:
            - **amazon** – AWS S3 storage.
            - **other** – Other (not AWS) S3 compatible storage.
        s3_access_key_id:
          type: string
          description: >-
            Access key ID for the S3 account.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), colon, dash, and
            underscore.

            - From 3 to 512 characters.
        s3_secret_access_key:
          type: string
          description: >-
            Secret access key for the S3 account.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes,
            colons and underscores.

            - If "s3_type": amazon, length should be 40 characters.

            - If "s3_type": other, length should be from 16 to 255 characters.
        s3_bucket_name:
          type: string
          maxLength: 256
          description: S3 bucket name.
        s3_storage_hostname:
          type: string
          description: |-
            S3 storage hostname.

            The parameter is required, if "s3_type": other.
        s3_region:
          type: string
          description: |-
            S3 storage region.

            The parameter is required, if "s3_type": amazon.
      required:
        - s3_type
        - s3_access_key_id
        - s3_secret_access_key
        - s3_bucket_name
      example:
        s3_type: amazon
        s3_access_key_id: EXAMPLEFODNN7EXAMPLE
        s3_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        s3_bucket_name: bucket_name
        s3_region: us-east-2
    SourceResponse:
      oneOf:
        - $ref: '#/components/schemas/HostSourceResponse'
        - $ref: '#/components/schemas/S3SourceResponse'
        - $ref: '#/components/schemas/FastedgeSourceResponse'
    HostSourceResponse:
      type: object
      title: Host Source
      description: A host origin source.
      additionalProperties: false
      required:
        - source
      properties:
        source:
          $ref: '#/components/schemas/source'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    S3SourceResponse:
      type: object
      title: S3 Source
      description: An S3 origin source.
      additionalProperties: false
      required:
        - origin_type
        - config
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/S3Config'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    FastedgeSourceResponse:
      type: object
      title: FastEdge Source
      description: A FastEdge application origin source.
      additionalProperties: false
      required:
        - origin_type
        - config
      properties:
        origin_type:
          $ref: '#/components/schemas/origin_type'
        config:
          $ref: '#/components/schemas/FastedgeConfig'
        backup:
          $ref: '#/components/schemas/backup'
        enabled:
          $ref: '#/components/schemas/enabled'
        tag:
          $ref: '#/components/schemas/tag'
        host_header_override:
          $ref: '#/components/schemas/host_header_override'
    source:
      type: string
      maxLength: 255
      description: >-
        IP address or domain name of the origin and the port, if custom port is
        used.
      example: yourwebsite.com
    backup:
      type: boolean
      description: >-
        Defines whether the origin is a backup, meaning that it will not be used
        until one of active origins become unavailable.


        Possible values:

        - **true** - Origin is a backup.

        - **false** - Origin is not a backup.
      example: false
    enabled:
      type: boolean
      description: >-
        Enables or disables an origin source in the origin group.


        Possible values:

        - **true** - Origin is enabled and the CDN uses it to pull content.

        - **false** - Origin is disabled and the CDN does not use it to pull
        content.


        Origin group must contain at least one enabled origin.
      example: true
    tag:
      type: string
      maxLength: 256
      description: Tag for the origin source.
      default: default
      example: default
    host_header_override:
      type: string
      nullable: true
      maxLength: 255
      description: >-
        Per-origin Host header override. When set, the CDN sends this value as
        the Host header when

        requesting content from this origin instead of the default.
      example: null
    origin_type:
      type: string
      enum:
        - host
        - s3
        - fastedge
      description: >-
        Origin type. Present in responses for S3 and FastEdge sources.


        Possible values:

        - **host** - A source server or endpoint from which content is fetched.

        - **s3** - S3 storage with either AWS v4 authentication or public
        access.

        - **fastedge** - A FastEdge application served directly from the local
        FastEdge runtime on the edge node, identified by `app_id`.
      example: s3
    S3Config:
      type: object
      description: S3 storage configuration. Required when `origin_type` is `s3`.
      properties:
        s3_type:
          type: string
          enum:
            - amazon
            - other
          description: |-
            Storage type compatible with S3.

            Possible values:
            - **amazon** - AWS S3 storage.
            - **other** - Other (not AWS) S3 compatible storage.
        s3_bucket_name:
          type: string
          maxLength: 256
          description: S3 bucket name.
        s3_region:
          type: string
          nullable: true
          description: |-
            S3 storage region.

            The parameter is required if `s3_type` is `amazon`.
        s3_storage_hostname:
          type: string
          nullable: true
          description: |-
            S3 storage hostname.

            The parameter is required if `s3_type` is `other`.
        s3_access_key_id:
          type: string
          maxLength: 255
          description: >-
            Access key ID for the S3 account. Masked as `SECRET_VALUE` in
            responses.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), colon, dash, and
            underscore.

            - From 4 to 255 characters.
        s3_secret_access_key:
          type: string
          maxLength: 255
          description: >-
            Secret access key for the S3 account. Masked as `SECRET_VALUE` in
            responses.


            Restrictions:

            - Latin letters (A-Z, a-z), numbers (0-9), pluses, slashes, dashes,
            colons and underscores.

            - From 16 to 255 characters.
        s3_auth_type:
          type: string
          description: S3 authentication type.
          default: awsSignatureV4
          example: awsSignatureV4
      required:
        - s3_type
        - s3_bucket_name
        - s3_access_key_id
        - s3_secret_access_key
      example:
        s3_type: amazon
        s3_bucket_name: bucket_name
        s3_region: eu-west-1
        s3_access_key_id: EXAMPLEFODNN7EXAMPLE
        s3_secret_access_key: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
        s3_auth_type: awsSignatureV4
    FastedgeConfig:
      type: object
      description: >-
        FastEdge application configuration. Required when `origin_type` is
        `fastedge`.
      properties:
        app_id:
          type: string
          description: >-
            ID of the FastEdge application served as origin (string, matching
            the existing

            fastedge option's convention). The CDN dispatches requests to the
            local FastEdge runtime

            on the edge node using this identifier. The application must belong
            to the requesting

            client, be enabled, and have `wasi-http` API type.
      required:
        - app_id
      example:
        app_id: '12345'
  responses:
    NoPermissions:
      description: You do not have permission to perform this action.
  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

````