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

# [Instance Domains] Preview the records a profile would write

> Compute, without writing anything, the DNS records attaching this domain with this profile would produce. Each record carries an action of 'create', 'replace' or 'unchanged', and the value currently in the zone when there is one, so a record the customer set is shown before it is overwritten.



## OpenAPI

````yaml https://api.onetsolutions.net/schema post /v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/domains/preview
openapi: 3.0.3
info:
  title: OnetSolutions API
  version: v1 (v1)
  description: >

    ## Overview


    The OnetSolutions API provides programmatic access to manage your cloud
    infrastructure, domains, and web hosting services.


    ## Authentication


    All API requests require authentication using one of the following methods:


    - **JWT Token**: Obtain a token via login endpoints and include it in the
    `Authorization: Bearer <token>` header

    - **API Key**: Generate an API key from your account settings and use it as
    `Authorization: Bearer sk-onetsolutions-...`


    ## Rate Limiting


    API requests are rate-limited to ensure fair usage:

    - **Standard**: 1000 requests per minute

    - **Burst**: 100 requests per second


    ## Pagination


    List endpoints return paginated results. Use `page` and `page_size` query
    parameters.


    ## Error Handling


    The API uses standard HTTP status codes:

    - `200` Success

    - `201` Created

    - `400` Bad Request

    - `401` Unauthorized

    - `403` Forbidden

    - `404` Not Found

    - `429` Too Many Requests
servers:
  - url: https://api.onetsolutions.net
    description: Production
security: []
tags:
  - name: Authentication
    description: >-
      Login, passwordless authentication, MFA, OAuth providers, and token
      management.
  - name: Organizations
    description: >-
      Organization management, members, roles, modules, audit logs, and
      notification settings.
  - name: Projects
    description: Project management, team members, and project-scoped resources.
  - name: Compute
    description: >-
      Cloud instances, volumes, snapshots, backups, VPCs, firewalls, SSH keys,
      uptime monitors, and instance tasks.
  - name: Billing
    description: >-
      Shopping cart, orders, invoices, payments, payment methods, gateways,
      promo codes, and balance management.
  - name: Domains
    description: >-
      Domain availability, registration, transfers, DNS zones, DNS records, and
      TLD information.
  - name: Web Hosting
    description: >-
      cPanel-based web hosting, emails, databases, subdomains, FTP accounts,
      addon domains, and SSL certificates.
paths:
  /v1/organizations/{organization_id}/projects/{project_id}/compute/instances/{instance_id}/domains/preview:
    post:
      tags:
        - Domains
      summary: '[Instance Domains] Preview the records a profile would write'
      description: >-
        Compute, without writing anything, the DNS records attaching this domain
        with this profile would produce. Each record carries an action of
        'create', 'replace' or 'unchanged', and the value currently in the zone
        when there is one, so a record the customer set is shown before it is
        overwritten.
      operationId: preview_instance_domain
      parameters:
        - in: path
          name: instance_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: organization_id
          schema:
            type: string
            format: uuid
          required: true
        - in: path
          name: project_id
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InstanceDomainRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PlannedRecord'
          description: >-
            The records the profile would write, with their action and current
            value
        '400':
          description: >-
            The profile is unknown, or no DNS zone is hosted here for this
            domain
        '401':
          description: Authentication credentials were not provided or are invalid
        '403':
          description: You do not have permission to manage instances in this organization
        '404':
          description: Instance or domain not found in this organization and project
      security:
        - BearerAuth: []
components:
  schemas:
    InstanceDomainRequest:
      type: object
      properties:
        domain_id:
          type: string
          format: uuid
        profile:
          enum:
            - web
            - web_and_mail
            - cloudron
          type: string
          description: |-
            * `web` - web
            * `web_and_mail` - web_and_mail
            * `cloudron` - cloudron
          x-spec-enum-id: 93ac2bd3f07cdd6f
      required:
        - domain_id
        - profile
    PlannedRecord:
      type: object
      properties:
        record_type:
          type: string
          readOnly: true
        name:
          type: string
          readOnly: true
        content:
          type: string
          readOnly: true
        priority:
          type: integer
          readOnly: true
          nullable: true
        ttl:
          type: integer
          readOnly: true
        action:
          type: string
          readOnly: true
        current_content:
          type: string
          readOnly: true
          nullable: true
      required:
        - action
        - content
        - current_content
        - name
        - priority
        - record_type
        - ttl
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT or API Key
      description: >-
        Use `Authorization: Bearer <token>` header. Token can be a JWT token or
        an API key (format: `sk-onetsolutions-...`).

````