GET /api/architectures 200 [ { "architecture": { "name": "s390", "id": 381564594, "updated_at": "2012-12-18T15:24:42Z", "operatingsystem_ids": [], "created_at": "2012-12-18T15:24:42Z" } }, { "architecture": { "name": "sparc", "id": 331892513, "updated_at": "2012-12-18T15:24:42Z", "operatingsystem_ids": [ 442321401 ], "created_at": "2012-12-18T15:24:42Z" } }, { "architecture": { "name": "x86_64", "id": 501905019, "updated_at": "2012-12-18T15:24:42Z", "operatingsystem_ids": [ 331303656, 309172073, 1073012828 ], "created_at": "2012-12-18T15:24:42Z" } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/architectures/x86_64 200 { "architecture": { "name": "x86_64", "id": 501905019, "updated_at": "2012-12-18T15:24:42Z", "operatingsystem_ids": [ 309172073, 1073012828, 331303656 ], "created_at": "2012-12-18T15:24:42Z" } }
POST /api/architectures { "architecture": { "name": "i386" } } 200 { "architecture": { "name": "i386", "id": 501905020, "updated_at": "2012-12-18T15:24:43Z", "operatingsystem_ids": [], "created_at": "2012-12-18T15:24:43Z" } }
Operatingsystem ID’s
PUT /api/architectures/x86_64 { "architecture": {} } 200 { "architecture": { "name": "x86_64", "id": 501905019 } }
Operatingsystem ID’s
DELETE /api/architectures/s390 200 { "architecture": { "name": "s390", "id": 381564594 } }
GET /api/audits 200 [ { "audit": { "auditable_name": null, "user_id": null, "associated_id": 272, "associated_name": null, "id": 1, "comment": null, "auditable_id": 0, "auditable_type": "Host", "associated_type": "Host", "remote_address": null, "action": "update", "audited_changes": { "architecture_id": [ 10463, 10466 ] }, "user_type": null, "version": 1, "created_at": "2009-12-14T08:01:17Z" } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/audits/1 200 { "audit": { "auditable_name": null, "user_id": null, "associated_id": 272, "associated_name": null, "id": 1, "comment": null, "auditable_id": 0, "auditable_type": "Host", "associated_type": "Host", "remote_address": null, "action": "update", "audited_changes": { "architecture_id": [ 10463, 10466 ] }, "user_type": null, "version": 1, "created_at": "2009-12-14T08:01:17Z" } }
GET /api/auth_source_ldaps 200 [ { "auth_source_ldap": { "name": "ldap", "attr_lastname": "sn", "port": 123, "attr_firstname": "givenName", "attr_login": "uid", "tls": true, "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "host": "ldap", "base_dn": "dn=x,dn=y", "attr_mail": "mail", "account": null, "type": "AuthSourceLdap", "created_at": "2012-12-18T15:24:43Z", "onthefly_register": true } } ]
paginate results
number of entries per request
GET /api/auth_source_ldaps/980190962 200 { "auth_source_ldap": { "name": "ldap", "attr_lastname": "sn", "attr_firstname": "givenName", "port": 123, "attr_login": "uid", "tls": true, "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "host": "ldap", "base_dn": "dn=x,dn=y", "attr_mail": "mail", "account": null, "type": "AuthSourceLdap", "created_at": "2012-12-18T15:24:43Z", "onthefly_register": true } }
POST /api/auth_source_ldaps { "auth_source_ldap": { "name": "ldap2", "host": "ldap2" } } 201 { "auth_source_ldap": { "name": "ldap2", "tls": false, "port": 389, "attr_login": null, "attr_lastname": null, "attr_firstname": null, "id": 980190963, "updated_at": "2012-12-18T15:24:44Z", "host": "ldap2", "base_dn": null, "attr_mail": null, "account_password": null, "account": null, "onthefly_register": false, "created_at": "2012-12-18T15:24:44Z" } }
defaults to 389
required if onthefly_register is true
required if onthefly_register is true
required if onthefly_register is true
required if onthefly_register is true
required if onthefly_register is true
PUT /api/auth_source_ldaps/980190962 { "auth_source_ldap": {} } 200 { "auth_source_ldap": { "name": "ldap", "tls": true, "port": 123, "attr_login": "uid", "attr_lastname": "sn", "attr_firstname": "givenName", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "host": "ldap", "base_dn": "dn=x,dn=y", "attr_mail": "mail", "account_password": null, "account": null, "onthefly_register": true, "created_at": "2012-12-18T15:24:43Z" } }
defaults to 389
required if onthefly_register is true
required if onthefly_register is true
required if onthefly_register is true
required if onthefly_register is true
required if onthefly_register is true
DELETE /api/auth_source_ldaps/980190962 200 { "auth_source_ldap": { "name": "ldap", "tls": true, "port": 123, "attr_login": "uid", "attr_lastname": "sn", "attr_firstname": "givenName", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "host": "ldap", "base_dn": "dn=x,dn=y", "attr_mail": "mail", "account_password": null, "account": null, "onthefly_register": true, "created_at": "2012-12-18T15:24:43Z" } }
GET /api/bookmarks 200 [ { "bookmark": { "name": "bar", "query": "bar=car", "id": 298486374, "owner_id": null, "public": false, "controller": "hosts", "owner_type": null } }, { "bookmark": { "name": "foo", "query": "foo=boo", "id": 980190962, "owner_id": null, "public": true, "controller": "hosts", "owner_type": null } } ]
paginate results
number of entries per request
GET /api/bookmarks/foo 200 { "bookmark": { "name": "foo", "query": "foo=boo", "id": 980190962, "owner_id": null, "public": true, "controller": "hosts", "owner_type": null } }
POST /api/bookmarks { "bookmark": { "query": "bar", "name": "foo-bar", "public": false, "controller": "hosts" } } 200 { "bookmark": { "name": "foo-bar", "query": "bar", "id": 980190963, "owner_id": 886836129, "public": false, "controller": "hosts", "owner_type": "User" } }
PUT /api/bookmarks/foo { "bookmark": {} } 200 { "bookmark": { "name": "foo", "query": "foo=boo", "user": { "name": "apiadmin User", "login": "apiadmin", "email": "apiadmin@someware.com" }, "id": 980190962, "public": true, "controller": "hosts" } }
DELETE /api/bookmarks/foo 200 { "bookmark": { "query": "foo=boo", "name": "foo", "id": 980190962, "public": true, "owner_id": null, "controller": "hosts", "owner_type": null } }
GET /api/common_parameters 200 [ { "common_parameter": { "name": "test", "value": "myvalue", "id": 636252244 } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/common_parameters/636252244 200 { "common_parameter": { "name": "test", "value": "myvalue", "id": 636252244 } }
POST /api/common_parameters { "common_parameter": { "name": "special_key", "value": "123" } } 200 { "common_parameter": { "name": "special_key", "value": "123", "id": 767575239 } }
PUT /api/common_parameters/636252244 { "common_parameter": {} } 200 { "common_parameter": { "name": "test", "value": "myvalue", "id": 636252244 } }
DELETE /api/common_parameters/636252244 200 { "common_parameter": { "name": "test", "value": "myvalue", "id": 636252244 } }
GET /api/compute_resources 200 [ { "compute_resource": { "name": "mycompute", "url": "test:///default", "user": "MyString", "provider": "Libvirt", "id": 367690737, "description": "mycompute", "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } }, { "compute_resource": { "name": "MyString", "url": "qemu://stam/system", "user": "MyString", "provider": "Libvirt", "id": 980190962, "description": "MyString", "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } }, { "compute_resource": { "name": "yourcompute", "url": "test:///default", "user": "MyString", "provider": "Libvirt", "id": 932571420, "description": "yourcompute", "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/compute_resources/980190962-mystring 200 { "compute_resource": { "name": "MyString", "url": "qemu://stam/system", "user": "MyString", "provider": "Libvirt", "id": 980190962, "description": "MyString", "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } }
POST /api/compute_resources { "compute_resource": { "name": "special_compute", "user": "user@example.com", "provider": "EC2", "password": "secret", "region": "eu-west-1" } } 200 { "compute_resource": { "name": "special_compute", "url": "eu-west-1", "user": "user@example.com", "provider": "EC2", "id": 980190963, "description": null, "updated_at": "2012-12-18T15:24:44Z", "created_at": "2012-12-18T15:24:44Z" } }
Providers include Libvirt, Ovirt, EC2, Vmware, Openstack, Rackspace, GCE
URL for Libvirt, Ovirt, and Openstack
Username for Ovirt, EC2, Vmware, Openstack. Access Key for EC2.
Password for Ovirt, EC2, Vmware, Openstack. Secret key for EC2
for Ovirt, Vmware Datacenter
for EC2 only
for Openstack only
for Vmware
PUT /api/compute_resources/367690737-mycompute { "compute_resource": { "description": "new_description" } } 200 { "compute_resource": { "url": "test:///default", "name": "mycompute", "user": "MyString", "id": 367690737, "uuid": "mycompute", "updated_at": "2012-12-18T15:24:45Z", "description": "new_description", "attrs": {}, "created_at": "2012-12-18T15:24:42Z" } }
Providers include Libvirt, Ovirt, EC2, Vmware, Openstack, Rackspace, GCE
URL for Libvirt, Ovirt, and Openstack
Username for Ovirt, EC2, Vmware, Openstack. Access Key for EC2.
Password for Ovirt, EC2, Vmware, Openstack. Secret key for EC2
for Ovirt, Vmware Datacenter
for EC2 only
for Openstack only
for Vmware
DELETE /api/compute_resources/932571420 200 { "compute_resource": { "url": "test:///default", "name": "yourcompute", "user": "MyString", "id": 932571420, "uuid": "yourcompute", "updated_at": "2012-12-18T15:24:42Z", "description": "yourcompute", "attrs": null, "created_at": "2012-12-18T15:24:42Z" } }
GET /api/config_templates 200 [ { "config_template": { "name": "centos5_3_pxelinux", "audit_comment": null, "id": 1007981701, "snippet": null, "template": "default linux~label linux~kernel <%= @kernel %>~append initrd=<%= @initrd %> ks=<%= foreman_url(\"kickstart\")%> ksdevice=bootif network kssendmac", "template_kind": { "name": "PXELinux", "id": 452984334 } } }, { "config_template": { "name": "MyFinish", "audit_comment": null, "id": 104314179, "snippet": null, "template": "MyFinish", "template_kind": { "name": "finish", "id": 550103832 } } }, { "config_template": { "name": "MyScript", "audit_comment": null, "id": 981457253, "snippet": null, "template": "MyText", "template_kind": { "name": "script", "id": 478250810 } } }, { "config_template": { "name": "MyString", "audit_comment": null, "id": 943779058, "snippet": null, "template": "MyText", "template_kind": { "name": "gPXE", "id": 158998239 } } }, { "config_template": { "name": "MyString2", "audit_comment": null, "id": 269958254, "snippet": null, "template": "MyText", "template_kind": { "name": "provision", "id": 983253650 } } }, { "config_template": { "name": "PXE Default File", "audit_comment": null, "id": 352050261, "snippet": null, "template": "default linux~label linux~kernel <%= @kernel %>~append initrd=<%= @initrd %> ksdevice=bootif network kssendmac", "template_kind": { "name": "PXELinux", "id": 452984334 } } }, { "config_template": { "name": "PXE Default Menu", "audit_comment": null, "id": 684651467, "": null, "snippet": null, "template": "FOO" } }, { "config_template": { "name": "PXE Localboot Default", "audit_comment": null, "id": 821548108, "snippet": null, "template": "DEFAULT menu~PROMPT 0~MENU TITLE PXE Menu~TIMEOUT 200~TOTALTIMEOUT 6000~ONTIMEOUT local~~LABEL local~MENU LABEL (local)~MENU DEFAULT~LOCALBOOT 0", "template_kind": { "name": "PXELinux", "id": 452984334 } } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/config_templates/centos5_3_pxelinux 200 { "config_template": { "name": "centos5_3_pxelinux", "id": 1007981701, "audit_comment": null, "snippet": null, "template": "default linux~label linux~kernel <%= @kernel %>~append initrd=<%= @initrd %> ks=<%= foreman_url(\"kickstart\")%> ksdevice=bootif network kssendmac", "template_kind": { "name": "PXELinux", "id": 452984334 } } }
POST /api/config_templates { "config_template": { "name": "RandomName", "template": "This is a test template", "template_kind_id": 1 } } 200 { "config_template": { "name": "RandomName", "audit_comment": null, "id": 1007981702, "": null, "snippet": null, "template": "This is a test template" } }
template name
not relevant for snippet
Array of template combinations (hostgroup_id, environment_id)
Array of operating systems ID to associate the template with
PUT /api/config_templates/centos5_3_pxelinux { "config_template": { "audit_comment": "aha", "template": "tmp" } } 200 { "config_template": { "name": "centos5_3_pxelinux", "id": 1007981701, "template": "tmp", "snippet": null, "template_kind": { "name": "PXELinux", "id": 452984334 } } }
template name
not relevant for snippet
Array of template combinations (hostgroup_id, environment_id)
Array of operating systems ID to associate the template with
template version
DELETE /api/config_templates/centos5_3_pxelinux 200 { "config_template": { "name": "centos5_3_pxelinux", "id": 1007981701, "template": "default linux~label linux~kernel <%= @kernel %>~append initrd=<%= @initrd %> ks=<%= foreman_url(\"kickstart\")%> ksdevice=bootif network kssendmac", "snippet": null, "template_kind": { "name": "PXELinux", "id": 452984334 } } }
GET /api/config_templates/build_pxe_default 200 PXE Default file has been deployed to all Smart Proxies
GET /api/dashboard 200 { "disabled_hosts": 0, "ok_hosts": 0, "good_hosts": 0, "active_hosts_ok": 0, "pending_hosts_enabled": 0, "active_hosts_ok_enabled": 0, "good_hosts_enabled": 0, "active_hosts": 0, "percentage": 0, "out_of_sync_hosts": 0, "total_hosts": 12, "bad_hosts": 0, "out_of_sync_hosts_enabled": 0, "pending_hosts": 0, "bad_hosts_enabled": 0, "ok_hosts_enabled": 0, "reports_missing": 12 }
filter results
Foreman considers a domain and a DNS zone as the same thing. That is, if you are planning to manage a site where all the machines are or the form hostname.somewhere.com then the domain is somewhere.com. This allows Foreman to associate a puppet variable with a domain/site and automatically append this variable to all external node requests made by machines at that site.
GET /api/domains 200 [ { "domain": { "name": "mydomain.net", "id": 22495316, "dns_id": 113629430, "fullname": null, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }, { "domain": { "name": "unused.net", "id": 759776763, "dns_id": 113629430, "fullname": "somewhare that is never used", "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }, { "domain": { "name": "useless.net", "id": 229305443, "dns_id": null, "fullname": null, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }, { "domain": { "name": "yourdomain.net", "id": 589326610, "dns_id": 113629430, "fullname": "somewhere in yourdomain", "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } } ]
Filter results
Sort results
paginate results
number of entries per request
GET /api/domains/mydomain.net 200 { "domain": { "name": "mydomain.net", "id": 22495316, "dns_id": 113629430, "updated_at": "2012-12-18T15:24:43Z", "fullname": null, "created_at": "2012-12-18T15:24:43Z" } }
May be numerical id or domain name
The fullname field is used for human readability in reports and other pages that refer to domains, and also available as an external node parameter
POST /api/domains { "domain": { "name": "domain.net" } } 201 { "domain": { "name": "domain.net", "id": 759776764 } }
The full DNS Domain name
Full name describing the domain
DNS Proxy to use within this domain
Array of parameters (name, value)
PUT /api/domains/mydomain.net { "domain": { "name": "" } } 422 { "domain": { "id": 22495316, "errors": { "name": [ "can't be blank" ] }, "full_messages": [ "Name can't be blank" ] } }
The full DNS Domain name
Full name describing the domain
DNS Proxy to use within this domain
Array of parameters (name, value)
DELETE /api/domains/mydomain.net 200 { "domain": { "name": "mydomain.net", "id": 22495316 } }
GET /api/environments 200 [ { "environment": { "name": "global_puppetmaster", "id": 153855663, "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } }, { "environment": { "name": "production", "id": 334344675, "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } }, { "environment": { "name": "testing", "id": 687036937, "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } } ]
Filter results
Sort results
paginate results
number of entries per request
GET /api/environments/production 200 { "environment": { "name": "production", "id": 334344675, "updated_at": "2012-12-18T15:24:42Z", "created_at": "2012-12-18T15:24:42Z" } }
POST /api/environments { "environment": { "name": "Development" } } 200 { "environment": { "name": "Development", "id": 687036938, "updated_at": "2012-12-18T15:24:46Z", "created_at": "2012-12-18T15:24:46Z" } }
PUT /api/environments/production { "environment": {} } 200 { "environment": { "name": "production", "id": 334344675 } }
DELETE /api/environments/testing 200 { "environment": { "name": "testing", "id": 687036937 } }
GET /api/hosts/my5name.mydomain.net/facts 200 { "my5name.mydomain.net": { "ipaddress": "10.0.19.33", "kernelversion": "2.6.9" } }
filter results
sort results
paginate results
number of entries per request
GET /api 200 { "links": { "List all hosts": "/api/hosts", "List all compute resources": "/api/compute_resources", "List of subnets": "/api/subnets", "List all fact values": "/api/fact_values", "List all authsource ldaps": "/api/auth_source_ldaps", "List all settings": "/api/settings", "List of domains": "/api/domains", "List all operating systems": "/api/operatingsystems", "List all images for compute resource": "/api/compute_resources/:compute_resource_id/images", "List all smart_proxies": "/api/smart_proxies", "List all models": "/api/models", "List templates": "/api/config_templates", "List all architectures": "/api/architectures", "List all hostgroups": "/api/hostgroups", "List all environments": "/api/environments", "List all ptables": "/api/ptables", "List all users": "/api/users", "List all usergroups": "/api/usergroups", "List all common parameters": "/api/common_parameters", "List all puppetclasses": "/api/puppetclasses", "Show status": "/api/status", "List all media": "/api/media", "List all bookmarks": "/api/bookmarks", "List all template kinds": "/api/template_kinds", "Get Dashboard results": "/api/dashboard", "List all reports": "/api/reports", "Show available links": "/api", "List all lookup_keys": "/api/lookup_keys", "List all roles": "/api/roles", "List all audits": "/api/audits" } }
id of host
id of puppetclass
id of host
id of puppetclass
id of hostgroup
id of puppetclass
id of hostgroup
id of puppetclass
GET /api/hostgroups 200 [ { "hostgroup": { "name": "db", "label": "db", "id": 603241515, "operatingsystem_id": 309172073, "ancestry": null, "environment_id": 334344675, "parameters": {}, "subnet_id": null, "domain_id": null, "puppetclass_ids": [] } }, { "hostgroup": { "name": "Common", "label": "Common", "id": 636252244, "operatingsystem_id": 309172073, "ancestry": null, "environment_id": 334344675, "parameters": { "group1": "group1" }, "subnet_id": null, "domain_id": 22495316, "puppetclass_ids": [ 980190962 ] } }, { "hostgroup": { "name": "Unusual", "label": "Unusual", "id": 866317115, "operatingsystem_id": null, "ancestry": null, "environment_id": null, "parameters": {}, "subnet_id": null, "domain_id": null, "puppetclass_ids": [] } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/hostgroups/636252244-common 200 { "hostgroup": { "name": "Common", "label": "Common", "id": 636252244, "operatingsystem_id": 309172073, "ancestry": null, "environment_id": 334344675, "parameters": { "group1": "group1" }, "subnet_id": null, "domain_id": 22495316, "puppetclass_ids": [ 980190962 ] } }
POST /api/hostgroups { "hostgroup": { "name": "TestHostgroup" } } 200 { "hostgroup": { "name": "TestHostgroup", "label": "TestHostgroup", "id": 866317116, "operatingsystem_id": null, "ancestry": null, "environment_id": null, "parameters": {}, "subnet_id": null, "domain_id": null, "puppetclass_ids": [] } }
PUT /api/hostgroups/636252244-common { "hostgroup": {} } 200 { "hostgroup": { "name": "Common", "label": "Common", "id": 636252244, "operatingsystem_id": 309172073, "ancestry": null, "parameters": { "group1": "group1" }, "environment_id": 334344675, "subnet_id": null, "domain_id": 22495316, "puppetclass_ids": [ 980190962 ] } }
DELETE /api/hostgroups/636252244-common 200 { "hostgroup": { "name": "Common", "label": "Common", "id": 636252244, "operatingsystem_id": 309172073, "ancestry": null, "parameters": {}, "environment_id": 334344675, "subnet_id": null, "domain_id": 22495316, "puppetclass_ids": [] } }
GET /api/hosts 200 [ { "host": { "name": "anotherfullhost", "id": 55602819, "operatingsystem_id": 1073012828, "hostgroup_id": null } }, { "host": { "name": "dhcp.mydomain.net", "id": 219245707, "operatingsystem_id": 1073012828, "hostgroup_id": null } }, { "host": { "name": "my5name.mydomain.net", "id": 980190962, "operatingsystem_id": 1073012828, "hostgroup_id": null } }, { "host": { "name": "myfullname.mydomain.net", "id": 1053842695, "operatingsystem_id": 309172073, "hostgroup_id": null } }, { "host": { "name": "otherfullhost", "id": 661942085, "operatingsystem_id": 1073012828, "hostgroup_id": null } }, { "host": { "name": "sdhcp.mydomain.net", "id": 500757383, "operatingsystem_id": 1073012828, "hostgroup_id": null } }, { "host": { "name": "sol10host", "id": 715054938, "operatingsystem_id": 442321401, "hostgroup_id": null } }, { "host": { "name": "suse01.yourdomain.net", "id": 859751735, "operatingsystem_id": 859751735, "hostgroup_id": null } }, { "host": { "name": "temp-01.yourdomain.net", "id": 1011586618, "operatingsystem_id": 331303656, "hostgroup_id": null } }, { "host": { "name": "temp01.yourdomain.net", "id": 1073012828, "operatingsystem_id": 1073012828, "hostgroup_id": null } }, { "host": { "name": "temp-02.useless.net", "id": 3666571, "operatingsystem_id": 331303656, "hostgroup_id": null } }, { "host": { "name": "temp.yourdomain.net", "id": 298486374, "operatingsystem_id": 309172073, "hostgroup_id": null } } ]
Filter results
Sort results
paginate results
number of entries per request
GET /api/hosts/my5name.mydomain.net 200 { "host": { "host_parameters": [ { "host_parameter": { "priority": 4, "name": "host1", "value": "host1", "id": 254219264, "updated_at": "2012-12-18T15:24:43Z", "reference_id": 980190962, "created_at": "2012-12-18T15:24:43Z" } } ], "name": "my5name.mydomain.net", "installed_at": null, "sp_ip": "", "image_file": "", "sp_name": "", "last_report": null, "enabled": true, "ip": "2.3.4.1", "id": 980190962, "puppet_ca_proxy_id": null, "certname": "my5name.mydomain.net", "medium_id": null, "sp_mac": "", "model_id": null, "comment": null, "uuid": null, "mac": "aabbCCddeeee", "use_image": null, "updated_at": "2012-12-18T15:24:43Z", "operatingsystem_id": 1073012828, "owner_id": null, "environment_id": 334344675, "build": false, "subnet_id": 980190962, "domain_id": 22495316, "environment": { "environment": { "name": "production", "id": 334344675 } }, "sp_subnet_id": null, "hostgroup_id": null, "puppet_proxy_id": 182953976, "owner_type": null, "ptable_id": 980190962, "created_at": "2012-12-18T15:24:43Z", "disk": null, "managed": true, "architecture_id": 501905019, "image_id": null, "compute_resource_id": 980190962 } }
POST /api/hosts { "host": { "name": "testhost11", "ip": "10.0.0.20", "mac": "52:53:00:1e:85:93", "operatingsystem_id": 1073012828, "environment_id": 334344675, "domain_id": 22495316, "puppet_proxy_id": 7, "architecture_id": 501905019 } } 200 { "host": { "name": "testhost11.mydomain.net", "host_parameters": [], "installed_at": null, "sp_ip": "", "sp_name": "", "image_file": "", "last_report": null, "enabled": true, "id": 1073012829, "ip": "10.0.0.20", "puppet_ca_proxy_id": null, "certname": "fcfce82c-33d1-4565-843a-4f58ff8e371a", "medium_id": null, "sp_mac": "", "model_id": null, "comment": null, "uuid": null, "mac": "52:53:00:1e:85:93", "updated_at": "2012-12-18T15:24:48Z", "use_image": null, "operatingsystem_id": 1073012828, "owner_id": 886836129, "environment_id": 334344675, "build": false, "subnet_id": null, "environment": { "environment": { "name": "production", "id": 334344675 } }, "domain_id": 22495316, "sp_subnet_id": null, "hostgroup_id": null, "puppet_proxy_id": 7, "owner_type": "User", "ptable_id": null, "created_at": "2012-12-18T15:24:48Z", "disk": null, "managed": true, "architecture_id": 501905019, "compute_resource_id": null, "image_id": null } }
not required if using a subnet with dhcp proxy
not required if its a virtual machine
PUT /api/hosts/temp.yourdomain.net { "host": {} } 200 { "host": { "sp_name": "", "sp_ip": "", "serial": null, "name": "temp.yourdomain.net", "installed_at": null, "image_file": "", "last_report": null, "enabled": true, "sp_mac": "", "puppet_ca_proxy_id": null, "medium_id": 980190962, "ip": "2.3.4.5", "id": 298486374, "certname": "temp.yourdomain.net", "uuid": null, "use_image": null, "updated_at": "2012-12-18T15:24:48Z", "root_pass": "xybxa6JUkz63w", "model_id": null, "mac": "aa:bb:cc:dd:ee:ff", "last_compile": null, "comment": null, "owner_id": 886836129, "operatingsystem_id": 309172073, "location_id": null, "organization_id": null, "environment_id": 334344675, "build": false, "subnet_id": 980190962, "sp_subnet_id": null, "hostgroup_id": null, "environment": { "environment": { "name": "production", "id": 334344675 } }, "domain_id": 589326610, "source_file_id": null, "puppet_proxy_id": 182953976, "ptable_id": 980190962, "owner_type": "User", "puppet_status": 0, "disk": null, "created_at": "2012-12-18T15:24:43Z", "managed": null, "last_freshcheck": null, "image_id": null, "compute_resource_id": 980190962, "architecture_id": 501905019 } }
not required if using a subnet with dhcp proxy
not required if its a virtual machine
DELETE /api/hosts/my5name.mydomain.net 200 { "host": { "sp_name": "", "sp_ip": "", "serial": null, "name": "my5name.mydomain.net", "installed_at": null, "image_file": "", "last_report": null, "enabled": true, "sp_mac": "", "puppet_ca_proxy_id": null, "medium_id": null, "ip": "2.3.4.1", "id": 980190962, "certname": "my5name.mydomain.net", "uuid": null, "use_image": null, "updated_at": "2012-12-18T15:24:43Z", "root_pass": "xybxa6JUkz63w", "model_id": null, "mac": "aabbCCddeeee", "last_compile": null, "comment": null, "owner_id": null, "operatingsystem_id": 1073012828, "location_id": null, "organization_id": null, "environment_id": 334344675, "build": false, "subnet_id": 980190962, "sp_subnet_id": null, "hostgroup_id": null, "environment": { "environment": { "name": "production", "id": 334344675 } }, "domain_id": 22495316, "source_file_id": null, "puppet_proxy_id": 182953976, "ptable_id": 980190962, "owner_type": null, "puppet_status": 0, "disk": null, "created_at": "2012-12-18T15:24:43Z", "managed": true, "last_freshcheck": null, "image_id": null, "compute_resource_id": 980190962, "architecture_id": 501905019 } }
Return value may either be one of the following:
GET /api/hosts/my5name.mydomain.net/status 200 { "status": "missing" }
power action, valid actions are (‘on’, ‘start’)’, (‘off’, ‘stop’), (‘soft’, ‘reboot’), (‘cycle’, ‘reset’), (‘state’, ‘status’)
boot device, valid devices are disk, cdrom, pxe, bios
hostname of the host
hash containing the facts for the host
optional: certname of the host
optional: the STI type of host to create
GET /api/compute_resources/980190962/images 200 [ { "image": { "name": "centos-2", "id": 298486374, "uuid": "MyString2", "updated_at": "2012-12-18T15:24:42Z", "operatingsystem_id": 309172073, "username": "MyString", "created_at": "2012-12-18T15:24:42Z", "architecture_id": 501905019, "compute_resource_id": 980190962 } }, { "image": { "name": "centos-1", "id": 980190962, "uuid": "string-of-uuid", "updated_at": "2012-12-18T15:24:42Z", "operatingsystem_id": 309172073, "username": "root", "created_at": "2012-12-18T15:24:42Z", "architecture_id": 501905019, "compute_resource_id": 980190962 } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/compute_resources/980190962/images/980190962 200 { "image": { "name": "centos-1", "id": 980190962, "uuid": "string-of-uuid", "updated_at": "2012-12-18T15:24:42Z", "operatingsystem_id": 309172073, "username": "root", "created_at": "2012-12-18T15:24:42Z", "architecture_id": 501905019, "compute_resource_id": 980190962 } }
POST /api/compute_resources/980190962/images { "image": { "name": "TestImage", "uuid": "abcdef", "username": "ec2-user", "operatingsystem_id": 309172073, "compute_resource_id": 367690737, "architecture_id": 381564594 } } 201 { "compute_resource": { "url": "qemu://stam/system", "name": "MyString", "user": "MyString", "id": 980190962, "uuid": "MyString", "updated_at": "2012-12-18T15:24:42Z", "description": "MyString", "attrs": null, "created_at": "2012-12-18T15:24:42Z" } }
PUT /api/compute_resources/980190962/images/980190962 { "image": {} } 200 { "image": { "name": "centos-1", "id": 980190962, "uuid": "string-of-uuid", "updated_at": "2012-12-18T15:24:42Z", "username": "root", "operatingsystem_id": 309172073, "created_at": "2012-12-18T15:24:42Z", "compute_resource_id": 980190962, "architecture_id": 501905019 } }
DELETE /api/compute_resources/980190962/images/980190962 200 { "image": { "name": "centos-1", "id": 980190962, "uuid": "string-of-uuid", "updated_at": "2012-12-18T15:24:42Z", "username": "root", "operatingsystem_id": 309172073, "created_at": "2012-12-18T15:24:42Z", "compute_resource_id": 980190962, "architecture_id": 501905019 } }
id or name of host
id or name of nested host
id or name of interface
id or name of host
interface information
MAC address of interface
IP address of interface
Interface type, i.e: Nic::BMC
Interface name
Foreman subnet id of interface
Foreman domain id of interface
Interface provider, i.e: IPMI
id or name of host
interface information
MAC address of interface
IP address of interface
Interface type, i.e: Nic::BMC
Interface name
Foreman subnet id of interface
Foreman domain id of interface
Interface provider, i.e: IPMI
id of interface
filter results
sort results
paginate results
number of entries per request
GET /api/lookup_keys 200 [ { "lookup_key": { "id": 980190962, "required": false, "description": null, "key": "port", "is_param": true, "override": false, "default_value": "80" } }, { "lookup_key": { "id": 113629430, "required": false, "description": null, "key": "ssl", "is_param": true, "override": true, "default_value": "t" } }, { "lookup_key": { "id": 298486374, "required": false, "description": null, "key": "ssl_port", "is_param": false, "override": false, "default_value": "443" } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/lookup_keys/980190962-port 200 { "lookup_key": { "id": 980190962, "required": false, "description": null, "key": "port", "is_param": true, "override": false, "default_value": "80" } }
POST /api/lookup_keys { "lookup_key": { "is_param": true, "key": "testkey" } } 201 { "lookup_key": { "required": false, "id": 980190963, "description": null, "key": "testkey", "is_param": true, "override": false, "default_value": null } }
PUT /api/lookup_keys/980190962-port { "lookup_key": { "default_value": 8080 } } 200 { "lookup_key": { "required": false, "id": 980190962, "description": null, "key": "port", "is_param": true, "override": false, "default_value": 8080 } }
DELETE /api/lookup_keys/980190962-port 200 { "lookup_key": { "required": false, "id": 980190962, "description": null, "key": "port", "is_param": true, "override": false, "default_value": "80" } }
GET /api/media 200 [ { "medium": { "name": "CentOS 5.4", "id": 980190962, "path": "http://mirror.averse.net/centos/6.0/os/$arch" } }, { "medium": { "name": "OpenSuse Mirror", "id": 859751735, "path": "http://mirror.isoc.org.il/pub/opensuse/distribution/$major.$minor/repo/oss" } }, { "medium": { "name": "Solaris 10", "id": 442321401, "path": "http://brsla01/vol/solgi_5.10/sol$minor_$release_$arch" } }, { "medium": { "name": "Ubuntu Mirror", "id": 1011586618, "path": "http://sg.archive.ubuntu.com" } }, { "medium": { "name": "unused", "id": 338446587, "path": "http://nothing.intersting.com" } } ]
filter results
for example, name ASC, or name DESC
paginate results
number of entries per request
GET /api/media/980190962 200 { "medium": { "name": "CentOS 5.4", "id": 980190962, "path": "http://mirror.averse.net/centos/6.0/os/$arch" } }
POST /api/media { "medium": { "name": "new medium", "path": "http://www.newmedium.com/" } } 201 { "medium": { "name": "new medium", "id": 1011586619 } }
Name of media
The path to the medium, can be a URL or a valid NFS server (exclusive of the architecture).
for example http://mirror.centos.org/centos/$version/os/$arch where $arch will be substituted for the host’s actual OS architecture and $version, $major and $minor will be substituted for the version of the operating system.
Solaris and Debian media may also use $release.
The family that the operating system belongs to.
Available families:
PUT /api/media/980190962 { "name": "CentOS 5.4" } 200 { "medium": { "name": "CentOS 5.4", "id": 980190962 } }
Name of media
The path to the medium, can be a URL or a valid NFS server (exclusive of the architecture).
for example http://mirror.centos.org/centos/$version/os/$arch where $arch will be substituted for the host’s actual OS architecture and $version, $major and $minor will be substituted for the version of the operating system.
Solaris and Debian media may also use $release.
The family that the operating system belongs to.
Available families:
DELETE /api/media/338446587 200 { "medium": { "name": "unused", "id": 338446587 } }
GET /api/models 200 [ { "model": { "name": "KVM", "id": 980190962, "vendor_class": null, "updated_at": "2012-12-18T15:24:43Z", "info": "Virtual Machine", "created_at": "2012-12-18T15:24:43Z", "hardware_model": null } }, { "model": { "name": "SUN V210", "id": 139037058, "vendor_class": "Sun-Fire-V210", "updated_at": "2012-12-18T15:24:43Z", "info": null, "created_at": "2012-12-18T15:24:43Z", "hardware_model": "SUN4U" } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/models/980190962 200 { "model": { "name": "KVM", "id": 980190962, "vendor_class": null, "updated_at": "2012-12-18T15:24:43Z", "info": "Virtual Machine", "created_at": "2012-12-18T15:24:43Z", "hardware_model": null } }
POST /api/models { "model": { "name": "new model" } } 201 { "model": { "name": "new model", "vendor_class": null, "id": 980190963, "updated_at": "2012-12-18T15:24:49Z", "info": null, "created_at": "2012-12-18T15:24:49Z", "hardware_model": null } }
PUT /api/models/980190962 { "name": "KVM" } 200 { "model": { "name": "KVM", "vendor_class": null, "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "info": "Virtual Machine", "created_at": "2012-12-18T15:24:43Z", "hardware_model": null } }
DELETE /api/models/980190962 200 { "model": { "name": "KVM", "vendor_class": null, "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "info": "Virtual Machine", "created_at": "2012-12-18T15:24:43Z", "hardware_model": null } }
filter results
for example, name ASC, or name DESC
paginate results
number of entries per request
GET /api/operatingsystems/1073012828 200 { "operatingsystem": { "name": "Redhat", "minor": "1", "id": 1073012828, "family": "Redhat", "ptables": [ { "ptable": { "name": "default", "id": 980190962 } } ], "os_default_templates": [], "architectures": [ { "architecture": { "name": "x86_64", "id": 501905019 } } ], "config_templates": [ { "config_template": { "name": "centos5_3_pxelinux", "id": 1007981701 } }, { "config_template": { "name": "MyFinish", "id": 104314179 } }, { "config_template": { "name": "MyScript", "id": 981457253 } }, { "config_template": { "name": "MyString", "id": 943779058 } }, { "config_template": { "name": "MyString2", "id": 269958254 } }, { "config_template": { "name": "PXE Default File", "id": 352050261 } }, { "config_template": { "name": "PXE Localboot Default", "id": 821548108 } } ], "release_name": null, "major": "6", "media": [ { "medium": { "name": "CentOS 5.4", "id": 980190962 } } ] } }
POST /api/operatingsystems { "operatingsystem": { "minor": "2", "name": "awsome_os", "major": "1" } } 200 { "operatingsystem": { "name": "awsome_os", "minor": "2", "id": 1073012829, "family": null, "ptables": [], "os_default_templates": [], "release_name": null, "config_templates": [], "architectures": [], "major": "1", "media": [] } }
PUT /api/operatingsystems/1073012828 { "operatingsystem": { "name": "new_name" } } 200 { "operatingsystem": { "name": "new_name", "minor": "1", "id": 1073012828, "family": "Redhat", "ptables": [ { "ptable": { "name": "default", "id": 980190962 } } ], "os_default_templates": [], "config_templates": [ { "config_template": { "name": "centos5_3_pxelinux", "id": 1007981701 } }, { "config_template": { "name": "MyFinish", "id": 104314179 } }, { "config_template": { "name": "MyScript", "id": 981457253 } }, { "config_template": { "name": "MyString", "id": 943779058 } }, { "config_template": { "name": "MyString2", "id": 269958254 } }, { "config_template": { "name": "PXE Default File", "id": 352050261 } }, { "config_template": { "name": "PXE Localboot Default", "id": 821548108 } } ], "architectures": [ { "architecture": { "name": "x86_64", "id": 501905019 } } ], "release_name": null, "media": [ { "medium": { "name": "CentOS 5.4", "id": 980190962 } } ], "major": "6" } }
DELETE /api/operatingsystems/775246587 200 { "operatingsystem": { "name": "NoHosts 1.1", "id": 775246587, "ptables": [], "architectures": [], "config_templates": [], "media": [] } }
filter results
sort results
paginate results
number of entries per request
paginate results
number of entries per request
These API calls are related to nested parameters for host, domain, hostgroup, operating system. If you are looking for global parameters, go to this link.
id of host
id of hostgroup
id of domain
id of operating system
paginate results
number of entries per request
id of host
id of hostgroup
id of domain
id of operating system
id of parameter
id of host
id of hostgroup
id of domain
id of operating system
id of host
id of hostgroup
id of domain
id of operating system
id of parameter
id of host
id of hostgroup
id of domain
id of operating system
id of parameter
GET /api/ptables 200 [ { "ptable": { "name": "default", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }, { "ptable": { "name": "four", "id": 281110143, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }, { "ptable": { "name": "suse default", "id": 859751735, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }, { "ptable": { "name": "ubuntu default", "id": 1011586618, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/ptables/980190962 200 { "ptable": { "name": "default", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }
POST /api/ptables { "ptable": { "name": "ptable_test", "layout": "d-i partman-auto/disk" } } 201 { "ptable": { "name": "ptable_test", "id": 1011586619 } }
PUT /api/ptables/980190962 { "ptable": {} } 200 { "ptable": { "name": "default", "id": 980190962 } }
DELETE /api/ptables/980190962 422 { "ptable": { "id": 980190962, "errors": { "base": [ "default is used by temp01.yourdomain.net", "default is used by temp.yourdomain.net", "default is used by my5name.mydomain.net", "default is used by dhcp.mydomain.net", "default is used by sdhcp.mydomain.net" ] }, "full_messages": [ "default is used by temp01.yourdomain.net", "default is used by temp.yourdomain.net", "default is used by my5name.mydomain.net", "default is used by dhcp.mydomain.net", "default is used by sdhcp.mydomain.net" ] } }
GET /api/puppetclasses 200 { "base": [ { "puppetclass": { "name": "base", "id": 980190962, "lookup_keys": [ { "id": 298486374 } ] } } ], "apache": [ { "puppetclass": { "name": "apache", "id": 298486374, "lookup_keys": [] } } ] }
id of nested host
id of nested hostgroup
id of nested environment
Filter results
Sort results
paginate results
number of entries per request
GET /api/puppetclasses/base 200 { "puppetclass": { "name": "base", "id": 980190962, "lookup_keys": [ { "lookup_key": { "required": false, "id": 298486374, "description": null, "key": "ssl_port", "is_param": false, "override": false, "default_value": "443" } } ] } }
id of nested host
id of nested hostgroup
id of nested environment
id of puppetclass
POST /api/puppetclasses { "puppetclass": { "name": "test_puppetclass" } } 201 { "puppetclass": { "name": "test_puppetclass", "id": 980190963, "lookup_keys": [] } }
PUT /api/puppetclasses/base { "puppetclass": {} } 200 { "puppetclass": { "name": "base", "id": 980190962, "lookup_keys": [ { "id": 298486374 } ] } }
DELETE /api/puppetclasses/base 200 { "puppetclass": { "name": "base", "id": 980190962, "lookup_keys": [ { "id": 298486374 } ] } }
GET /api/reports 200 [ { "report": { "summary": "Success", "status": { "skipped": 0, "failed_restarts": 0, "failed": 0, "pending": 0, "restarted": 0, "applied": 0 }, "id": 70219655, "reported_at": "2012-12-11T15:24:42Z", "metrics": { "events": { "total": 0 }, "time": { "package": 0.003989, "schedule": 0.00083, "cron": 0.000419, "exec": 0.000299, "service": 0.149739, "config_retrieval": 16.3637869358063, "file": 0.007025, "filebucket": 0.000171, "mailalias": 0.000283 }, "resources": { "total": 33 }, "changes": {} }, "logs": [] } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/reports/70219655 200 { "report": { "summary": "Success", "status": { "skipped": 0, "failed_restarts": 0, "failed": 0, "pending": 0, "restarted": 0, "applied": 0 }, "id": 70219655, "reported_at": "2012-12-11T15:24:42Z", "metrics": { "events": { "total": 0 }, "time": { "package": 0.003989, "schedule": 0.00083, "cron": 0.000419, "exec": 0.000299, "service": 0.149739, "config_retrieval": 16.3637869358063, "file": 0.007025, "filebucket": 0.000171, "mailalias": 0.000283 }, "resources": { "total": 33 }, "changes": {} }, "logs": [] } }
DELETE /api/reports/70219655 200 { "report": { "summary": "Success", "status": { "skipped": 0, "failed_restarts": 0, "failed": 0, "pending": 0, "restarted": 0, "applied": 0 }, "id": 70219655, "host": "my5name.mydomain.net", "reported_at": "2012-12-11T15:24:42Z", "logs": [], "metrics": { "events": { "total": 0 }, "time": { "package": 0.003989, "schedule": 0.00083, "cron": 0.000419, "service": 0.149739, "exec": 0.000299, "config_retrieval": 16.3637869358063, "file": 0.007025, "mailalias": 0.000283, "filebucket": 0.000171 }, "changes": {}, "resources": { "total": 33 } } } }
GET /api/reports/last 200 { "report": { "summary": "Success", "status": { "skipped": 0, "failed_restarts": 0, "failed": 0, "pending": 0, "restarted": 0, "applied": 0 }, "id": 70219655, "reported_at": "2012-12-11T15:24:42Z", "metrics": { "events": { "total": 0 }, "time": { "package": 0.003989, "schedule": 0.00083, "cron": 0.000419, "exec": 0.000299, "service": 0.149739, "config_retrieval": 16.3637869358063, "file": 0.007025, "filebucket": 0.000171, "mailalias": 0.000283 }, "resources": { "total": 33 }, "changes": {} }, "logs": [] } }
Hostname or certname
UTC time of report
Hash of status type totals
Hash of report metrics, can be just {}
Optional array of log hashes
paginate results
number of entries per request
GET /api/roles/1 200 { "role": { "name": "Manager", "id": 1, "builtin": 0, "permissions": [ "view_architectures", "create_architectures", "edit_architectures", "destroy_architectures", "view_authenticators", "create_authenticators", "edit_authenticators", "destroy_authenticators", "view_environments", "create_environments", "edit_environments", "destroy_environments", "import_environments", "view_external_variables", "create_external_variables", "edit_external_variables", "destroy_external_variables", "view_domains", "create_domain", "edit_domains", "destroy_domains", "view_globals", "create_globals", "edit_globals", "destroy_globals", "view_hostgroups", "create_hostgroups", "edit_hostgroups", "destroy_hostgroups", "view_hosts", "create_hosts", "edit_hosts", "destroy_hosts", "view_media", "create_media", "edit_media", "destroy_media", "view_models", "create_models", "edit_models", "destroy_models", "view_operatingsystems", "create_operatingsystems", "edit_operatingsystems", "destroy_operatingsystems", "view_ptables", "create_ptables", "edit_ptables", "destroy_ptables", "view_puppetclasses", "create_puppetclasses", "edit_puppetclasses", "destroy_puppetclasses", "import_puppetclasses", "view_usergroups", "create_usergroups", "edit_usergroups", "destroy_usergroups", "view_users", "create_users", "edit_users", "destroy_users", "access_settings", "access_dashboard", "view_reports", "destroy_reports", "view_facts", "view_audit_logs", "view_statistics", "view_locations", "edit_locations", "create_locations", "destroy_locations", "view_organizations", "edit_organizations", "create_organizations", "destroy_organizations" ] } }
POST /api/roles { "role": { "name": "staff" } } 200 { "role": { "name": "staff", "id": 11, "builtin": 0, "permissions": [] } }
PUT /api/roles/1 { "role": {} } 200 { "role": { "name": "Manager", "id": 1, "builtin": 0, "permissions": [ "view_architectures", "create_architectures", "edit_architectures", "destroy_architectures", "view_authenticators", "create_authenticators", "edit_authenticators", "destroy_authenticators", "view_environments", "create_environments", "edit_environments", "destroy_environments", "import_environments", "view_external_variables", "create_external_variables", "edit_external_variables", "destroy_external_variables", "view_domains", "create_domain", "edit_domains", "destroy_domains", "view_globals", "create_globals", "edit_globals", "destroy_globals", "view_hostgroups", "create_hostgroups", "edit_hostgroups", "destroy_hostgroups", "view_hosts", "create_hosts", "edit_hosts", "destroy_hosts", "view_media", "create_media", "edit_media", "destroy_media", "view_models", "create_models", "edit_models", "destroy_models", "view_operatingsystems", "create_operatingsystems", "edit_operatingsystems", "destroy_operatingsystems", "view_ptables", "create_ptables", "edit_ptables", "destroy_ptables", "view_puppetclasses", "create_puppetclasses", "edit_puppetclasses", "destroy_puppetclasses", "import_puppetclasses", "view_usergroups", "create_usergroups", "edit_usergroups", "destroy_usergroups", "view_users", "create_users", "edit_users", "destroy_users", "access_settings", "access_dashboard", "view_reports", "destroy_reports", "view_facts", "view_audit_logs", "view_statistics", "view_locations", "edit_locations", "create_locations", "destroy_locations", "view_organizations", "edit_organizations", "create_organizations", "destroy_organizations" ] } }
DELETE /api/roles/1 200 { "role": { "name": "Manager", "id": 1, "builtin": 0, "permissions": [ "view_architectures", "create_architectures", "edit_architectures", "destroy_architectures", "view_authenticators", "create_authenticators", "edit_authenticators", "destroy_authenticators", "view_environments", "create_environments", "edit_environments", "destroy_environments", "import_environments", "view_external_variables", "create_external_variables", "edit_external_variables", "destroy_external_variables", "view_domains", "create_domain", "edit_domains", "destroy_domains", "view_globals", "create_globals", "edit_globals", "destroy_globals", "view_hostgroups", "create_hostgroups", "edit_hostgroups", "destroy_hostgroups", "view_hosts", "create_hosts", "edit_hosts", "destroy_hosts", "view_media", "create_media", "edit_media", "destroy_media", "view_models", "create_models", "edit_models", "destroy_models", "view_operatingsystems", "create_operatingsystems", "edit_operatingsystems", "destroy_operatingsystems", "view_ptables", "create_ptables", "edit_ptables", "destroy_ptables", "view_puppetclasses", "create_puppetclasses", "edit_puppetclasses", "destroy_puppetclasses", "import_puppetclasses", "view_usergroups", "create_usergroups", "edit_usergroups", "destroy_usergroups", "view_users", "create_users", "edit_users", "destroy_users", "access_settings", "access_dashboard", "view_reports", "destroy_reports", "view_facts", "view_audit_logs", "view_statistics", "view_locations", "edit_locations", "create_locations", "destroy_locations", "view_organizations", "edit_organizations", "create_organizations", "destroy_organizations" ] } }
Filter results
Sort results
paginate results
number of entries per request
GET /api/settings/333972760 200 { "setting": { "name": "administrator", "value": "root@some.host.fqdn", "id": 333972760, "description": "The Default administrator email address", "updated_at": "2012-12-18T15:24:43Z", "category": "General", "settings_type": null, "default": "root@some.host.fqdn", "created_at": "2012-12-18T15:24:43Z" } }
PUT /api/settings/333972760 { "setting": {} } 200 { "setting": { "name": "administrator", "value": "root@some.host.fqdn", "id": 333972760, "updated_at": "2012-12-18T15:24:43Z", "description": "The Default administrator email address", "settings_type": null, "category": "General", "default": "root@some.host.fqdn", "created_at": "2012-12-18T15:24:43Z" } }
Filter results
sort results
paginate results
number of entries per request
GET /api/smart_proxies?type=unknown_type 500 { "error": { "message": "Invalid feature type. Select one of: TFTP, BMC, DNS, DHCP, Puppetca, Puppet." } }
filter by type
paginate results
number of entries per request
GET /api/smart_proxies/980190962-dhcp-proxy 200 { "smart_proxy": { "name": "DHCP Proxy", "features": [], "url": "https://somewhere.net:8443", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }
POST /api/smart_proxies { "smart_proxy": { "url": "http://server:8443", "name": "master02" } } 201 { "smart_proxy": { "url": "http://server:8443", "name": "master02", "id": 980190963, "updated_at": "2012-12-18T15:24:52Z", "created_at": "2012-12-18T15:24:52Z" } }
PUT /api/smart_proxies/980190962-dhcp-proxy { "smart_proxy": {} } 200 { "smart_proxy": { "url": "https://somewhere.net:8443", "name": "DHCP Proxy", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }
DELETE /api/smart_proxies/281110143-unused-proxy 200 { "smart_proxy": { "url": "http://else.where:4567", "name": "Unused Proxy", "id": 281110143, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }
Filter results
sort results
paginate results
number of entries per request
GET /api/subnets 200 [ { "subnet": { "priority": null, "name": "one", "network": "2.3.4.0", "dns_secondary": null, "domain_ids": [ 822172901 ], "tftp_id": 298486374, "id": 980190962, "dhcp_id": 980190962, "dns_id": 113629430, "dns_primary": null, "vlanid": "41", "mask": "255.255.255.0", "from": null, "gateway": null, "to": null } }, { "subnet": { "priority": null, "name": "two", "network": "3.3.4.0", "dns_secondary": null, "domain_ids": [ 534821992 ], "tftp_id": 298486374, "id": 298486374, "dhcp_id": 980190962, "dns_id": null, "dns_primary": null, "vlanid": "42", "mask": "255.255.255.0", "from": null, "gateway": null, "to": null } }, { "subnet": { "priority": null, "name": "three", "network": "3.3.4.3", "dns_secondary": null, "domain_ids": [], "tftp_id": 298486374, "id": 113629430, "dhcp_id": 980190962, "dns_id": null, "dns_primary": null, "vlanid": "43", "mask": "255.255.255.0", "from": null, "gateway": null, "to": null } } ]
Filter results
Sort results
paginate results
number of entries per request
GET /api/subnets/980190962 200 { "subnet": { "priority": null, "name": "one", "network": "2.3.4.0", "dns": { "url": "http://else.where:4567", "name": "DNS Proxy", "id": 113629430 }, "dns_secondary": null, "domain_ids": [ 822172901 ], "tftp_id": 298486374, "id": 980190962, "dhcp_id": 980190962, "dns_id": 113629430, "dhcp": { "url": "https://somewhere.net:8443", "name": "DHCP Proxy", "id": 980190962 }, "dns_primary": null, "vlanid": "41", "mask": "255.255.255.0", "tftp": { "url": "http://somewhere.else", "name": "TFTP Proxy", "id": 298486374 }, "from": null, "gateway": null, "to": null } }
POST /api/subnets { "subnet": { "name": "QA2", "network": "10.35.2.27", "mask": "255.255.255.0" } } 200 { "subnet": { "priority": null, "name": "QA2", "dns": null, "network": "10.35.2.27", "dns_secondary": null, "domain_ids": [], "id": 980190963, "tftp_id": null, "dhcp_id": null, "dns_id": null, "dhcp": null, "dns_primary": null, "vlanid": null, "mask": "255.255.255.0", "tftp": null, "gateway": null, "from": null, "to": null } }
Subnet name
Subnet network
Netmask for this subnet
Primary DNS for this subnet
Primary DNS for this subnet
Secondary DNS for this subnet
Starting IP Address for IP auto suggestion
Ending IP Address for IP auto suggestion
VLAN ID for this subnet
Domains in which this subnet is part
DHCP Proxy to use within this subnet
TFTP Proxy to use within this subnet
DNS Proxy to use within this subnet
PUT /api/subnets/980190962 { "subnet": {} } 200 { "subnet": { "priority": null, "name": "one", "dns": { "url": "http://else.where:4567", "name": "DNS Proxy", "id": 113629430 }, "network": "2.3.4.0", "dns_secondary": null, "domain_ids": [ 822172901 ], "id": 980190962, "tftp_id": 298486374, "dhcp_id": 980190962, "dns_id": 113629430, "dhcp": { "url": "https://somewhere.net:8443", "name": "DHCP Proxy", "id": 980190962 }, "dns_primary": null, "vlanid": "41", "mask": "255.255.255.0", "tftp": { "url": "http://somewhere.else", "name": "TFTP Proxy", "id": 298486374 }, "gateway": null, "from": null, "to": null } }
Subnet numeric identifier
Subnet name
Subnet network
Netmask for this subnet
Primary DNS for this subnet
Primary DNS for this subnet
Secondary DNS for this subnet
Starting IP Address for IP auto suggestion
Ending IP Address for IP auto suggestion
VLAN ID for this subnet
Domains in which this subnet is part
DHCP Proxy to use within this subnet
TFTP Proxy to use within this subnet
DNS Proxy to use within this subnet
DELETE /api/subnets/980190962 422 { "subnet": { "id": 980190962, "errors": { "base": [ "2.3.4.0/24 is used by temp-01.yourdomain.net", "2.3.4.0/24 is used by suse01.yourdomain.net", "2.3.4.0/24 is used by temp01.yourdomain.net", "2.3.4.0/24 is used by anotherfullhost", "2.3.4.0/24 is used by temp.yourdomain.net", "2.3.4.0/24 is used by my5name.mydomain.net", "2.3.4.0/24 is used by dhcp.mydomain.net", "2.3.4.0/24 is used by otherfullhost", "2.3.4.0/24 is used by sdhcp.mydomain.net", "2.3.4.0/24 is used by sol10host", "2.3.4.0/24 is used by sdhcp.mydomain.net" ] }, "full_messages": [ "2.3.4.0/24 is used by temp-01.yourdomain.net", "2.3.4.0/24 is used by suse01.yourdomain.net", "2.3.4.0/24 is used by temp01.yourdomain.net", "2.3.4.0/24 is used by anotherfullhost", "2.3.4.0/24 is used by temp.yourdomain.net", "2.3.4.0/24 is used by my5name.mydomain.net", "2.3.4.0/24 is used by dhcp.mydomain.net", "2.3.4.0/24 is used by otherfullhost", "2.3.4.0/24 is used by sdhcp.mydomain.net", "2.3.4.0/24 is used by sol10host", "2.3.4.0/24 is used by sdhcp.mydomain.net" ] } }
Subnet numeric identifier
environment id
hostgroup id
GET /api/template_kinds 200 [ { "template_kind": { "name": "PXELinux", "id": 452984334 } }, { "template_kind": { "name": "script", "id": 478250810 } }, { "template_kind": { "name": "gPXE", "id": 158998239 } }, { "template_kind": { "name": "finish", "id": 550103832 } }, { "template_kind": { "name": "provision", "id": 983253650 } } ]
paginate results
number of entries per request
GET /api/usergroups 200 [ { "usergroup": { "name": "MyString", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }, { "usergroup": { "name": "MyString2", "id": 298486374, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } } ]
paginate results
number of entries per request
filter results
sort results
GET /api/usergroups/980190962 200 { "usergroup": { "name": "MyString", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "created_at": "2012-12-18T15:24:43Z" } }
POST /api/usergroups { "usergroup": { "name": "test_usergroup" } } 201 { "usergroup": { "name": "test_usergroup", "id": 980190963 } }
PUT /api/usergroups/980190962 { "usergroup": {} } 200 { "usergroup": { "name": "MyString", "id": 980190962 } }
DELETE /api/usergroups/980190962 200 { "usergroup": { "name": "MyString", "id": 980190962 } }
GET /api/users 200 [ { "user": { "domains_andor": "or", "filter_on_owner": null, "role_id": null, "mail": "admin@someware.com", "id": 135138680, "hostgroups_andor": "or", "updated_at": "2012-12-18T15:24:42Z", "compute_resources_andor": "or", "admin": true, "last_login_on": "2009-10-12T21:50:04Z", "lastname": "User", "created_at": "2012-12-18T15:24:42Z", "login": "admin", "firstname": "Admin", "facts_andor": "or", "auth_source_id": 980190962 } }, { "user": { "domains_andor": "or", "filter_on_owner": null, "role_id": null, "mail": "apiadmin@someware.com", "id": 886836129, "hostgroups_andor": "or", "updated_at": "2012-12-18T15:24:42Z", "compute_resources_andor": "or", "admin": true, "last_login_on": "2009-10-12T21:50:04Z", "lastname": "User", "created_at": "2012-12-18T15:24:42Z", "login": "apiadmin", "firstname": "apiadmin", "facts_andor": "or", "auth_source_id": 200482051 } }, { "user": { "domains_andor": "or", "filter_on_owner": null, "role_id": null, "mail": "userone@someware.com", "id": 980190962, "hostgroups_andor": "or", "updated_at": "2012-12-18T15:24:42Z", "compute_resources_andor": "or", "admin": false, "last_login_on": "2009-10-12T21:50:04Z", "lastname": "User", "created_at": "2012-12-18T15:24:42Z", "login": "one", "firstname": "One", "facts_andor": "or", "auth_source_id": 980190962 } }, { "user": { "domains_andor": "or", "filter_on_owner": null, "role_id": null, "mail": "testuser@someware.com", "id": 200482051, "hostgroups_andor": "or", "updated_at": "2012-12-18T15:24:42Z", "compute_resources_andor": "or", "admin": false, "last_login_on": "2009-10-12T21:50:04Z", "lastname": "User", "created_at": "2012-12-18T15:24:42Z", "login": "test", "firstname": "test", "facts_andor": "or", "auth_source_id": 200482051 } }, { "user": { "domains_andor": "or", "filter_on_owner": null, "role_id": null, "mail": "usertwo@someware.com", "id": 298486374, "hostgroups_andor": "or", "updated_at": "2012-12-18T15:24:42Z", "compute_resources_andor": "or", "admin": false, "last_login_on": "2009-10-12T21:50:04Z", "lastname": "User", "created_at": "2012-12-18T15:24:42Z", "login": "two", "firstname": "Two", "facts_andor": "or", "auth_source_id": 980190962 } } ]
filter results
sort results
paginate results
number of entries per request
GET /api/users/980190962-one 200 { "user": { "domains_andor": "or", "filter_on_owner": null, "roles": [ { "role": { "name": "Viewer", "id": 5, "builtin": 0, "permissions": [ "view_architectures", "view_audit_logs", "view_authenticators", "access_dashboard", "view_domains", "view_environments", "view_external_variables", "view_facts", "view_globals", "view_hostgroups", "view_hosts", "view_locations", "view_media", "view_models", "view_operatingsystems", "view_ptables", "view_puppetclasses", "view_reports", "access_settings", "view_statistics", "view_organizations", "view_usergroups", "view_users" ] } }, { "role": { "name": "Anonymous", "id": 7, "builtin": 2, "permissions": [ "view_hosts" ] } } ], "role_id": null, "auth_source_ldap": { "name": "ldap", "tls": true, "attr_login": "uid", "attr_firstname": "givenName", "port": 123, "attr_lastname": "sn", "id": 980190962, "updated_at": "2012-12-18T15:24:43Z", "attr_mail": "mail", "base_dn": "dn=x,dn=y", "host": "ldap", "account": null, "type": "AuthSourceLdap", "onthefly_register": true, "created_at": "2012-12-18T15:24:43Z" }, "mail": "userone@someware.com", "id": 980190962, "hostgroups_andor": "or", "updated_at": "2012-12-18T15:24:42Z", "compute_resources_andor": "or", "admin": false, "last_login_on": "2009-10-12T21:50:04Z", "lastname": "User", "created_at": "2012-12-18T15:24:42Z", "login": "one", "firstname": "One", "facts_andor": "or", "auth_source_id": 980190962 } }
Adds role ‘Anonymous’ to the user by default
Is an admin account?
Adds role ‘Anonymous’ to the user if it is not already present. Only admin can set admin account.
PUT /api/users/980190963 { "user": { "password_confirmation": "DUMMY", "password": "dummy", "login": "johnsmith" } } 422 { "user": { "id": 980190963, "errors": { "password": [ "doesn't match confirmation" ] }, "full_messages": [ "Password doesn't match confirmation" ] } }
Is an admin account?
DELETE /api/users/980190962 200 { "user": { "filter_on_owner": null, "domains_andor": "or", "role_id": null, "organizations_andor": "or", "mail": "userone@someware.com", "id": 980190962, "updated_at": "2012-12-18T15:24:42Z", "hostgroups_andor": "or", "compute_resources_andor": "or", "admin": false, "password_hash": null, "last_login_on": "2009-10-12T21:50:04Z", "locations_andor": "or", "lastname": "User", "password_salt": null, "login": "one", "created_at": "2012-12-18T15:24:42Z", "firstname": "One", "facts_andor": "or", "auth_source_id": 980190962 } }