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

參數

參數名字 描述
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.

smart_proxy_id
選填

Validations:

  • Must be a String

environment_id
選填

Validations:

  • Must be a String

dryrun
選填

Validations:

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

except
選填

選用性的逗號分隔字串,包含了「new」、「updated」或是「obsolete」,以用來限制匯入的 Puppet 類別

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
列出各個組織的環境

參數

參數名字 描述
puppetclass_id
選填

Puppet 類別的 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
location
location_id
name
organization
organization_id

GET /api/environments/: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.


POST /api/environments
建立環境

參數

參數名字 描述
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

environment
必填

Validations:

  • Must be a Hash

environment[name]
必填

Validations:

  • Must be a String

environment[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

environment[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


PUT /api/environments/: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.

environment
必填

Validations:

  • Must be a Hash

environment[name]
選填

Validations:

  • Must be a String

environment[location_ids]
選填 , 允許空值

將位置取代為特定 ID

Validations:

  • Must be an array of any type

environment[organization_ids]
選填 , 允許空值

將組織取代為特定 ID。

Validations:

  • Must be an array of any type


DELETE /api/environments/: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.