---
title: "Retrieves a domain pattern by environment ID and pattern ID."
method: GET
path: "/environments/{environmentId}/domain-patterns/{patternId}"
tags: ["Domain Patterns"]
---

# Retrieves a domain pattern by environment ID and pattern ID.

`GET /environments/{environmentId}/domain-patterns/{patternId}`

## Request

- Base URL: `https://api.acquia.com/v3`
- URL: `https://api.acquia.com/v3/environments/{environmentId}/domain-patterns/{patternId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/acquia/apis/acquia-cloud-platform-api/docs/environments/:environmentId/domain-patterns/:patternId/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `environmentId` string, required
- `patternId` string, required

## Response `200`

OK

- object
  - `id` string, required: Unique identifier for the domain pattern.
  - `pattern` string, required: The domain pattern string, optionally followed by a single path segment (e.g. [site-name].acme.com/app). The [site-name] token is mandatory; [environment-name] is optional at environment level. Domain rules (enforced in service layer): ≤ 200 chars excluding token placeholders, at least 2 components (must contain .), no IP addresses, no forbidden suffixes (acquia-sites.com, hosting.acquia.com), no wildcards, no leading/trailing dot or hyphen, no consecutive dots, no query string or fragment. Path rules: optional, max 255 chars, must match ^/[A-Za-z0-9._-]+$, max 1 segment. DNS label limit: 63 chars after token substitution ([site-name] ≤ 14 chars). One pattern per environment.
  - `_links` object, required: HAL links for the resource
    - `self` EnvironmentServiceAPIHalLink, 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)

## Other responses

- `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)
