POST /api/smart_proxies/:id/import_puppetclasses
Import puppet classes from puppet proxy

POST /api/smart_proxies/:smart_proxy_id/environments/:id/import_puppetclasses
환경에 대한 Puppet 프록시에서 Puppet 클래스를 가져옵니다

POST /api/environments/:environment_id/smart_proxies/:id/import_puppetclasses
환경에 대한 Puppet 프록시에서 Puppet 클래스를 가져옵니다

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

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.

smart_proxy_id
Optional

Validations:

  • Must be a String

environment_id
Optional

Validations:

  • Must be a String

dryrun
Optional

Validations:

  • Must be one of: true, false, 1, 0.

except
Optional

가져오기한 Puppet 클래스를 제한하는데 사용하는 ‘new’, ‘updated’, ‘obsolete’ 중 하나가 포함된 콤마로 구분된 문자열 옵션

Validations:

  • Must be a String


GET /api/environments
모든 환경 목록 나열

GET /api/puppetclasses/:puppetclass_id/environments
Puppet 클래스 환경 목록 나열

GET /api/locations/:location_id/environments
위치 별 환경 나열

GET /api/organizations/:organization_id/environments
조직 별 환경 나열

Examples

GET /api/environments
200
{
  "total": 3,
  "subtotal": 3,
  "page": 1,
  "per_page": 20,
  "search": null,
  "sort": {
    "by": null,
    "order": null
  },
  "results": [
    {
      "created_at": "2019-11-07 08:34:09 UTC",
      "updated_at": "2019-11-07 08:34:09 UTC",
      "name": "global_puppetmaster",
      "id": 153855663
    },
    {
      "created_at": "2019-11-07 08:34:09 UTC",
      "updated_at": "2019-11-07 08:34:09 UTC",
      "name": "production",
      "id": 334344675
    },
    {
      "created_at": "2019-11-07 08:34:09 UTC",
      "updated_at": "2019-11-07 08:34:09 UTC",
      "name": "testing",
      "id": 687036937
    }
  ]
}

Params

Param Name Description
puppetclass_id
Optional

Puppet 클래스 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
location string
location_id integer
name string
organization string
organization_id integer

GET /api/environments/:id
환경 표시

Examples

GET /api/environments/334344675
200
{
  "created_at": "2019-11-07 08:34:09 UTC",
  "updated_at": "2019-11-07 08:34:09 UTC",
  "name": "production",
  "id": 334344675,
  "template_combinations": [
    {
      "id": 980190962,
      "provisioning_template_id": 943779058,
      "provisioning_template_name": "MyString",
      "hostgroup_id": 636252244,
      "hostgroup_name": "Common",
      "environment_id": 334344675,
      "environment_name": "production",
      "config_template_id": 943779058,
      "config_template_name": "MyString"
    },
    {
      "id": 113629430,
      "provisioning_template_id": 104314179,
      "provisioning_template_name": "MyFinish",
      "hostgroup_id": null,
      "hostgroup_name": null,
      "environment_id": 334344675,
      "environment_name": "production",
      "config_template_id": 104314179,
      "config_template_name": "MyFinish"
    },
    {
      "id": 281110143,
      "provisioning_template_id": 269958254,
      "provisioning_template_name": "MyString2",
      "hostgroup_id": 636252244,
      "hostgroup_name": "Common",
      "environment_id": 334344675,
      "environment_name": "production",
      "config_template_id": 269958254,
      "config_template_name": "MyString2"
    },
    {
      "id": 1018350795,
      "provisioning_template_id": 981457253,
      "provisioning_template_name": "MyScript",
      "hostgroup_id": 636252244,
      "hostgroup_name": "Common",
      "environment_id": 334344675,
      "environment_name": "production",
      "config_template_id": 981457253,
      "config_template_name": "MyScript"
    }
  ],
  "puppetclasses": [
    {
      "id": 298486374,
      "name": "apache",
      "module_name": "apache"
    },
    {
      "id": 638205575,
      "name": "auth",
      "module_name": "auth"
    },
    {
      "id": 980190962,
      "name": "base",
      "module_name": "base"
    },
    {
      "id": 51848956,
      "name": "chkmk",
      "module_name": "chkmk"
    },
    {
      "id": 1018350795,
      "name": "nagios",
      "module_name": "nagios"
    },
    {
      "id": 374648174,
      "name": "pam",
      "module_name": "pam"
    },
    {
      "id": 281110143,
      "name": "vim",
      "module_name": "vim"
    }
  ],
  "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

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

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.


POST /api/environments
환경 생성

Examples

POST /api/environments
{
  "environment": {
    "name": "some_environment",
    "organization_ids": [
      114267492
    ]
  }
}
201
{
  "created_at": "2019-11-07 08:34:13 UTC",
  "updated_at": "2019-11-07 08:34:13 UTC",
  "name": "some_environment",
  "id": 687036938,
  "template_combinations": [],
  "puppetclasses": [],
  "locations": [],
  "organizations": [
    {
      "id": 114267492,
      "name": "Empty Organization",
      "title": "Empty Organization",
      "description": null
    }
  ]
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

Validations:

  • Must be a Integer

environment
Required

Validations:

  • Must be a Hash

environment[name]
Required

Validations:

  • Must be a String

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

environment[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/environments/:id
환경 업데이트

Examples

PUT /api/environments/687036940
{
  "environment": {
    "location_ids": [
      255093256
    ]
  }
}
200
{
  "created_at": "2019-11-07 08:34:13 UTC",
  "updated_at": "2019-11-07 08:34:13 UTC",
  "name": "environment85",
  "id": 687036940,
  "template_combinations": [],
  "puppetclasses": [],
  "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

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

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.

environment
Required

Validations:

  • Must be a Hash

environment[name]
Optional

Validations:

  • Must be a String

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

environment[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/environments/:id
환경 삭제

Examples

DELETE /api/environments/testing
{
  "environment": {}
}
200
{
  "id": 687036937,
  "name": "testing",
  "created_at": "2019-11-07T08:34:09.775Z",
  "updated_at": "2019-11-07T08:34:09.775Z"
}

Params

Param Name Description
location_id
Optional

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
Optional

Set the current organization context for the request

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.