> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hybridbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Получить состояние домена

> Возвратите диагностику работоспособности домена, ориентированную на клиента.

<script src="/locale-bridge.js" />


## OpenAPI

````yaml /openapi.ru.json GET /v1/public/accounts/{account_id}/domains/{domain}/health
openapi: 3.1.0
info:
  title: Code API (Public)
  version: 1.0.0
servers:
  - url: https://api.hybridbox.io
security: []
paths:
  /v1/public/accounts/{account_id}/domains/{domain}/health:
    get:
      tags:
        - public-accounts
        - public-domains
      summary: Получить состояние домена
      description: >-
        Возвратите диагностику работоспособности домена, ориентированную на
        клиента.
      operationId: >-
        get_public_domain_health_v1_public_accounts__account_id__domains__domain__health_get
      parameters:
        - in: path
          name: account_id
          required: true
          schema:
            format: uuid
            title: Account Id
            type: string
        - in: path
          name: domain
          required: true
          schema:
            title: Domain
            type: string
        - in: query
          name: refresh
          required: false
          schema:
            default: false
            title: Refresh
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DomainHealthResponse'
          description: ''
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Ошибка валидации
      security:
        - PublicBearerAuth: []
components:
  schemas:
    DomainHealthResponse:
      properties:
        cache_ttl_seconds:
          title: Срок жизни кэша в секундах
          type: integer
        cached:
          title: Кэшировано
          type: boolean
        checked_at:
          title: Проверено в
          type: string
        checks:
          $ref: '#/components/schemas/DomainHealthChecks'
        domain_id:
          format: uuid
          title: Id домена
          type: string
        domain_name:
          title: Имя домена
          type: string
        summary_status:
          enum:
            - healthy
            - warning
            - critical
            - unknown
          title: Сводный статус
          type: string
        timings_ms:
          additionalProperties:
            type: integer
          title: Тайминги г-жа
          type: object
      required:
        - summary_status
        - checked_at
        - domain_id
        - domain_name
        - cached
        - cache_ttl_seconds
        - checks
        - timings_ms
      title: DomainHealthResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Сведения
          type: array
      title: HTTPОшибка проверки
      type: object
    DomainHealthChecks:
      description: Сгруппированные результаты проверки работоспособности домена.
      properties:
        dns:
          $ref: '#/components/schemas/DomainHealthDnsChecks'
        ports:
          $ref: '#/components/schemas/DomainHealthPortChecks'
        ssl:
          $ref: '#/components/schemas/DomainHealthProbeDetail'
        web:
          $ref: '#/components/schemas/DomainHealthHttpChecks'
      required:
        - dns
        - web
        - ssl
        - ports
      title: DomainHealthChecks
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Расположение
          type: array
        msg:
          title: Сообщение
          type: string
        type:
          title: Тип ошибки
          type: string
      required:
        - loc
        - msg
        - type
      title: Ошибка проверки
      type: object
    DomainHealthDnsChecks:
      additionalProperties: true
      description: Датчики состояния, связанные с DNS.
      properties:
        a:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        dkim:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        dmarc:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Ошибка
        mx:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        ns:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        spf:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        status:
          enum:
            - healthy
            - warning
            - critical
            - unknown
          title: Статус
          type: string
      required:
        - status
      title: DomainHealthDnsChecks
      type: object
    DomainHealthPortChecks:
      additionalProperties: true
      description: Проверка доступности порта почтовой службы.
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Ошибка
        imap_143:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        imaps_993:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        smtp_25:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        status:
          enum:
            - healthy
            - warning
            - critical
            - unknown
          title: Статус
          type: string
        submission_587:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
      required:
        - status
      title: DomainHealthPortChecks
      type: object
    DomainHealthProbeDetail:
      additionalProperties: true
      description: Статус и сведения о проверке работоспособности отдельного домена.
      properties:
        actual:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Фактическое значение
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Код
        days_remaining:
          anyOf:
            - type: integer
            - type: 'null'
          title: Осталось дней
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Ошибка
        expected:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Ожидаемое значение
        expires_at:
          anyOf:
            - type: string
            - type: 'null'
          title: истекает время
        issuer:
          anyOf:
            - type: string
            - type: 'null'
          title: Издатель
        record:
          anyOf:
            - type: string
            - type: 'null'
          title: Запись
        records:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Записи
        status:
          enum:
            - healthy
            - warning
            - critical
            - unknown
          title: Статус
          type: string
        status_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Код состояния
      required:
        - status
      title: DomainHealthProbeDetail
      type: object
    DomainHealthHttpChecks:
      additionalProperties: true
      description: Датчики достижимости HTTP и HTTPS.
      properties:
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Ошибка
        http_root:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        http_www:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        https_root:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        https_www:
          anyOf:
            - $ref: '#/components/schemas/DomainHealthProbeDetail'
            - type: 'null'
        status:
          enum:
            - healthy
            - warning
            - critical
            - unknown
          title: Статус
          type: string
      required:
        - status
      title: DomainHealthHttpChecks
      type: object
  securitySchemes:
    PublicBearerAuth:
      bearerFormat: JWT or Hybridbox Service account token
      description: >-
        Public API bearer credential sent as `Authorization: Bearer <token>`.
        Use either an OAuth access token or a Hybridbox Service account token.
      scheme: bearer
      type: http

````