Architectures

Audits

Auth source ldaps

Bookmarks

Common parameters

Compute resources

Config templates

Dashboard

Domains

Environments

Fact values

Home

Host classes

Hostgroup classes

Hostgroups

Hosts

Images

Interfaces

Locations

Lookup keys

Media

Models

Operating systems

Organizations

Override values

Parameters

Ptables

Puppetclasses

Reports

Roles

Settings

Smart class parameters

Smart proxies

Smart variables

Statistics

Subnets

Template combinations

Template kinds

Usergroups

Users


Architectures


Architectures / index

GET /api/architectures
List all architectures.

Examples

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"
    }
  }
]

Params


Architectures / show

GET /api/architectures/:id
Show an architecture.

Examples

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"
  }
}

Params


Architectures / create

POST /api/architectures
Create an architecture.

Examples

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"
  }
}

Params


Architectures / update

PUT /api/architectures/:id
Update an architecture.

Examples

PUT /api/architectures/x86_64
{
  "architecture": {}
}
200
{
  "architecture": {
    "name": "x86_64",
    "id": 501905019
  }
}

Params


Architectures / destroy

DELETE /api/architectures/:id
Delete an architecture.

Examples

DELETE /api/architectures/s390
200
{
  "architecture": {
    "name": "s390",
    "id": 381564594
  }
}

Params


Audits


Audits / index

GET /api/audits
List all audits.

GET /api/hosts/:host_id/audits
List all audits for a given host.

Examples

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"
    }
  }
]

Params


Audits / show

GET /api/audits/:id
Show an audit

Examples

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"
  }
}

Params


Auth source ldaps


Auth source ldaps / index

GET /api/auth_source_ldaps
List all authsource ldaps

Examples

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
    }
  }
]

Params


Auth source ldaps / show

GET /api/auth_source_ldaps/:id
Show an authsource ldap.

Examples

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
  }
}

Params


Auth source ldaps / create

POST /api/auth_source_ldaps
Create an auth_source_ldap.

Examples

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"
  }
}

Params


Auth source ldaps / update

PUT /api/auth_source_ldaps/:id
Update an auth_source_ldap.

Examples

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"
  }
}

Params


Auth source ldaps / destroy

DELETE /api/auth_source_ldaps/:id
Delete an auth_source_ldap.

Examples

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"
  }
}

Params


Bookmarks


Bookmarks / index

GET /api/bookmarks
List all bookmarks.

Examples

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
    }
  }
]

Params


Bookmarks / show

GET /api/bookmarks/:id
Show a bookmark.

Examples

GET /api/bookmarks/foo
200
{
  "bookmark": {
    "name": "foo",
    "query": "foo=boo",
    "id": 980190962,
    "owner_id": null,
    "public": true,
    "controller": "hosts",
    "owner_type": null
  }
}

Params


Bookmarks / create

POST /api/bookmarks
Create a bookmark.

Examples

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"
  }
}

Params


Bookmarks / update

PUT /api/bookmarks/:id
Update a bookmark.

Examples

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"
  }
}

Params


Bookmarks / destroy

DELETE /api/bookmarks/:id
Delete a bookmark.

Examples

DELETE /api/bookmarks/foo
200
{
  "bookmark": {
    "query": "foo=boo",
    "name": "foo",
    "id": 980190962,
    "public": true,
    "owner_id": null,
    "controller": "hosts",
    "owner_type": null
  }
}

Params


Common parameters


Common parameters / index

GET /api/common_parameters
List all common parameters.

Examples

GET /api/common_parameters
200
[
  {
    "common_parameter": {
      "name": "test",
      "value": "myvalue",
      "id": 636252244
    }
  }
]

Params


Common parameters / show

GET /api/common_parameters/:id
Show a common parameter.

Examples

GET /api/common_parameters/636252244
200
{
  "common_parameter": {
    "name": "test",
    "value": "myvalue",
    "id": 636252244
  }
}

Params


Common parameters / create

POST /api/common_parameters
Create a common_parameter

Examples

POST /api/common_parameters
{
  "common_parameter": {
    "name": "special_key",
    "value": "123"
  }
}
200
{
  "common_parameter": {
    "name": "special_key",
    "value": "123",
    "id": 767575239
  }
}

Params


Common parameters / update

PUT /api/common_parameters/:id
Update a common_parameter

