File tree Expand file tree Collapse file tree 3 files changed +72
-6
lines changed
Expand file tree Collapse file tree 3 files changed +72
-6
lines changed Original file line number Diff line number Diff line change @@ -54,4 +54,4 @@ is an active #puppet channel on Freenode.
5454
5555HTTP API
5656--------
57- {file: api_docs /http_api_index.md HTTP API Index}
57+ {file: api /docs /http_api_index.md HTTP API Index}
Original file line number Diff line number Diff line change 11Services
22--------
33
4- * {file: api_docs /http_resource_type.md Resource Type}
5- * {file: api_docs /http_certificate.md Certificate}
6- * {file: api_docs /http_catalog.md Catalog}
4+ * {file: api /docs/http_resource_type.md Resource Type}
5+ * {file: api /docs/http_certificate.md Certificate}
6+ * {file: api /docs/http_catalog.md Catalog}
7+ * {file: api /docs/http_file_content.md File Content}
8+ * {file: api /docs/http_report.md Report}
79
810To be documented:
911
10- * report
1112* node
1213* facts
1314* file_metadata
14- * file_content
1515* file_bucket_file
1616* certificate
1717* certificate_request
Original file line number Diff line number Diff line change 1+ File Content
2+ =============
3+
4+ The ` file_content ` endpoint returns the contents of the specified file.
5+
6+ Find
7+ ----
8+
9+ Get a file.
10+
11+ GET /:environment/file_content/:mount_point/:name
12+
13+ ` :mount_point ` is one of mounts configured in the ` fileserver.conf ` .
14+ See [ the puppet file server guide] ( http://docs.puppetlabs.com/guides/file_serving.html )
15+ for more information about how mount points work.
16+
17+ ` :name ` is the path to the file within the ` :mount_point ` that is requested.
18+
19+ ### Supported HTTP Methods
20+
21+ GET
22+
23+ ### Supported Format
24+
25+ Accept: raw
26+
27+ ### Parameters
28+
29+ None
30+
31+ ### Notes
32+
33+ ### Responses
34+
35+ #### File found
36+
37+ GET /env/file_content/modules/example/my_file
38+ Accept: raw
39+
40+ HTTP/1.1 200 OK
41+ Content-Type: application/x-raw
42+ Content-Length: 16
43+
44+ this is my file
45+
46+
47+ #### File not found
48+
49+ GET /env/file_content/modules/example/not_found
50+ Accept: raw
51+
52+ HTTP/1.1 404 Not Found: Could not find file_content modules/example/not_found
53+ Content-Type: text/plain
54+
55+ #### No file name given
56+
57+ GET /env/file_content/
58+
59+ HTTP/1.1 400 No request key specified in /env/file_content/
60+ Content-Type: text/plain
61+
62+ Schema
63+ ------
64+
65+ A file_content response body is not structured data according to any standard scheme such as
66+ json/pson/yaml, so no schema is applicable.
You can’t perform that action at this time.
0 commit comments