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
조직별 도메인 목록

Examples

GET /api/domains
200
{
  "total": 1,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "fullname": "example577.com",
      "created_at": "2019-09-11 14:41:10 UTC",
      "updated_at": "2019-09-11 14:41:10 UTC",
      "id": 759776770,
      "name": "example577.com",
      "dns_id": null,
      "dns": null
    }
  ]
}

Params

Param Name Description
subnet_id
Optional

서브넷 ID

Validations:

  • Must be a String

location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

Validations:

  • Must be a Integer

search
Optional

필터 결과

Validations:

  • Must be a String

order
Optional

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
Optional

1 부터 페이지 번호

Validations:

  • Must be a number.

per_page
Optional

반환할 페이지 당 결과 수

Validations:

  • Must be a number.

Search fields

Field name 유형 Possible values
fullname string
location string
location_id integer
name string
organization string
organization_id integer
params text

GET /api/domains/:id
도메인 표시

Examples

GET /api/domains/22495316-mydomain-net
200
{
  "fullname": null,
  "created_at": "2019-09-11 14:45:07 UTC",
  "updated_at": "2019-09-11 14:45:07 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": "2019-09-11 14:45:07 UTC",
      "updated_at": "2019-09-11 14:45:07 UTC",
      "id": 665394701,
      "name": "parameter",
      "parameter_type": null,
      "value": "value1"
    }
  ],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

Validations:

  • Must be a Integer

id
Required

숫자로된 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
Optional

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

Examples

POST /api/domains
{
  "organization_id": null,
  "domain": {
    "name": "example686.com"
  }
}
201
{
  "fullname": null,
  "created_at": "2019-09-11 14:45:08 UTC",
  "updated_at": "2019-09-11 14:45:08 UTC",
  "id": 759776766,
  "name": "example686.com",
  "dns_id": null,
  "dns": null,
  "subnets": [],
  "interfaces": [],
  "parameters": [],
  "locations": [],
  "organizations": []
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

Validations:

  • Must be a Integer

domain
Required

Validations:

  • Must be a Hash

domain[name]
Required

전체 DNS 도메인 이름

Validations:

  • Must be a String

domain[fullname]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

도메인 설명

Validations:

  • Must be a String

domain[dns_id]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

DNS proxy ID to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

매개 변수 (이름, 값)의 배열

Validations:

  • Must be an array of any type

domain[location_ids]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

지정된 ID로 위치를 변경합니다

Validations:

  • Must be an array of any type

domain[organization_ids]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

지정된 ID로 조직을 변경합니다

Validations:

  • Must be an array of any type


PUT /api/domains/:id
도메인 업데이트

Examples

PUT /api/domains/22495316-mydomain-net
{
  "domain": {
    "name": "domain.new"
  }
}
200
{
  "fullname": null,
  "created_at": "2019-09-11 14:45:07 UTC",
  "updated_at": "2019-09-11 14:45:08 UTC",
  "id": 22495316,
  "name": "domain.new",
  "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": "2019-09-11 14:45:07 UTC",
      "updated_at": "2019-09-11 14:45:07 UTC",
      "id": 665394701,
      "name": "parameter",
      "parameter_type": null,
      "value": "value1"
    }
  ],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

Validations:

  • Must be a Integer

id
Required

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
Required

Validations:

  • Must be a Hash

domain[name]
Optional

전체 DNS 도메인 이름

Validations:

  • Must be a String

domain[fullname]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

도메인 설명

Validations:

  • Must be a String

domain[dns_id]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

DNS proxy ID to use within this domain

Validations:

  • Must be a number.

domain[domain_parameters_attributes]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

매개 변수 (이름, 값)의 배열

Validations:

  • Must be an array of any type

domain[location_ids]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

지정된 ID로 위치를 변경합니다

Validations:

  • Must be an array of any type

domain[organization_ids]
Optional , <span class="translation_missing" title="translation missing: ko.apipie.nil_allowed">Nil Allowed</span>

지정된 ID로 조직을 변경합니다

Validations:

  • Must be an array of any type


DELETE /api/domains/:id
도메인 삭제

Examples

DELETE /api/domains/22495316-mydomain-net
{
  "domain": {}
}
200
{
  "id": 22495316,
  "name": "mydomain.net",
  "fullname": null,
  "created_at": "2019-09-11T14:45:07.866Z",
  "updated_at": "2019-09-11T14:45:07.866Z",
  "dns_id": 113629430
}

Params

Param Name Description
location_id
Optional

위치 별 범위

Validations:

  • Must be a Integer

organization_id
Optional

조직 별 범위

Validations:

  • Must be a Integer

id
Required

Validations:

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