Project

General

Profile

API » History » Version 2

Ohad Levy, 03/24/2011 03:55 AM

1 1 Ohad Levy
h1. API
2
3
Foreman Smart Proxy provides a "REST":http://en.wikipedia.org/wiki/Representational_State_Transfer API, communicating via JSON.
4
5
Please refer to this document for latest information about Foreman Smart Proxy API.
6
7
h2. List of API's
8
9
|_.Path|_.REST Type|_.Description|_.Example Input JSON|  
10
|_.FEATURES |
11
|/features|GET|List of features supported by the proxy||
12
|_.DHCP |
13
|/dhcp|GET|Retrieve a list of subnets||
14
|/dhcp/10.1.2.0|GET|Retrieve 10.1.2.0 subnets records||
15
|/dhcp/10.1.2.0/10.1.2.5|GET|Retrieve 10.1.2.5 reservation information ||
16
|/dhcp/10.1.2.0/unused_ip|GET|Provides an unused ip address in 10.1.2.0 subnet ||
17 2 Ohad Levy
|/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}|
18 1 Ohad Levy
|/dhcp/10.1.2.0/10.1.2.5|DELETE|Deletes 10.1.2.5 reservation from 10.1.2.0 subnet||
19
|_.DNS |
20
|/dns|POST|Create a new DNS record|{"fqdn":string(name/ip), "value":string(ip/reverse), "type":string(A/PTR)|
21
|/dns/value|DELETE|remove value(ip or reverse) DNS record||
22
|_.TFTP |
23
|/tftp/mac|POST|creates MAC address pxelinux configuration file|{"syslinux_config":string|
24
|/tftp/mac|DELETE|remove MAC address pxelinux configuration file||
25
|/tftp/create_default|POST|creates a default pxelinux configuration file|{"syslinux_config":string|
26
|/tftp/fetch_boot_file|POST|creates a default pxelinux configuration file|{"prefix":string, "path":string|
27
|_.PUPPET CA |
28
|/puppet/ca|GET| list of all puppet certificates ||
29
|/puppet/ca/autosign|GET| list of all puppet autosign entires ||
30
|/puppet/ca/autosign/certname|POST| Add certname to Puppet autosign ||
31
|/puppet/ca/autosign/certname|DELETE| Remove certname from Puppet autosign ||
32
|_.PUPPET |
33
|/puppet/run|POST| Trigger puppet run / kick| |["hostA", "hostB"]|
34
35
Please raise a new issue if you need additional API's