File Bucket File

The file_bucket_file endpoint manages the contents of files in the
file bucket. All access to files is managed with the md5 checksum of the
file contents, represented as :md5. Where used, :filename means the
full absolute path of the file on the client system. This is usually
optional and used as an error check to make sure correct file is
retrieved. The environment is required in all requests but ignored, as
the file bucket does not distinguish between environments.

Find

Retrieve the contents of a file.

GET /puppet/v3/file_bucket_file/:md5?environment=:environment
GET /puppet/v3/file_bucket_file/:md5/:original_path?environment=:environment

This will return the contents of the file if it’s present. If
:original_path is provided then the contents will only be sent if the
file was uploaded with the same path at some point.

Head

Check if a file is present in the filebucket

HEAD /puppet/v3/file_bucket_file/:md5?environment=:environment
HEAD /puppet/v3/file_bucket_file/:md5/:original_path?environment=:environment

This behaves identically to find, only returning headers.

Save

The body should contain the file contents. This saves the file using the
md5 sum of the file contents. If :original_path is provided, it adds
the path to a list for the given file. If the md5 sum in the request is
incorrect, the file will be instead saved under the correct checksum.

Supported HTTP Methods

GET, HEAD, PUT

Supported Response Formats

binary or application/octet-stream (a string of the raw file contents)