---
title: "Lists all available primary domains."
method: GET
path: "/domains/primary"
tags: ["domains - primary"]
---

# Lists all available primary domains.

`GET /domains/primary`

## Request

- Base URL: `https://manager.digicertdns.com/v1`
- URL: `https://manager.digicertdns.com/v1/domains/primary`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/digicert/apis/digicert-dns/docs/domains/primary/get.ts> (a function with typed inputs; its response is checked against the schema)

This endpoint lists all available primary domains, enabling users to review and manage the domains they have configured.</br></br>Key features include:</br></br>- **Clear success messaging:** Returns a `200` success code with a confirmation message indicating the successful completion of the requested action.</br>- **Comprehensive data retrieval:** Returns a comprehensive list of all primary domains, providing a complete and accurate overview for seamless management and analysis.</br>- **Comprehensive error handling:** Returns a `404` error code with a clear description when requests fail.</br>- **Controlled data limits:** The `pageSize` parameter allows users to define the maximum number of domains to display per page, optimizing data retrieval for specific use cases.</br>- **Customizable pagination:** The `pageNumber` parameter allows users to specify the page of results they wish to retrieve, ensuring targeted access to data.</br>- **Dynamic filtering:** Uses the `filterBy` and `name` parameters to filter results, streamlining access to specific domains and enhancing data retrieval efficiency.</br>- **Efficient sorting:** The `sortBy` parameter enables users to organize responses by various attributes, offering flexibility in result management.

## Query parameters

- `name` string
- `sortBy` 'updatedAtDesc' | 'updatedAtAsc' | 'createdTsAsc' | 'createdTsDesc' | 'createdAtDesc' | 'createdAtAsc' | 'modifiedTsAsc' | 'modifiedTsDesc'
- `pageSize` integer
- `pageNumber` integer
- `filterBy` 'primary' | 'secondary'

## Response `200`

Primary domains listed successfully.

- DomainPaginated
  - `data` Domain[]
    - `id` integer
    - `name` string
    - `type` string
    - `gtd` boolean
    - `dnssec` boolean
    - `noOfRecords` integer
    - `createdAt` string
    - `updatedAt` string
    - `queries` DomainStats
      - `total` integer
      - `refused` integer
      - `servfail` integer
      - `notimpl` integer
      - `responsecount` integer
      - `noerror` integer
      - `nxdomain` integer
      - `formerr` integer
    - `soa` DomainSoa
      - `id` integer
      - `name` string
    - `tsigKeyConfig` TsigKeyConfigResponse[]
      - `ipset` TsigKeyConfigResponseIpset
        - `name` string
        - `transferFrom` string[]
        - `notifyFrom` string[]
        - `ipSetId` integer
      - `tsigKey` TsigKeyConfigResponseTsigKey, nullable
        - `id` integer
        - `name` string
    - `status` string: status of the domain is active, pending or disabled.
  - `total` integer
  - `count` integer
  - `perPage` integer
  - `currentPage` integer
  - `totalPages` integer

## Other responses

- `404`: Resource not found.

---

[API](https://skmtc.dev/digicert/apis/digicert-dns.md) - [All operations](https://skmtc.dev/digicert/apis/digicert-dns/llms.txt) - [OpenAPI document](https://skmtc.dev/digicert/apis/digicert-dns/revisions/c74fc728cff8?raw)
