Examples

POST /api/smart_proxies/182953976/import_puppetclasses
{
  "smart_proxy": {}
}
200
{
  "message": "Successfully updated environment and puppetclasses from the on-disk puppet installation",
  "environments_with_new_puppetclasses": 2,
  "environments_updated_puppetclasses": 0,
  "environments_obsolete": 3,
  "environments_ignored": 0,
  "results": [
    {
      "name": "env1",
      "actions": [
        "new"
      ],
      "new_puppetclasses": [
        "a"
      ]
    },
    {
      "name": "env2",
      "actions": [
        "new"
      ],
      "new_puppetclasses": [
        "b"
      ]
    },
    {
      "name": "global_puppetmaster",
      "actions": [
        "obsolete"
      ],
      "removed_environment": "global_puppetmaster"
    },
    {
      "name": "production",
      "actions": [
        "obsolete"
      ],
      "removed_environment": "production"
    },
    {
      "name": "testing",
      "actions": [
        "obsolete"
      ],
      "removed_environment": "testing"
    }
  ]
}

Params

Param Name Description
location_id
Optional

Scope by locations

Validations:

  • Must be a Integer

organization_id
Optional

Scope by organizations

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

Optional comma-delimited string containing either ‘new’, ‘updated’, or ‘obsolete’ that is used to limit the imported Puppet classes

Validations:

  • Must be a String