Examples

PUT /api/common_parameters/636252244
{
  "common_parameter": {}
}
200
{
  "common_parameter": {
    "name": "test",
    "value": "myvalue",
    "id": 636252244
  }
}

Params


Common parameters / destroy

DELETE /api/common_parameters/:id
Delete a common_parameter

Examples

DELETE /api/common_parameters/636252244
200
{
  "common_parameter": {
    "name": "test",
    "value": "myvalue",
    "id": 636252244
  }
}

Params


Compute resources


Compute resources / index

GET /api/compute_resources
List all compute resources.

Examples

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"
    }
  }
]

Params


Compute resources / show

GET /api/compute_resources/:id
Show an compute resource.

Examples

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"
  }
}

Params


Compute resources / create

POST /api/compute_resources
Create a compute resource.

Examples

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"
  }
}

Params


Compute resources / update

PUT /api/compute_resources/:id
Update a compute resource.

Examples

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"
  }
}

Params


Compute resources / destroy

DELETE /api/compute_resources/:id
Delete a compute resource.

Examples

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"
  }
}

Params


Config templates


Config templates / index

GET /api/config_templates
List templates

Examples

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
      }
    }
  }
]

Params


Config templates / show

GET /api/config_templates/:id
Show template details

Examples

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
    }
  }
}

Params


Config templates / create

POST /api/config_templates
Create a template

Examples

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"
  }
}

Params


Config templates / update

PUT /api/config_templates/:id
Update a template

Examples

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
    }
  }
}

Params


Config templates / revision

GET /api/config_templates/revision

Params


Config templates / destroy

DELETE /api/config_templates/:id
Delete a template

Examples

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
    }
  }
}

Params


Config templates / build_pxe_default

GET /api/config_templates/build_pxe_default
Change the default PXE menu on all configured TFTP servers

Examples

GET /api/config_templates/build_pxe_default
200
PXE Default file has been deployed to all Smart Proxies

Dashboard


Dashboard / index

GET /api/dashboard
Get Dashboard results

Examples

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
}

Params


Domains

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.


Domains / index

GET /api/domains
List of domains

Examples

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"
    }
  }
]

Params


Domains / show

GET /api/domains/:id
Show a domain.

Examples

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"
  }
}

Params


Domains / create

POST /api/domains
Create a domain.

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

Examples

POST /api/domains
{
  "domain": {
    "name": "domain.net"
  }
}
201
{
  "domain": {
    "name": "domain.net",
    "id": 759776764
  }
}

Params


Domains / update

PUT /api/domains/:id
Update a domain.

Examples

PUT /api/domains/mydomain.net
{
  "domain": {
    "name": ""
  }
}
422
{
  "domain": {
    "id": 22495316,
    "errors": {
      "name": [
        "can't be blank"
      ]
    },
    "full_messages": [
      "Name can't be blank"
    ]
  }
}

Params


Domains / destroy

DELETE /api/domains/:id
Delete a domain.

Examples

DELETE /api/domains/mydomain.net
200
{
  "domain": {
    "name": "mydomain.net",
    "id": 22495316
  }
}

Params


Environments


Environments / index

GET /api/environments
List all environments.

Examples

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"
    }
  }
]

Params


Environments / show

GET /api/environments/:id
Show an environment.

Examples

GET /api/environments/production
200
{
  "environment": {
    "name": "production",
    "id": 334344675,
    "updated_at": "2012-12-18T15:24:42Z",
    "created_at": "2012-12-18T15:24:42Z"
  }
}

Params


Environments / create

POST /api/environments
Create an environment.

Examples

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"
  }
}

Params


Environments / update

PUT /api/environments/:id
Update an environment.

Examples

PUT /api/environments/production
{
  "environment": {}
}
200
{
  "environment": {
    "name": "production",
    "id": 334344675
  }
}

Params


Environments / destroy

DELETE /api/environments/:id
Delete an environment.

Examples

DELETE /api/environments/testing
200
{
  "environment": {
    "name": "testing",
    "id": 687036937
  }
}

Params


Fact values


Fact values / index

GET /api/fact_values
List all fact values.

GET /api/hosts/:host_id/facts
List all fact values of a given host.

Examples

