Server-api¶
This page contains information about the Puppet Module Forge REST API.
Terminology:¶
| Term | Meaning | Example |
|---|---|---|
| moduleName | A module name. | "hadoop" |
| userName | A name of a registered user | "adobe" |
| version | A three digit number using a dot as the separator | "0.0.1" |
| fullName | A string consisting of a user name, a slash, and a module name | "adobe/hadoop" |
| modulePath | A relative path to a module archive file. The path meant to be appended to the repository URL | "/system/releases/a/adobe/adobe-hadoop-0.0.1.tar.gz" |
| repositoryURL | The URL to the module repository | "http://forge.puppetlabs.com" | searchTerm | A term to search for. Must be URL encoded | "rsync" |
Operations:¶
Find latest module for a user and module name¶
Request URL: repositoryURL/users/user/modules/module/releases/find.json
JSON Response: {“file”:modulePath,“version”:version}
Search for modules¶
Request URL:repositoryURL/modules.json?q=searchTerm
JSON Response: [{“project_url”:URL,“name”:moduleName,“full_name”:fullName,“version”:version}, …]
Release module ### (unsure if this is working)¶
Request URL:repositoryURL/users/user/modules/module/releases.json
JSON Response:
Unrelease module ### (unsure if this is working)¶
Request URL:repositoryURL/users/user/modules/module/releases/version
JSON Response:
Register user ### (unsure if this is working)¶
Request URL:repositoryURL/users/user/modules.json
JSON Response: