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

POST /api/smart_proxies/:smart_proxy_id/environments/:id/import_puppetclasses
Import klas puppet ze środowiska puppet proxy.

POST /api/environments/:environment_id/smart_proxies/:id/import_puppetclasses
Import klas puppet ze środowiska puppet proxy.

Przykłady

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": 0,
  "environments_updated_puppetclasses": 1,
  "environments_obsolete": 1,
  "environments_ignored": 1,
  "results": [
    {
      "name": "env1",
      "actions": [
        "ignored"
      ],
      "ignored_environment": "env1"
    },
    {
      "name": "env2",
      "actions": [
        "updated",
        "obsolete"
      ],
      "updated_puppetclasses": [
        "a"
      ],
      "obsolete_puppetclasses": [
        "b",
        "c"
      ]
    }
  ]
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

id
wymagany

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
opcjonalny

Validations:

  • Must be a String

environment_id
opcjonalny

Validations:

  • Must be a String

dryrun
opcjonalny

Validations:

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

except
opcjonalny

Opcjonalnie oddzielony przecinkami ciąg zawierający albo “nowy”, “zaktualizowane” lub “przestarzałe”, który służy do ograniczania zaimportowanych klas puppet

Validations:

  • Must be a String


GET /api/smart_proxies
Lista wszystkich inteligentnych proxy

Przykłady

GET /api/smart_proxies
200
{
  "total": 8,
  "subtotal": 1,
  "page": 1,
  "per_page": 20,
  "search": "feature=TFTP",
  "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": "TFTP Proxy",
      "id": 298486374,
      "url": "http://somewhere.else",
      "features": [
        {
          "capabilities": [],
          "name": "TFTP",
          "id": 303403661
        }
      ]
    }
  ]
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Zakres w zależności od lokalizacji

Validations:

  • Must be a Integer

organization_id
opcjonalny

Zakres w zależności od organizacji

Validations:

  • Must be a Integer

search
opcjonalny

rezultat filtrowania

Validations:

  • Must be a String

order
opcjonalny

Sort field and order, eg. ‘id DESC’

Validations:

  • Must be a String

page
opcjonalny

Page number, starting at 1

Validations:

  • Must be a number.

per_page
opcjonalny

Number of results per page to return

Validations:

  • Must be a number.

Search fields

Field name Typ Possible values
feature string
location string
location_id integer
name string
organization string
organization_id integer
url string

GET /api/smart_proxies/:id
Pokaż inteligentne proxy

Przykłady