GET /api/hosts/my5name.mydomain.net/facts
200
{
  "my5name.mydomain.net": {
    "ipaddress": "10.0.19.33",
    "kernelversion": "2.6.9"
  }
}

Params


Home


Home / index

GET /api
Show available links.

Examples

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"
  }
}

Home / status

GET /api/status
Show status.


Host classes


Host classes / index

GET /api/hosts/:host_id/puppetclass_ids
List all puppetclass id's for host


Host classes / create

POST /api/hosts/:host_id/puppetclass_ids
Add a puppetclass to host

Params


Host classes / destroy

DELETE /api/hosts/:host_id/puppetclass_ids/:id
Remove a puppetclass from host

Params


Hostgroup classes


Hostgroup classes / index

GET /api/hostgroups/:hostgroup_id/puppetclass_ids
List all puppetclass id's for hostgroup


Hostgroup classes / create

POST /api/hostgroups/:hostgroup_id/puppetclass_ids
Add a puppetclass to hostgroup

Params


Hostgroup classes / destroy

DELETE /api/hostgroups/:hostgroup_id/puppetclass_ids/:id
Remove a puppetclass from hostgroup

Params


Hostgroups


Hostgroups / index

GET /api/hostgroups
List all hostgroups.

Examples

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": []
    }
  }
]

Params


Hostgroups / show

GET /api/hostgroups/:id
Show a hostgroup.

Examples

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
    ]
  }
}

Params


Hostgroups / create

POST /api/hostgroups
Create an hostgroup.

Examples

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": []
  }
}

Params


Hostgroups / update

PUT /api/hostgroups/:id
Update an hostgroup.

Examples

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
    ]
  }
}

Params


Hostgroups / destroy

DELETE /api/hostgroups/:id
Delete an hostgroup.

Examples

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": []
  }
}

Params


Hosts


Hosts / index

GET /api/hosts
List all hosts.

Examples

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
    }
  }
]

Params


Hosts / show

GET /api/hosts/:id
Show a host.

Examples

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
  }
}

Params


Hosts / create

POST /api/hosts
Create a host.

Examples

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
  }
}

Params


Hosts / update

PUT /api/hosts/:id
Update a host.

Examples

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
  }
}

Params


Hosts / destroy

DELETE /api/hosts/:id
Delete an host.

Examples

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
  }
}

Params


Hosts / status

GET /api/hosts/:id/status
Get status of host

Return value may either be one of the following:

Examples

GET /api/hosts/my5name.mydomain.net/status
200
{
  "status": "missing"
}

Params


Hosts / puppetrun

GET /api/hosts/:id/puppetrun
Force a puppet run on the agent.


Hosts / power

PUT /api/hosts/:id/power
Run power operation on host.

Params


Hosts / boot

PUT /api/hosts/:id/boot
Boot host from specified device.

Params


Hosts / facts

POST /api/hosts/facts
Upload facts for a host, creating the host if required.

Params


Images


Images / index

GET /api/compute_resources/:compute_resource_id/images
List all images for compute resource

Examples

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
    }
  }
]

Params


Images / show

GET /api/compute_resources/:compute_resource_id/images/:id
Show an image

Examples

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
  }
}

Params


Images / create

POST /api/compute_resources/:compute_resource_id/images
Create a image

Examples

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"
  }
}

Params


Images / update

PUT /api/compute_resources/:compute_resource_id/images/:id
Update a image.

Examples

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
  }
}

Params


Images / destroy

DELETE /api/compute_resources/:compute_resource_id/images/:id
Delete an image.

Examples

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
  }
}

Params


Interfaces


Interfaces / index

GET /api/hosts/:host_id/interfaces
List all interfaces for host

Params


Interfaces / show

GET /api/hosts/:host_id/interfaces/:id
Show an interface for host

Params


Interfaces / create

POST /api/hosts/:host_id/interfaces
Create an interface linked to a host

Params


Interfaces / update

PUT /api/hosts/:host_id/interfaces/:id
Update host interface

Params


Interfaces / destroy

DELETE /api/hosts/:host_id/interfaces/:id
Delete a host interface

Params


Locations


Locations / index

GET /api/locations
List all locations

Params


Locations / show

GET /api/locations/:id
Show a location


Locations / create

POST /api/locations
Create a location

Params


Locations / update

PUT /api/locations/:id
Update a location

Params


Locations / destroy

DELETE /api/locations/:id
Delete a location


