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 or 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
List of domains

GET /api/subnets/:subnet_id/domains
List of domains per subnet

GET /api/locations/:location_id/domains
List of domains per location

GET /api/organizations/:organization_id/domains
List of domains per organization

參數

參數名字 描述
subnet_id
選填

ID of subnet

Validations:

  • Must be String

location_id
選填

Scope by locations

Validations:

  • Must be Integer

organization_id
選填

Scope by organizations

Validations:

  • Must be Integer

search
選填

篩選結果

Validations:

  • Must be String

order
選填

排序結果

Validations:

  • Must be String

page
選填

編頁結果

Validations:

  • Must be String

per_page
選填

每個請求的項目數量

Validations:

  • Must be String


GET /api/domains/:id
Show a domain

參數

參數名字 描述
id
必填

Numerical ID or domain name

Validations:

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


POST /api/domains
Create a domain

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]
必填

The full DNS domain name

Validations:

  • Must be String

domain[fullname]
選填 , 允許空值

Description of the domain

Validations:

  • Must be String

domain[dns_id]
選填 , 允許空值

DNS proxy to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
選填 , 允許空值

Array of parameters (name, value)

Validations:

  • Must be an array of any type

domain[location_ids]
選填 , 允許空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

domain[organization_ids]
選填 , 允許空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/domains/:id
Update a domain

參數

參數名字 描述
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]
選填

The full DNS domain name

Validations:

  • Must be String

domain[fullname]
選填 , 允許空值

Description of the domain

Validations:

  • Must be String

domain[dns_id]
選填 , 允許空值

DNS proxy to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
選填 , 允許空值

Array of parameters (name, value)

Validations:

  • Must be an array of any type

domain[location_ids]
選填 , 允許空值

REPLACE locations with given ids

Validations:

  • Must be an array of any type

domain[organization_ids]
選填 , 允許空值

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/domains/:id
Delete a domain

參數

參數名字 描述
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.