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"
]
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
id required |
Validations:
|
|
smart_proxy_id optional |
Validations:
|
|
environment_id optional |
Validations:
|
|
dryrun optional |
Validations:
|
|
except optional |
Optional comma-delimited string containing either ‘new’, ‘updated’, or ‘obsolete’ that is used to limit the imported Puppet classes Validations:
|
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
}
]
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Scope by locations Validations:
|
|
organization_id optional |
Scope by organizations Validations:
|
|
search optional |
filter results Validations:
|
|
order optional |
Sort field and order, eg. ‘id DESC’ Validations:
|
|
page optional |
Page number, starting at 1 Validations:
|
|
per_page optional |
Number of results per page to return Validations:
|
| Field name | Type | Possible values |
|---|---|---|
| feature | string | |
| location | string | |
| location_id | integer | |
| name | string | |
| organization | string | |
| organization_id | integer | |
| url | string |
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
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
id required |
Validations:
|
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": []
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
smart_proxy required |
Validations:
|
|
smart_proxy[name] required |
Validations:
|
|
smart_proxy[url] required |
Validations:
|
|
smart_proxy[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
|
smart_proxy[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
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"
]
}
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
id required |
Validations:
|
|
smart_proxy required |
Validations:
|
|
smart_proxy[name] optional |
Validations:
|
|
smart_proxy[url] optional |
Validations:
|
|
smart_proxy[location_ids] optional , nil allowed |
REPLACE locations with given ids Validations:
|
|
smart_proxy[organization_ids] optional , nil allowed |
REPLACE organizations with given ids. Validations:
|
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"
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
id required |
Validations:
|
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
}
]
}
| Param name | Description |
|---|---|
|
location_id optional |
Set the current location context for the request Validations:
|
|
organization_id optional |
Set the current organization context for the request Validations:
|
|
id required |
Validations:
|