Lookup keys


Lookup keys / index

GET /api/lookup_keys
List all lookup_keys.

Examples

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"
    }
  }
]

Params


Lookup keys / show

GET /api/lookup_keys/:id
Show a lookup key.

Examples

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"
  }
}

Params


Lookup keys / create

POST /api/lookup_keys
Create a lookup key.

Examples

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
  }
}

Params


Lookup keys / update

PUT /api/lookup_keys/:id
Update a lookup key.

Examples

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
  }
}

Params


Lookup keys / destroy

DELETE /api/lookup_keys/:id
Delete a lookup key.

Examples

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"
  }
}

Params


Media


Media / index

GET /api/media
List all media.

Examples

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"
    }
  }
]

Params


Media / show

GET /api/media/:id
Show a medium.

Examples

GET /api/media/980190962
200
{
  "medium": {
    "name": "CentOS 5.4",
    "id": 980190962,
    "path": "http://mirror.averse.net/centos/6.0/os/$arch"
  }
}

Params


Media / create

POST /api/media
Create a medium.

Examples

POST /api/media
{
  "medium": {
    "name": "new medium",
    "path": "http://www.newmedium.com/"
  }
}
201
{
  "medium": {
    "name": "new medium",
    "id": 1011586619
  }
}

Params


Media / update

PUT /api/media/:id
Update a medium.

Examples

PUT /api/media/980190962
{
  "name": "CentOS 5.4"
}
200
{
  "medium": {
    "name": "CentOS 5.4",
    "id": 980190962
  }
}

Params


Media / destroy

DELETE /api/media/:id
Delete a medium.

Examples

DELETE /api/media/338446587
200
{
  "medium": {
    "name": "unused",
    "id": 338446587
  }
}

Params


Models


Models / index

GET /api/models
List all models.

Examples

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"
    }
  }
]

Params


Models / show

GET /api/models/:id
Show a model.

Examples

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
  }
}

Params


Models / create

POST /api/models
Create a model.

Examples

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
  }
}

Params


Models / update

PUT /api/models/:id
Update a model.

Examples

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
  }
}

Params


Models / destroy

DELETE /api/models/:id
Delete a model.

Examples

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
  }
}

Params


Operating systems


Operating systems / index

GET /api/operatingsystems
List all operating systems.

Params


Operating systems / show

GET /api/operatingsystems/:id
Show an OS.

Examples

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
        }
      }
    ]
  }
}

Params


Operating systems / create

POST /api/operatingsystems
Create an OS.

Examples

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": []
  }
}

Params


Operating systems / update

PUT /api/operatingsystems/:id
Update an OS.

Examples

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"
  }
}

Params


Operating systems / destroy

DELETE /api/operatingsystems/:id
Delete an OS.

Examples

DELETE /api/operatingsystems/775246587
200
{
  "operatingsystem": {
    "name": "NoHosts 1.1",
    "id": 775246587,
    "ptables": [],
    "architectures": [],
    "config_templates": [],
    "media": []
  }
}

Params


Operating systems / bootfiles

GET /api/operatingsystems/:id/bootfiles
List boot files an OS.

Params


Organizations


Organizations / index

GET /api/organizations
List all organizations

Params


Organizations / show

GET /api/organizations/:id
Show an organization


Organizations / create

POST /api/organizations
Create an organization

Params


Organizations / update

PUT /api/organizations/:id
Update an organization

Params


Organizations / destroy

DELETE /api/organizations/:id
Delete an organization


Override values


Override values / index

GET /api/smart_variables/:smart_variable_id/override_values
List of override values for a specific smart_variable

GET /api/smart_class_parameters/:smart_class_parameter_id/override_values
List of override values for a specific smart class parameter

Params


Override values / show

GET /api/smart_variables/:smart_variable_id/override_values/:id
Show an override value for a specific smart_variable

GET /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Show an override value for a specific smart class parameter

Params


Override values / create

POST /api/smart_variables/:smart_variable_id/override_values
Create an override value for a specific smart_variable

POST /api/smart_class_parameters/:smart_class_parameter_id/override_values
Create an override value for a specific smart class parameter

Params


Override values / update

PUT /api/smart_variables/:smart_variable_id/override_values/:id
Update an override value for a specific smart_variable

PUT /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Update an override value for a specific smart class parameter

