File: http_facts.md

package info (click to toggle)
puppet-agent 8.10.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 27,392 kB
  • sloc: ruby: 286,820; sh: 492; xml: 116; makefile: 88; cs: 68
file content (56 lines) | stat: -rw-r--r-- 1,171 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Facts
=====

The `facts` endpoint allows setting the facts for the specified node name.

Save
----

Store facts for a node. The request body should contain JSON-formatted facts.

    PUT /puppet/v3/facts/:nodename?environment=:environment

### Supported HTTP Methods

PUT

### Supported Format(s)

`application/json`

### Parameters

None

### Example

* Note: list of facts was shortened for readability.
* Note: JSON was formatted for readability.

    PUT /puppet/v3/facts/elmo.mydomain.com?environment=env
    Content-Type: application/json

    {
      "name": "elmo.mydomain.com",
      "values": {
        "architecture": "x86_64",
        "kernel": "Darwin",
        "domain": "local",
        "macaddress": "70:11:24:8c:33:a9",
        "osfamily": "Darwin",
        "operatingsystem": "Darwin",
        "facterversion": "1.7.2",
        "fqdn": "elmo.mydomain.com",
      },
      "timestamp": "2013-09-09 15:49:27 -0700",
      "expiration": "2013-09-09 16:19:27 -0700"
    }

    HTTP/1.1 200 OK
    Content-Type: application/json

Schema
------

The representation of facts contained in a PUT body, should adhere to
[the facts schema.](../schemas/facts.json)