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
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

Params

Param name Description
subnet_id
optional

ID of subnet

Validations:

  • String

location_id
optional

Scope by locations

Validations:

  • Integer

organization_id
optional

Scope by organizations

Validations:

  • Integer

search
optional

filter results

Validations:

  • String

order
optional

sort results

Validations:

  • String

page
optional

paginate results

Validations:

  • String

per_page
optional

number of entries per request

Validations:

  • String


GET /api/domains/:id
Show a domain

Params

Param name Description
id
required

Numerical ID or domain name

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

show_hidden_parameters
optional

Display hidden parameter values

Validations:

  • boolean


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

Params

Param name Description
domain
required

Validations:

  • Hash

domain[name]
required

The full DNS domain name

Validations:

  • String

domain[fullname]
optional , nil allowed

Description of the domain

Validations:

  • String

domain[dns_id]
optional , nil allowed

DNS proxy ID to use within this domain

Validations:

  • number.

domain[domain_parameters_attributes]
optional , nil allowed

Array of parameters (name, value)

Validations:

  • Must be an array of any type

domain[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

domain[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


PUT /api/domains/:id
Update a domain

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..

domain
required

Validations:

  • Hash

domain[name]
optional

The full DNS domain name

Validations:

  • String

domain[fullname]
optional , nil allowed

Description of the domain

Validations:

  • String

domain[dns_id]
optional , nil allowed

DNS proxy ID to use within this domain

Validations:

  • number.

domain[domain_parameters_attributes]
optional , nil allowed

Array of parameters (name, value)

Validations:

  • Must be an array of any type

domain[location_ids]
optional , nil allowed

REPLACE locations with given ids

Validations:

  • Must be an array of any type

domain[organization_ids]
optional , nil allowed

REPLACE organizations with given ids.

Validations:

  • Must be an array of any type


DELETE /api/domains/:id
Delete a domain

Params

Param name Description
id
required

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, ‘‘, ‘-’ with no leading or trailing space..