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/locations/447626441/organizations/447626439/domains 200 { "total": 1, "subtotal": 1, "page": 1, "per_page": 20, "search": null, "sort": { "by": null, "order": null }, "results": [ { "fullname": "example199.com", "created_at": "2018-07-24 12:54:34 UTC", "updated_at": "2018-07-24 12:54:34 UTC", "id": 759776764, "name": "example199.com", "dns_id": null, "dns": null } ] }
Param name | Description |
---|---|
subnet_id optional |
ID of subnet Validations:
|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
search optional |
filter results Validations:
|
order optional |
Sort field and order, eg. ‘id DESC’ Validations:
|
page optional |
paginate results Validations:
|
per_page optional |
number of entries per request Validations:
|
Field name | Type | Possible values |
---|---|---|
fullname | string | |
location | string | |
location_id | integer | |
name | string | |
organization | string | |
organization_id | integer | |
params | text |
GET /api/domains/22495316-mydomain-net 200 { "fullname": null, "created_at": "2018-07-24 13:06:08 UTC", "updated_at": "2018-07-24 13:06:08 UTC", "id": 22495316, "name": "mydomain.net", "dns_id": 113629430, "dns": { "name": "DNS Proxy", "id": 113629430, "url": "http://else.where:45671" }, "subnets": [ { "id": 980190962, "name": "one", "description": null, "network_address": "2.3.4.0/24" } ], "interfaces": [], "parameters": [ { "priority": null, "created_at": "2018-07-24 13:06:08 UTC", "updated_at": "2018-07-24 13:06:08 UTC", "id": 665394701, "name": "parameter", "value": "value1" } ], "locations": [ { "id": 255093256, "name": "Location 1", "title": "Location 1", "description": null } ], "organizations": [ { "id": 447626438, "name": "Organization 1", "title": "Organization 1", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
id required |
Numerical ID or domain name Validations:
|
show_hidden_parameters optional |
Display hidden parameter values Validations:
|
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
POST /api/domains { "organization_id": 447626444, "domain": { "name": "example654.com", "organization_ids": [ 447626444 ], "location_ids": [ 447626446 ] } } 201 { "fullname": null, "created_at": "2018-07-24 13:03:00 UTC", "updated_at": "2018-07-24 13:03:00 UTC", "id": 759776770, "name": "example654.com", "dns_id": null, "dns": null, "subnets": [], "interfaces": [], "parameters": [], "locations": [ { "id": 447626446, "name": "loc202", "title": "loc202", "description": null } ], "organizations": [ { "id": 447626444, "name": "org263", "title": "org263", "description": null } ] }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
domain required |
Validations:
|
domain[name] required |
The full DNS domain name Validations:
|
domain[fullname] optional , nil allowed |
Description of the domain Validations:
|
domain[dns_id] optional , nil allowed |
DNS proxy ID to use within this domain Validations:
|
domain[domain_parameters_attributes] optional , nil allowed |
Array of parameters (name, value) Validations:
|
domain[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
domain[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
PUT /api/domains/22495316-mydomain-net { "domain": { "name": "" } } 422 { "error": { "id": 22495316, "errors": { "name": [ "can't be blank" ] }, "full_messages": [ "Name can't be blank" ] } }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
id required |
Validations:
|
domain required |
Validations:
|
domain[name] optional |
The full DNS domain name Validations:
|
domain[fullname] optional , nil allowed |
Description of the domain Validations:
|
domain[dns_id] optional , nil allowed |
DNS proxy ID to use within this domain Validations:
|
domain[domain_parameters_attributes] optional , nil allowed |
Array of parameters (name, value) Validations:
|
domain[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
domain[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
DELETE /api/domains/22495316-mydomain-net { "domain": {} } 200 { "id": 22495316, "name": "mydomain.net", "fullname": null, "created_at": "2018-07-24T13:06:08.848Z", "updated_at": "2018-07-24T13:06:08.848Z", "dns_id": 113629430 }
Param name | Description |
---|---|
location_id optional |
Scope by locations Validations:
|
organization_id optional |
Scope by organizations Validations:
|
id required |
Validations:
|