Params


Override values / destroy

DELETE /api/smart_variables/:smart_variable_id/override_values/:id
Delete an override value for a specific smart_variable

DELETE /api/smart_class_parameters/:smart_class_parameter_id/override_values/:id
Delete an override value for a specific smart class parameter

Params


Parameters

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.


Parameters / index

GET /api/hosts/:host_id/parameters
List all parameters for host

GET /api/hostgroups/:hostgroup_id/parameters
List all parameters for hostgroup

GET /api/domains/:domain_id/parameters
List all parameters for domain

GET /api/operatingsystems/:operatingsystem_id/parameters
List all parameters for operating system

Params


Parameters / show

GET /api/hosts/:host_id/parameters/:id
Show a nested parameter for host

GET /api/hostgroups/:hostgroup_id/parameters/:id
Show a nested parameter for hostgroup

GET /api/domains/:domain_id/parameters/:id
Show a nested parameter for domain

GET /api/operatingsystems/:operatingsystem_id/parameters/:id
Show a nested parameter for operating system

Params


Parameters / create

POST /api/hosts/:host_id/parameters
Create a nested parameter for host

POST /api/hostgroups/:hostgroup_id/parameters
Create a nested parameter for hostgroup

POST /api/domains/:domain_id/parameters
Create a nested parameter for domain

POST /api/operatingsystems/:operatingsystem_id/parameters
Create a nested parameter for operating system

Params


Parameters / update

PUT /api/hosts/:host_id/parameters/:id
Update a nested parameter for host

PUT /api/hostgroups/:hostgroup_id/parameters/:id
Update a nested parameter for hostgroup

PUT /api/domains/:domain_id/parameters/:id
Update a nested parameter for domain

PUT /api/operatingsystems/:operatingsystem_id/parameters/:id
Update a nested parameter for operating system

Params


Parameters / destroy

DELETE /api/hosts/:host_id/parameters/:id
Delete a nested parameter for host

DELETE /api/hostgroups/:hostgroup_id/parameters/:id
Delete a nested parameter for hostgroup

DELETE /api/domains/:domain_id/parameters/:id
Delete a nested parameter for domain

DELETE /api/operatingsystems/:operatingsystem_id/parameters/:id
Delete a nested parameter for operating system

Params


Parameters / reset

DELETE /api/hosts/:host_id/parameters
Delete all nested parameters for host

DELETE /api/hostgroups/:hostgroup_id/parameters
Delete all nested parameters for hostgroup

DELETE /api/domains/:domain_id/parameters
Delete all nested parameters for domain

DELETE /api/operatingsystems/:operatingsystem_id/parameters
Delete all nested parameters for operating system


Ptables


Ptables / index

GET /api/ptables
List all ptables.

Examples

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"
    }
  }
]

Params


Ptables / show

GET /api/ptables/:id
Show a ptable.

Examples

GET /api/ptables/980190962
200
{
  "ptable": {
    "name": "default",
    "id": 980190962,
    "updated_at": "2012-12-18T15:24:43Z",
    "created_at": "2012-12-18T15:24:43Z"
  }
}

Params


Ptables / create

POST /api/ptables
Create a ptable.

Examples

POST /api/ptables
{
  "ptable": {
    "name": "ptable_test",
    "layout": "d-i partman-auto/disk"
  }
}
201
{
  "ptable": {
    "name": "ptable_test",
    "id": 1011586619
  }
}

Params


Ptables / update

PUT /api/ptables/:id
Update a ptable.

Examples

PUT /api/ptables/980190962
{
  "ptable": {}
}
200
{
  "ptable": {
    "name": "default",
    "id": 980190962
  }
}

Params


Ptables / destroy

DELETE /api/ptables/:id
Delete a ptable.

Examples

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"
    ]
  }
}

Params


Puppetclasses


Puppetclasses / index

GET /api/puppetclasses
List all puppetclasses.

GET /api/hosts/:host_id/puppetclasses
List all puppetclasses for host

GET /api/hostgroups/:hostgroup_id/puppetclasses
List all puppetclasses for hostgroup

GET /api/environments/:environment_id/puppetclasses
List all puppetclasses for environment

Examples

