---
title: "Retrieves a collection of custom security rules."
method: GET
path: "/subscriptions/{subscriptionUuid}/config/security/custom-rules"
tags: ["CDNs"]
---

# Retrieves a collection of custom security rules.

`GET /subscriptions/{subscriptionUuid}/config/security/custom-rules`

## Request

- Base URL: `https://api.acquia.com/v3`
- URL: `https://api.acquia.com/v3/subscriptions/{subscriptionUuid}/config/security/custom-rules`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/docs/subscriptions/:subscriptionUuid/config/security/custom-rules/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieves custom security rules for a subscription.

## Path parameters

- `subscriptionUuid` string, required

## Query parameters

- `offset` integer
- `limit` integer

## Response `200`

OK

- object
  - `_links` object, required: HAL links for the resource
    - `self` CDNAPIHalLink, required: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
    - `prev` CDNAPIHalLink: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
    - `next` CDNAPIHalLink: HAL link object
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` boolean: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
    - `offset` object: Templated link for offset
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` true, required: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
    - `limit` object: Templated link for limit
      - `href` union, required: The target URI of the link (can be a URI or URI template)
        - string, uri
        - string, uri-template
      - `templated` true, required: Whether the link is a URI template
      - `type` string: Hint about the media type expected when dereferencing the target resource
      - `deprecation` string: A URL to a resource that provides deprecation information
      - `name` string: A secondary key for selecting links
      - `profile` string: A URI that hints about the profile of the target resource
      - `title` string: A human-readable identifier for the link
      - `hreflang` string: The language of the target resource
  - `_embedded` object, required: Embedded resources for the collection
    - `items` object[], required: The array of resources in the collection
      - `id` integer, required: The unique identifier of the custom security rule.
      - `display_name` string, required: The display name of the custom security rule.
      - `action` 'block' | 'allow' | 'alert', required: The action applied when the rule matches.
      - `priority` integer, required: The priority order for the rule. Lower values are evaluated first. Priorities must be unique within a subscription — creating or updating a rule with a priority already in use replaces the existing rule at that priority.
      - `domains` string[], required: The domains the rule applies to.
      - `paths` string[], required: The paths the rule applies to.
      - `mapped_domains_count` integer: The number of domains the rule is mapped to.
      - `targets` union[], required: Conditions that must match for the rule to fire.
        - union
          - object: Range match for IP or ASN ranges.
            - `attribute` 'source-ip' | 'asn', required: The request attribute the rule inspects.
            - `criteria` 'range', required: How `value` is compared against `attribute`.
            - `value` object, required: Range bounds for IP or ASN ranges.
              - …
          - object: Value-list match for non-header, non-query attributes.
            - `attribute` 'source-ip' | 'country' | 'method' | 'path' | 'asn', required: The request attribute the rule inspects.
            - `criteria` 'equals' | 'contains' | 'regex', required: How `value` is compared against `attribute`.
            - `value` object, required: A list of candidate values combined with OR.
              - …
          - object: Key-value match for header or query-string attributes.
            - `attribute` 'header' | 'query-string', required: The request attribute the rule inspects.
            - `criteria` 'equals' | 'contains' | 'regex', required: How `value` is compared against `attribute`.
            - `value` object, required: Key-value matchers for header or query-string attributes.
              - …
      - `created_at` string, date-time, required: The timestamp when the rule was created.
      - `updated_at` string, date-time, required: The timestamp when the rule was last updated.
      - `_links` object, required: HAL links for the resource
        - `self` CDNAPIHalLink, required: HAL link object
          - `href` union, required: The target URI of the link (can be a URI or URI template)
            - string, uri
            - string, uri-template
          - `templated` boolean: Whether the link is a URI template
          - `type` string: Hint about the media type expected when dereferencing the target resource
          - `deprecation` string: A URL to a resource that provides deprecation information
          - `name` string: A secondary key for selecting links
          - `profile` string: A URI that hints about the profile of the target resource
          - `title` string: A human-readable identifier for the link
          - `hreflang` string: The language of the target resource
      - `_embedded` object: Embedded resources (optional)
  - `count` integer, required: The number of items in the current page
  - `total` integer, required: The total number of items available
  - `pagination` object, required
    - `total` integer, required: The total number of items available
    - `limit` integer, required: The maximum number of items to retrieve in a single page
    - `offset` integer, required: The starting position of the items to retrieve

## Other responses

- `400`: Validation Error
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `500`: Internal Server Error

---

[API](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api.md) - [All operations](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/revisions/508f8f94456d?raw)
