Exemples

POST /api/environments
{
  "environment": {
    "name": "some_environment",
    "organization_ids": [
      114267492
    ]
  }
}
201
{
  "created_at": "2019-09-11 14:51:49 UTC",
  "updated_at": "2019-09-11 14:51:49 UTC",
  "name": "some_environment",
  "id": 687036947,
  "template_combinations": [],
  "puppetclasses": [],
  "locations": [],
  "organizations": [
    {
      "id": 114267492,
      "name": "Empty Organization",
      "title": "Empty Organization",
      "description": null
    }
  ]
}

Paramètres

Nom du paramètre Description
location_id
optionel

Tri par emplacement

Validations:

  • Must be a Integer

organization_id
optionel

Tri par organisation

Validations:

  • Must be a Integer

environment
requis

Validations:

  • Must be a Hash

environment[name]
requis

Validations:

  • Must be a String

environment[location_ids]
optionel , nil autorisé

REMPLACER les emplacements par les id donnés

Validations:

  • Must be an array of any type

environment[organization_ids]
optionel , nil autorisé

REMPLACER les organisations qui ont les ID suivants

Validations:

  • Must be an array of any type