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

# Enable FQDN exception rule

> POST /v2/api/enable_fqdn_exception_rule



## OpenAPI

````yaml /openapi/10.0/aviatrix-api.json post /v2/api/enable_fqdn_exception_rule
openapi: 3.1.0
info:
  title: Aviatrix Controller API
  version: '10.0'
  description: >-
    Aviatrix Controller API — version 10.0. Selected operations with Mintlify
    metadata.
servers: []
security: []
tags:
  - name: policies
    x-group: Policies
  - name: authentication
    x-group: Authentication
  - name: account-management
    x-group: Account Management
  - name: rbac
    x-group: RBAC & Permissions
  - name: gateways
    x-group: Gateways
  - name: transit
    x-group: Transit
  - name: nat
    x-group: NAT
  - name: app-domains
    x-group: SmartGroups
  - name: certificates
    x-group: Certificates
  - name: mitm
    x-group: MITM
  - name: monitoring
    x-group: Monitoring & Diagnostics
  - name: fqdn
    x-group: FQDN
  - name: logging
    x-group: Logging
  - name: vpn
    x-group: UserVPN
  - name: site-to-cloud
    x-group: Site-to-Cloud
  - name: controller
    x-group: Controller
  - name: bgp
    x-group: BGP
  - name: general
    x-group: General
  - name: firenet
    x-group: FireNet
  - name: networking
    x-group: Networking
  - name: tgw
    x-group: AWS TGW
  - name: ips
    x-group: IPS
  - name: saml
    x-group: SAML
paths:
  /v2/api/enable_fqdn_exception_rule:
    post:
      tags:
        - fqdn
      operationId: enable_fqdn_exception_rule
      requestBody:
        content:
          application/json:
            schema:
              properties:
                CID:
                  $ref: '#/components/schemas/CID'
                action:
                  $ref: '#/components/schemas/action'
                add:
                  description: Add gateway_to_tag or filter pass through.
                  enum:
                    - pass_through
                    - tag_gw
                  type: string
                attach:
                  $ref: '#/components/schemas/StringToggle'
                  description: Attach/detach user.
                cache_rule:
                  description: Cache_rule:enabled/disabled.
                  enum:
                    - disabled
                    - enabled
                  type: string
                compress:
                  description: Compressing the export string.
                  type: boolean
                delete:
                  description: Delete tag or gateway_from_tag.
                  enum:
                    - tag
                    - tag_gw
                  type: string
                exact_match:
                  description: Exact_match:enabled/disabled.
                  enum:
                    - disabled
                    - enabled
                  type: string
                export:
                  description: Export existing tag config.
                  enum:
                    - tag
                  type: string
                gw:
                  description: Gateway name.
                  type: string
                import_path:
                  description: User config filepath.
                  type: string
                is_discovery:
                  description: Discovery mode started.
                  type: boolean
                mode:
                  description: White/Black mode.
                  enum:
                    - black
                    - white
                  type: string
                modify_policy:
                  description: Add/Delete rules instead of replace.
                  enum:
                    - add_rules
                    - delete_rules
                  type: string
                policies:
                  description: 'Policy list of dictionaries: [{fqdn:, proto:, port:}].'
                  type: string
                private_sub_filter:
                  description: Include private subnet into the FQDN filter.
                  type: boolean
                show:
                  description: Display current config.
                  enum:
                    - all_gws
                    - cache_rule
                    - exact_match
                    - exception_rule
                    - pass_through
                    - private_sub_filter
                    - protocols_supported
                    - source_ip_filters
                    - tag_gws
                    - tag_policies
                    - tags
                  type: string
                source_ips:
                  description: Source ip/cidr for filtering.
                  type: string
                state:
                  description: Tag_state:enabled/disabled.
                  enum:
                    - disabled
                    - enabled
                  type: string
                tag:
                  description: Tag name.
                  type: string
                update_now:
                  description: Update policy directly after import.
                  type: boolean
              type: object
        required: true
      responses:
        '200':
          $ref: '#/components/responses/general_response_v2'
        default:
          $ref: '#/components/responses/general_response_v2'
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -sk -X POST
            "https://<controller>/v2/api/enable_fqdn_exception_rule" \
              -H "Authorization: cid <CID>"
        - lang: python
          label: Python
          source: |-
            import requests

            url = "https://<controller>/v2/api/enable_fqdn_exception_rule"
            headers = {"Authorization": "cid <CID>"}

            response = requests.post(url, headers=headers, verify=False)
            print(response.status_code)
            print(response.text)
        - lang: javascript
          label: JavaScript
          source: |-
            fetch("https://<controller>/v2/api/enable_fqdn_exception_rule", {
              method: "POST",
              headers: {"Authorization": "cid <CID>"}
            })
              .then(res => res.text())
              .then(console.log)
              .catch(console.error);
        - lang: go
          label: Go
          source: |-
            package main

            import (
              "fmt"
              "net/http"
            )

            func main() {
              req, _ := http.NewRequest("POST", "https://<controller>/v2/api/enable_fqdn_exception_rule", nil)
              req.Header.Set("Authorization", "cid <CID>")

              client := &http.Client{}
              resp, err := client.Do(req)
              if err != nil {
                panic(err)
              }
              defer resp.Body.Close()

              fmt.Println(resp.Status)
            }
components:
  schemas:
    CID:
      description: The opaque session ID token. Required for 7.2 controllers only.
      type: string
    action:
      description: The API action to perform. Required for 7.2 controllers only.
      type: string
    StringToggle:
      description: A boolean choice expressed as a string
      enum:
        - 'yes'
        - 'no'
      type: string
    general_response_v2:
      additionalProperties: true
      description: A generic API response container for v2 style APIs.
      properties:
        errortype:
          description: Error type if the API failed.
          type: string
        reason:
          description: Failure reason if the API failed.
          type: string
        results:
          oneOf:
            - description: API response data
              type: boolean
            - description: API response data
              type: integer
            - description: API response data
              type: string
            - description: API response data
              type: object
            - description: API response data
              items: {}
              type: array
        return:
          description: Whether the API returned successfully
          type: boolean
      title: General Response v2
      type: object
  responses:
    general_response_v2:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/general_response_v2'
      description: General v2 API response schema.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.