---
title: "ReadVirtualHosts"
method: GET
path: "/v1/vhost/"
tags: ["vhosts"]
---

# ReadVirtualHosts

`GET /v1/vhost/`

List virtual hosts.

## Query parameters

- `hostname` string
- `type` string
- `rootDirectory` string
- `parentHostname` string
- `withMappings` boolean
- `createdBeforeAt` string
- `createdAfterAt` string
- `pageNumber` integer
- `itemsPerPage` integer
- `sortBy` string
- `sortDirection` string
- `lastSeenId` string

## Response `200`

OK

- DtoReadVirtualHostsResponse
  - `pagination` GithubComGoinfiniteTkSrcDomainDtoPagination
    - `itemsPerPage` integer
    - `itemsTotal` integer
    - `lastSeenId` string
    - `pageNumber` integer
    - `pagesTotal` integer
    - `sortBy` string
    - `sortDirection` string
  - `virtualHostWithMappings` DtoVirtualHostWithMappings[]
    - `aliasesHostnames` string[]
    - `createdAt` integer
    - `hostname` string
    - `isPrimary` boolean
    - `isWildcard` boolean
    - `mappings` EntityMapping[]
      - `createdAt` integer
      - `hostname` string
      - `id` integer
      - `mappingSecurityRuleId` integer
      - `marketplaceInstalledItemId` integer
      - `marketplaceInstalledItemName` string
      - `matchPattern` 'begins-with' | 'contains' | 'equals' | 'ends-with'
      - `path` string
      - `shouldUpgradeInsecureRequests` boolean
      - `targetHttpResponseCode` integer
      - `targetType` 'url' | 'service' | 'response-code' | 'inline-html' | 'static-files'
      - `targetValue` string
      - `updatedAt` integer
    - `parentHostname` string
    - `rootDirectory` string
    - `type` 'top-level' | 'subdomain' | 'alias' | 'wildcard' | 'primary'
  - `virtualHosts` EntityVirtualHost[]
    - `aliasesHostnames` string[]
    - `createdAt` integer
    - `hostname` string
    - `isPrimary` boolean
    - `isWildcard` boolean
    - `parentHostname` string
    - `rootDirectory` string
    - `type` 'top-level' | 'subdomain' | 'alias' | 'wildcard' | 'primary'

---

[API](https://skmtc.net/goinfinite/apis/osapi.md) · [All operations](https://skmtc.net/goinfinite/apis/osapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/goinfinite/osapi/versions/7320a5d8ef9e/schema)