GET /api/puppetclasses
200
{
  "base": [
    {
      "puppetclass": {
        "name": "base",
        "id": 980190962,
        "lookup_keys": [
          {
            "id": 298486374
          }
        ]
      }
    }
  ],
  "apache": [
    {
      "puppetclass": {
        "name": "apache",
        "id": 298486374,
        "lookup_keys": []
      }
    }
  ]
}

Params


Puppetclasses / show

GET /api/puppetclasses/:id
Show a puppetclass

GET /api/hosts/:host_id/puppetclasses/:id
Show a puppetclass for host

GET /api/hostgroups/:hostgroup_id/puppetclasses/:id
Show a puppetclass for hostgroup

GET /api/environments/:environment_id/puppetclasses/:id
Show a puppetclass for environment

Examples

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"
        }
      }
    ]
  }
}

Params


Puppetclasses / create

POST /api/puppetclasses
Create a puppetclass.

Examples

POST /api/puppetclasses
{
  "puppetclass": {
    "name": "test_puppetclass"
  }
}
201
{
  "puppetclass": {
    "name": "test_puppetclass",
    "id": 980190963,
    "lookup_keys": []
  }
}

Params


Puppetclasses / update

PUT /api/puppetclasses/:id
Update a puppetclass.

Examples

PUT /api/puppetclasses/base
{
  "puppetclass": {}
}
200
{
  "puppetclass": {
    "name": "base",
    "id": 980190962,
    "lookup_keys": [
      {
        "id": 298486374
      }
    ]
  }
}

Params


Puppetclasses / destroy

DELETE /api/puppetclasses/:id
Delete a puppetclass.

Examples

DELETE /api/puppetclasses/base
200
{
  "puppetclass": {
    "name": "base",
    "id": 980190962,
    "lookup_keys": [
      {
        "id": 298486374
      }
    ]
  }
}

Params


Reports


Reports / index

GET /api/reports
List all reports.

Examples

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": []
    }
  }
]

Params


Reports / show

GET /api/reports/:id
Show a report.

Examples

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": []
  }
}

Params


Reports / destroy

DELETE /api/ptables/:id
Delete a report.

Examples

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
      }
    }
  }
}

Params


Reports / last

GET /api/hosts/:host_id/reports/last
Show the last report for a given host.

Examples

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": []
  }
}

Params


Reports / create

POST /api/reports
Create a report.

Params


Roles


Roles / index

GET /api/roles
List all roles.

Params


Roles / show

GET /api/roles/:id
Show an role.

Examples

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"
    ]
  }
}

Params


Roles / create

POST /api/roles
Create an role.

Examples

POST /api/roles
{
  "role": {
    "name": "staff"
  }
}
200
{
  "role": {
    "name": "staff",
    "id": 11,
    "builtin": 0,
    "permissions": []
  }
}

Params


Roles / update

PUT /api/roles/:id
Update an role.

Examples

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"
    ]
  }
}

Params


Roles / destroy

DELETE /api/roles/:id
Delete an role.

Examples

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"
    ]
  }
}

Params


Settings


Settings / index

GET /api/settings
List all settings.

Params


Settings / show

GET /api/settings/:id
Show an setting.

Examples

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"
  }
}

Params


Settings / update

PUT /api/settings/:id
Update a setting.

Examples

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"
  }
}

Params


Smart class parameters


Smart class parameters / index

GET /api/smart_class_parameters
List all smart class parameters

GET /api/hosts/:host_id/smart_class_parameters
List of smart class parameters for a specific host

GET /api/hostgroups/:hostgroup_id/smart_class_parameters
List of smart class parameters for a specific hostgroup

GET /api/puppetclasses/:puppetclass_id/smart_class_parameters
List of smart class parameters for a specific puppetclass

GET /api/environments/:environment_id/smart_class_parameters
List of smart class parameters for a specific environment

GET /api/environments/:environment_id/puppetclasses/:puppetclass_id/smart_class_parameters
List of smart class parameters for a specific environment/puppetclass combination

Params


Smart class parameters / show

GET /api/smart_class_parameters/:id
Show a smart class parameter.

Params


Smart class parameters / update

PUT /api/smart_class_parameters/:id
Update a smart class parameter.

Params


Smart proxies


Smart proxies / index

GET /api/smart_proxies
List all smart_proxies.

Examples

GET /api/smart_proxies?type=unknown_type
500
{
  "error": {
    "message": "Invalid feature type. Select one of: TFTP, BMC, DNS, DHCP, Puppetca, Puppet."
  }
}

