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
необязательно

Код подсети

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
необязательно

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
необязательно

Номер страницы, начиная с 1

Validations:

  • Must be a number.

per_page
необязательно

Число элементов на странице

Validations:

  • Must be a number.

Search fields

Field name Тип Possible values
fullname
location
location_id
name
organization
organization_id
params

GET /api/domains/:id
Показать домен

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

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

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

domain
обязательно

Validations:

  • Must be a Hash

domain[name]
обязательно

Полное DNS-имя домена

Validations:

  • Must be a String

domain[fullname]
необязательно , nil разрешен

Описание домена

Validations:

  • Must be a String

domain[dns_id]
необязательно , nil разрешен

DNS proxy ID to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
необязательно , nil разрешен

Массив параметров (имя, значение)

Validations:

  • Must be an array of any type

domain[location_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ местоположения с заданным кодом

Validations:

  • Must be an array of any type

domain[organization_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ организации с заданным кодом

Validations:

  • Must be an array of any type


PUT /api/domains/:id
Изменить домен

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

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]
необязательно , nil разрешен

Описание домена

Validations:

  • Must be a String

domain[dns_id]
необязательно , nil разрешен

DNS proxy ID to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
необязательно , nil разрешен

Массив параметров (имя, значение)

Validations:

  • Must be an array of any type

domain[location_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ местоположения с заданным кодом

Validations:

  • Must be an array of any type

domain[organization_ids]
необязательно , nil разрешен

ЗАМЕСТИТЬ организации с заданным кодом

Validations:

  • Must be an array of any type


DELETE /api/domains/:id
Удалить домен

Параметры

Имя параметра Описание
location_id
необязательно

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
необязательно

Set the current organization context for the request

Validations:

  • Must be a Integer

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.