Project

General

Profile

Json-fact-format » History » Version 4

Marek Hulán, 10/18/2013 07:58 AM

1 1 Romain Vrignaud
h1. Json-fact-format
2
3
h3. how to send facts
4
5
* Foreman reports need to be sent to /api/hosts/facts
6 3 Marek Hulán
* Following headers needs to be present: 
7 1 Romain Vrignaud
<pre>
8
  "Accept: application/json,version=2"
9
  "Content-Type: application/json"
10
</pre>
11
12
h3. facts JSON format
13
14
<pre>
15
{
16
  "name"    => "fqdn.example.com",
17
  "facts"   => {
18 4 Marek Hulán
                 "fact1"                  => "value",
19
                 "fact2"                  => "value",
20
                 "_timestamp"             => "2013-10-18 07:47:45 +0000",
21
                 "operatingsystem"        => 'Debian',
22
                 "operatingsystemrelease" => '7.0'
23 1 Romain Vrignaud
               }
24
}
25
</pre>
26 4 Marek Hulán
27
Note that _timestamp, operatingsystem and operatingsystemrelease are mandatory