file_content endpoint returns the contents of the specified file.
Get a file.
The endpoint path includes a
:mount_point which can be one of the following types:
modules/<MODULE>— a semi-magical mount point which allows access to the
<MODULE>— see the docs on file serving.
plugins— a highly magical mount point which merges the
libdirectory of every module together. Used for syncing plugins; not intended for general consumption. Per-module sub-paths can not be specified.
pluginfacts— a highly magical mount point which merges the
facts.ddirectory of every module together. Used for syncing external facts; not intended for general consumption. Per-module sub-paths can not be specified.
:name is the path to the file within the
:mount_point that is requested.
binary (the raw binary content)
GET /puppet/v3/file_content/modules/example/my_file?environment=env Accept: binary HTTP/1.1 200 OK Content-Type: application/octet-stream Content-Length: 16 this is my file
GET /puppet/v3/file_content/modules/example/not_found?environment=env Accept: binary HTTP/1.1 404 Not Found Content-Type: text/plain Not Found: Could not find file_content modules/example/not_found
GET /puppet/v3/file_content?environment=env HTTP/1.1 400 Bad Request Content-Type: text/plain No request key specified in /puppet/v3/file_content/
file_content response body is not structured data according to any standard scheme such as
json/pson/yaml, so no schema is applicable.