v32

latestOpenAPI 3.1.0raw.githubusercontent.com2026-05-151,1412,2144.5 MB
NetworkMappings

Import Network Mapping

Import network mapping from YAML file.

Note: A YAML file use spaces as indentation, tabs are not allowed. Example of input file:

  name: mapping_rule_1
  mapping:
      - tags:
          - tag_name_1
        cidr4:
          - 127.0.2.0/24
      - tags:
          - tag_name_2
          - tag_name_3
        cidr4:
          - 128.0.1.0/24
          - 128.0.2.0/24
          - 128.0.3.0/24
        cidr6:
          - ac:20::0/64
---
  name: mapping_rule_2
  mapping:
      - tags:
          - my_network
        cidr4:
          - 129.0.2.0/24
        cidr6:
          - ac:20::0/64

Example of request:

curl --location --request POST 'https://api.gcore.com/dns/v2/network-mappings/import' \
--header 'Authorization: Bearer ...' \
--header 'Content-Type: text/plain' \
--data-raw 'name: mapping_rule_1
mapping:
    - tags:
        - tag_name_1
      cidr4:
        - 127.0.2.0/24
    - tags:
        - tag_name_2
        - tag_name_3
      cidr4:
        - 128.0.1.0/24
        - 128.0.2.0/24
        - 128.0.3.0/24
      cidr6:
        - aa:10::/64
---
name: mapping_rule_2
mapping:
    - tags:
        - my_network
      cidr4:
        - 129.0.2.0/24
      cidr6:
        - ac:20::0/64'
post/dns/v2/network-mappings/import

Response

ImportNetworkMappingResponse

successboolean