GET /api/smart_proxies/980190962-DHCP%20Proxy
200
{
  "created_at": "2019-11-07 08:34:09 UTC",
  "updated_at": "2019-11-07 08:34:09 UTC",
  "name": "DHCP Proxy",
  "id": 980190962,
  "url": "https://somewhere.net:8443",
  "features": [
    {
      "capabilities": [],
      "name": "DHCP",
      "id": 219245707
    }
  ],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

id
wymagany

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/smart_proxies
Tworzenie inteligentnych proxy

Przykłady

POST /api/smart_proxies
{
  "smart_proxy": {
    "name": "master02",
    "url": "http://server:8443"
  }
}
201
{
  "created_at": "2019-11-07 08:34:32 UTC",
  "updated_at": "2019-11-07 08:34:32 UTC",
  "name": "master02",
  "id": 982965219,
  "url": "http://server:8443",
  "features": [
    {
      "capabilities": [],
      "name": "DNS",
      "id": 49142851
    },
    {
      "capabilities": [],
      "name": "TFTP",
      "id": 303403661
    },
    {
      "capabilities": [],
      "name": "DHCP",
      "id": 219245707
    },
    {
      "capabilities": [],
      "name": "Puppet CA",
      "id": 783807086
    },
    {
      "capabilities": [],
      "name": "Puppet",
      "id": 1006510553
    },
    {
      "capabilities": [],
      "name": "BMC",
      "id": 821748566
    },
    {
      "capabilities": [],
      "name": "Chef Proxy",
      "id": 848995175
    },
    {
      "capabilities": [],
      "name": "Realm",
      "id": 982965213
    },
    {
      "capabilities": [],
      "name": "Logs",
      "id": 814728799
    }
  ],
  "locations": [],
  "organizations": []
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

smart_proxy
wymagany

Validations:

  • Must be a Hash

smart_proxy[name]
wymagany

Validations:

  • Must be a String

smart_proxy[url]
wymagany

Validations:

  • Must be a String

smart_proxy[location_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ lokalizacje o podanym id

Validations:

  • Must be an array of any type

smart_proxy[organization_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ organizacje o podanym id

Validations:

  • Must be an array of any type


PUT /api/smart_proxies/:id
Aktualizacja inteligentnych proxy

Przykłady

PUT /api/smart_proxies/980190962-DHCP%20Proxy
{
  "smart_proxy": {
    "name": ""
  }
}
422
{
  "error": {
    "id": 980190962,
    "errors": {
      "name": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Name can't be blank"
    ]
  }
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

id
wymagany

Validations:

  • Must be a String

smart_proxy
wymagany

Validations:

  • Must be a Hash

smart_proxy[name]
opcjonalny

Validations:

  • Must be a String

smart_proxy[url]
opcjonalny

Validations:

  • Must be a String

smart_proxy[location_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ lokalizacje o podanym id

Validations:

  • Must be an array of any type

smart_proxy[organization_ids]
opcjonalny , nil dopuszczalny

ZMIEŃ organizacje o podanym id

Validations:

  • Must be an array of any type


DELETE /api/smart_proxies/:id
Usuń inteligentnego proxy

Przykłady

DELETE /api/smart_proxies/281110143-Unused%20Proxy
{
  "smart_proxy": {}
}
200
{
  "id": 281110143,
  "name": "Unused Proxy",
  "url": "http://else.where:45672",
  "created_at": "2019-11-07T08:34:09.802Z",
  "updated_at": "2019-11-07T08:34:09.802Z",
  "expired_logs": "0"
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

id
wymagany

Validations:

  • Must be a String


PUT /api/smart_proxies/:id/refresh
Odśwież inteligentne funkcje proxy

Przykłady

POST /api/smart_proxies/980190962-DHCP%20Proxy/refresh
{
  "smart_proxy": {}
}
201
{
  "created_at": "2019-11-07 08:34:09 UTC",
  "updated_at": "2019-11-07 08:34:09 UTC",
  "name": "DHCP Proxy",
  "id": 980190962,
  "url": "https://somewhere.net:8443",
  "features": [
    {
      "capabilities": [],
      "name": "DHCP",
      "id": 219245707
    },
    {
      "capabilities": [],
      "name": "DNS",
      "id": 49142851
    },
    {
      "capabilities": [],
      "name": "TFTP",
      "id": 303403661
    },
    {
      "capabilities": [],
      "name": "Puppet CA",
      "id": 783807086
    },
    {
      "capabilities": [],
      "name": "Puppet",
      "id": 1006510553
    },
    {
      "capabilities": [],
      "name": "BMC",
      "id": 821748566
    },
    {
      "capabilities": [],
      "name": "Chef Proxy",
      "id": 848995175
    },
    {
      "capabilities": [],
      "name": "Realm",
      "id": 982965213
    },
    {
      "capabilities": [],
      "name": "Logs",
      "id": 814728799
    }
  ],
  "locations": [
    {
      "id": 255093256,
      "name": "Location 1",
      "title": "Location 1",
      "description": null
    }
  ],
  "organizations": [
    {
      "id": 447626438,
      "name": "Organization 1",
      "title": "Organization 1",
      "description": null
    }
  ]
}

Parametry

Nazwa parametru Opis
location_id
opcjonalny

Set the current location context for the request

Validations:

  • Must be a Integer

organization_id
opcjonalny

Set the current organization context for the request

Validations:

  • Must be a Integer

id
wymagany

Validations:

  • Must be a String