API » History » Revision 2
Revision 1 (Ohad Levy, 03/24/2011 03:54 AM) → Revision 2/39 (Ohad Levy, 03/24/2011 03:55 AM)
h1. API Foreman Smart Proxy provides a "REST":http://en.wikipedia.org/wiki/Representational_State_Transfer API, communicating via JSON. Please refer to this document for latest information about Foreman Smart Proxy API. h2. List of API's |_.Path|_.REST Type|_.Description|_.Example Input JSON| |_.FEATURES | |/features|GET|List of features supported by the proxy|| |_.DHCP | |/dhcp|GET|Retrieve a list of subnets|| |/dhcp/10.1.2.0|GET|Retrieve 10.1.2.0 subnets records|| |/dhcp/10.1.2.0/10.1.2.5|GET|Retrieve 10.1.2.5 reservation information || |/dhcp/10.1.2.0/unused_ip|GET|Provides an unused ip address in 10.1.2.0 subnet || |/dhcp/10.1.2.0|POST|creates new reservation in 10.1.2.0 subnet |{"name":string, "filename":string, "ip":string, "nextserver":string, "mac":string}| "mac":string} |/dhcp/10.1.2.0/10.1.2.5|DELETE|Deletes 10.1.2.5 reservation from 10.1.2.0 subnet|| |_.DNS | |/dns|POST|Create a new DNS record|{"fqdn":string(name/ip), "value":string(ip/reverse), "type":string(A/PTR)| |/dns/value|DELETE|remove value(ip or reverse) DNS record|| |_.TFTP | |/tftp/mac|POST|creates MAC address pxelinux configuration file|{"syslinux_config":string| |/tftp/mac|DELETE|remove MAC address pxelinux configuration file|| |/tftp/create_default|POST|creates a default pxelinux configuration file|{"syslinux_config":string| |/tftp/fetch_boot_file|POST|creates a default pxelinux configuration file|{"prefix":string, "path":string| |_.PUPPET CA | |/puppet/ca|GET| list of all puppet certificates || |/puppet/ca/autosign|GET| list of all puppet autosign entires || |/puppet/ca/autosign/certname|POST| Add certname to Puppet autosign || |/puppet/ca/autosign/certname|DELETE| Remove certname from Puppet autosign || |_.PUPPET | |/puppet/run|POST| Trigger puppet run / kick| |["hostA", "hostB"]| Please raise a new issue if you need additional API's