Skip to content
Browse files

added REST API environment documentation

  • Loading branch information...
1 parent 8840ed7 commit ff5e62a393f5014e344cc7e47cadb87c504c2405 @chrismatthieu chrismatthieu committed Apr 29, 2011
Showing with 28 additions and 6 deletions.
  1. +25 −4 public/api.html
  2. +3 −2 public/index.html
View
29 public/api.html
@@ -110,6 +110,7 @@
<li><a href="#status">API Status</a></li>
<li><a href="#userapi">User Resource</a></li>
<li><a href="#app">App Resource</a></li>
+ <li><a href="#env">Env Resource</a></li>
<li><a href="#appnpm">NPM Resource</a></li>
<li><a href="#appdomains">App Domains Resource</a></li>
<li><a href="#clicommands">CLI Commands</a></li>
@@ -202,6 +203,26 @@
<code>/app/<appname> - get nodejs app info (requires basic auth and appname)<br/> <br/>
curl -u "testuser:123" http://api.nodester.com/app/appname</code>
+ <a name="env"></a>
+ <h3>ENV</h3>
+ <p><b>Create/Update Environment :: PUT</b>
+ <br/>Base URL: http://api.nodester.com</p>
+
+ <code>/env - create/update environment key/value pair (requires basic auth, appname, and environment key and value)<br/><br/>
+ curl -X PUT -u "testuser:123" -d "appname=a&key=color&value=blue" http://api.nodester.com/env</code>
+
+ <p><b>Delete Environment :: DELETE</b>
+ <br/>Base URL: http://api.nodester.com</p>
+
+ <code>/env - delete environment key/value pair (requires basic auth, appname, and environment key)<br/> <br/>
+ curl -X DELETE -u "testuser:123" -d "appname=test&key=color" http://api.nodester.com/env</code>
+
+ <p><b>Environment Information :: GET</b>
+ <br/>Base URL: http://api.nodester.com</p>
+
+ <code>/env - get environment info (requires basic auth, appname, and environment key)<br/> <br/>
+ curl -u "testuser:123" -d "appname=test&key=color" http://api.nodester.com/env</code>
+
<h3>APPS</h3>
<p><b>All Applications Information :: GET</b>
<br/>Base URL: http://api.nodester.com</p>
@@ -212,10 +233,10 @@
<h3>NPM</h3>
<p><b>Install/Upgrade/Uninstall NPM Packages :: POST</b>
<br/>Base URL: http://api.nodester.com</p>
- <code>/appnpm - Allows you to manage the NPM packages for an application.<br/><br/>
- curl -X POST -u "testuser:123" -d "appname=a&action=install&package=express" http://api.nodester.com/appnpm<br/><br/>
- curl -X POST -u "testuser:123" -d "appname=a&action=update&package=express" http://api.nodester.com/appnpm<br/><br/>
- curl -X POST -u "testuser:123" -d "appname=a&action=uninstall&package=express" http://api.nodester.com/appnpm</code></p>
+ <code>/npm - Allows you to manage the NPM packages for an application.<br/><br/>
+ curl -X POST -u "testuser:123" -d "appname=a&action=install&package=express" http://api.nodester.com/npm<br/><br/>
+ curl -X POST -u "testuser:123" -d "appname=a&action=update&package=express" http://api.nodester.com/npm<br/><br/>
+ curl -X POST -u "testuser:123" -d "appname=a&action=uninstall&package=express" http://api.nodester.com/npm</code></p>
<a name="appdomains"></a>
<h3>APPDOMAINS - Add DNS A Record for 50.16.203.53</h3>
View
5 public/index.html
@@ -119,6 +119,7 @@
<li><a href="/api.html#status">API Status</a></li>
<li><a href="/api.html#userapi">User Resource</a></li>
<li><a href="/api.html#app">App Resource</a></li>
+ <li><a href="/api.html#env">Env Resource</a></li>
<li><a href="/api.html#appnpm">NPM Resource</a></li>
<li><a href="/api.html#appdomains">App Domains Resource</a></li>
<li><a href="/api.html#clicommands">CLI Commands</a></li>
@@ -168,14 +169,14 @@
<code>
nodester app create myapp hello.js<br/><br/>
git remote add nodester the_url_returned_by_our_api and git push nodester master<br/><br/>
- <b>NPM modules?</b> nodester appnpm install express<br/><br/>
+ <b>NPM modules?</b> nodester npm install express<br/><br/>
nodester app start myapp
</code>
<p>- OR -</p>
<code>
curl -X POST -u "testuser:123" -d "appname=myapp&start=hello.js" http://api.nodester.com/app<br/><br/>
git remote add nodester the_url_returned_by_our_api <b>and</b> git push nodester master<br/><br/>
- <b>NPM modules?</b> curl -X POST -u "testuser:123" -d "appname=myapp&action=install&package=express" http://api.nodester.com/appnpm<br/><br/>
+ <b>NPM modules?</b> curl -X POST -u "testuser:123" -d "appname=myapp&action=install&package=express" http://api.nodester.com/npm<br/><br/>
curl -X PUT -u "testuser:123" -d "appname=myapp&running=true" http://api.nodester.com/app
</code>
<code><b>Visit your app at http://myapp.nodester.com</b></code>

0 comments on commit ff5e62a

Please sign in to comment.
Something went wrong with that request. Please try again.