> ## 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.

# Get applied preset object

> Get a single object the preset is applied to.

Returns `404` if the preset is not applied to the object, so you can use this endpoint to check
whether the relationship exists.



## OpenAPI

````yaml /api-reference/services_docs_mintlify_enriched/cdn_api.yaml get /cdn/presets/{preset_id}/applied/{object_id}
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: 1d7127c0c990
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.
  - name: CDN resources
  - name: 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.
  - name: Rule templates
  - name: Presets
    description: >-
      A preset is a predefined set of CDN resource or rule settings that can be
      applied to an object in a single request.


      Once a preset is applied to an object, the options included in the preset
      cannot be edited on that object until the preset is unapplied.
  - name: SSL certificates
  - name: Let's Encrypt certificates
  - name: 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
  - 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.
  - 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.
  - name: Tools
  - name: 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.
  - 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).
  - name: Origin shielding
  - name: IP addresses list
  - name: Purge history
paths:
  /cdn/presets/{preset_id}/applied/{object_id}:
    get:
      tags:
        - Presets
      summary: Get applied preset object
      description: >-
        Get a single object the preset is applied to.


        Returns `404` if the preset is not applied to the object, so you can use
        this endpoint to check

        whether the relationship exists.
      operationId: get-applied-preset-object
      parameters:
        - $ref: '#/components/parameters/preset_id'
        - $ref: '#/components/parameters/object_id'
      responses:
        '200':
          description: Successful.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppliedPresetObjectResponse'
        '404':
          description: Preset does not exist, or the preset is not applied to the object.
components:
  parameters:
    preset_id:
      in: path
      name: preset_id
      description: Preset ID.
      required: true
      schema:
        type: integer
    object_id:
      in: path
      name: object_id
      description: ID of the object (CDN resource or rule) the preset is applied to.
      required: true
      schema:
        type: integer
  schemas:
    AppliedPresetObjectResponse:
      type: object
      description: A single object the preset is applied to.
      properties:
        preset_id:
          $ref: '#/components/schemas/applied_preset_id'
        object_id:
          $ref: '#/components/schemas/applied_object_id'
      required:
        - preset_id
        - object_id
    applied_preset_id:
      type: integer
      description: >-
        ID of the preset that is applied to the object. Matches the `preset_id`
        path parameter.
      example: 42
    applied_object_id:
      type: integer
      description: >-
        ID of the object (CDN resource or rule, according to the preset
        `object_type`) the preset is applied to.
      example: 7531
  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

````