Params


Smart proxies / show

GET /api/smart_proxies/:id
Show a smart proxy.

Examples

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"
  }
}

Params


Smart proxies / create

POST /api/smart_proxies
Create a smart proxy.

Examples

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"
  }
}

Params


Smart proxies / update

PUT /api/smart_proxies/:id
Update a smart proxy.

Examples

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"
  }
}

Params


Smart proxies / destroy

DELETE /api/smart_proxies/:id
Delete a smart_proxy.

Examples

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"
  }
}

Params


Smart variables


Smart variables / index

GET /api/smart_variables
List all smart variables

GET /api/hosts/:host_id/smart_variables
List of smart variables for a specific host

GET /api/hostgroups/:hostgroup_id/smart_variables
List of smart variables for a specific hostgroup

GET /api/puppetclasses/:puppetclass_id/smart_variables
List of smart variables for a specific puppetclass

Params


Smart variables / show

GET /api/smart_variables/:id
Show a smart variable.

Params


Smart variables / create

POST /api/smart_variables
Create a smart variable.

Params


Smart variables / update

PUT /api/smart_variables/:id
Update a smart variable.

Params


Smart variables / destroy

DELETE /api/smart_variables/:id
Delete a smart variable.

Params


Statistics


Statistics / index

GET /api/statistics
Get statistics


Subnets


Subnets / index

GET /api/subnets
List of subnets

Examples

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
    }
  }
]

Params


Subnets / show

GET /api/subnets/:id
Show a subnet.

Examples

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
  }
}

Params


Subnets / create

POST /api/subnets
Create a subnet

Examples

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
  }
}

Params


Subnets / update

PUT /api/subnets/:id
Update a subnet

Examples

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
  }
}

Params


Subnets / destroy

DELETE /api/subnets/:id
Delete a subnet

Examples

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"
    ]
  }
}

Params


Template combinations


Template combinations / index

GET /api/config_templates/:config_template_id/template_combinations
List Template Combination

Params


Template combinations / create

POST /api/config_templates/:config_template_id/template_combinations
Add a Template Combination

Params


Template combinations / show

GET /api/template_combinations/:id
Show Template Combination

Params


Template combinations / destroy

DELETE /api/template_combinations/:id
Delete a template

Params


Template kinds


Template kinds / index

GET /api/template_kinds
List all template kinds.

Examples

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
    }
  }
]

Params


Usergroups


Usergroups / index

GET /api/usergroups
List all usergroups.

Examples

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"
    }
  }
]

Params


Usergroups / show

GET /api/usergroups/:id
Show a usergroup.

Examples

GET /api/usergroups/980190962
200
{
  "usergroup": {
    "name": "MyString",
    "id": 980190962,
    "updated_at": "2012-12-18T15:24:43Z",
    "created_at": "2012-12-18T15:24:43Z"
  }
}

Params


Usergroups / create

POST /api/usergroups
Create a usergroup.

Examples

POST /api/usergroups
{
  "usergroup": {
    "name": "test_usergroup"
  }
}
201
{
  "usergroup": {
    "name": "test_usergroup",
    "id": 980190963
  }
}

Params


Usergroups / update

PUT /api/usergroups/:id
Update a usergroup.

Examples

PUT /api/usergroups/980190962
{
  "usergroup": {}
}
200
{
  "usergroup": {
    "name": "MyString",
    "id": 980190962
  }
}

Params


Usergroups / destroy

DELETE /api/usergroups/:id
Delete a usergroup.

Examples

DELETE /api/usergroups/980190962
200
{
  "usergroup": {
    "name": "MyString",
    "id": 980190962
  }
}

Params


Users


Users / index

GET /api/users
List all users.

Examples

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
    }
  }
]

Params


Users / show

GET /api/users/:id
Show an user.

Examples

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
  }
}

Params


Users / create

POST /api/users
Create an user.

Adds role ‘Anonymous’ to the user by default

Params


Users / update

PUT /api/users/:id
Update an user.

Adds role ‘Anonymous’ to the user if it is not already present. Only admin can set admin account.

Examples

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"
    ]
  }
}

Params


Users / destroy

DELETE /api/users/:id
Delete an user.

Examples

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
  }
}

Params