Foreman considers a domain and a DNS zone as the same thing. That is, if you are planning to manage a site where all the machines are of the form hostname.somewhere.com then the domain is somewhere.com. This allows Foreman to associate a puppet variable with a domain/site and automatically append this variable to all external node requests made by machines at that site.


GET /api/domains
區域清單

GET /api/subnets/:subnet_id/domains
各個子網路中的區域之清單

GET /api/locations/:location_id/domains
各個位置上的區域之清單

GET /api/organizations/:organization_id/domains
各個組織中的區域之清單

參數

參數名字 描述
subnet_id
選填

子網路 ID

Validations:

  • Must be a String

location_id
選填

位置範圍

Validations:

  • Must be a Integer

organization_id
選填

組織範圍

Validations:

  • Must be a Integer

search
選填

篩選結果

Validations:

  • Must be a String

order
選填

排序結果

Validations:

  • Must be a String

page
選填

編頁結果

Validations:

  • Must be a String

per_page
選填

每個請求的項目數量

Validations:

  • Must be a String


GET /api/domains/:id
顯示區域

參數

參數名字 描述
id
必填

數字 ID 或區域名稱

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

show_hidden_parameters
選填

Display hidden parameter values

Validations:

  • Must be one of: true, false, 1, 0


POST /api/domains
建立網域

The fullname field is used for human readability in reports and other pages that refer to domains, and also available as an external node parameter

參數

參數名字 描述
domain
必填

Validations:

  • Must be a Hash

domain[name]
必填

完整的 DNS 區域名稱

Validations:

  • Must be a String

domain[fullname]
選填 , 允許空值

區域描述

Validations:

  • Must be a String

domain[dns_id]
選填 , 允許空值

DNS proxy ID to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
選填 , 允許空值

參數陣列(名稱、值)

Validations:

  • Must be an array of any type

domain[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

domain[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


PUT /api/domains/:id
更新區域

參數

參數名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.

domain
必填

Validations:

  • Must be a Hash

domain[name]
選填

完整的 DNS 區域名稱

Validations:

  • Must be a String

domain[fullname]
選填 , 允許空值

區域描述

Validations:

  • Must be a String

domain[dns_id]
選填 , 允許空值

DNS proxy ID to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
選填 , 允許空值

參數陣列(名稱、值)

Validations:

  • Must be an array of any type

domain[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

domain[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


DELETE /api/domains/:id
刪除區域

參數

參數名字 描述
id
必填

Validations:

  • Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.