REST - nodester/nodester GitHub Wiki
HOME · CLI · REST · INSTALL · FAQ · Common Problems
The force is strong with our REST API.
http://api.nodester.com
coupon | ||
POST |
/coupon - Creates coupon request for early access (pass in email)curl -X POST -d "[email protected]" http://nodester.com/coupon
|
|
user | ||
POST |
/user - Creates user account (pass in user and password and email and id_rsa.pub string) Ensure that all + in the ssh key are substituted for their %2B counter parts, else your key will break. Run this on your command line to copy your RSA string and swap out the plus signs: "cat ~/.ssh/id_rsa.pub | sed s/'+'/'%2B'/g | pbcopy"curl -X POST -d "coupon=mycoupon&user=testuser&password=123&[email protected]&rsakey=ssh-rsa AAAAB3NzaC1yc..." http://nodester.com/user
|
|
PUT |
/user - Updates user account (pass in password and/or RSA key - "cat ~/.ssh/id_rsa.pub | sed s/'+'/'%2B'/g | pbcopy")curl -X PUT -u "testuser:123" -d "password=test" http://api.nodester.com/user curl -X PUT -u "testuser:123" -d "rsakey=1234567" http://api.nodester.com/user
|
|
DELETE |
/user - Deletes user account (requires basic auth)curl -X DELETE -u "testuser:123" http://api.nodester.com/user
|
|
apps | ||
GET |
/apps - Returns a list of all apps created by a user account (requires basic auth)curl -X GET -u "testuser:123" http://nodester.com/apps
|
|
POST |
/apps/<appname> - Creates nodejs app for hosting (requires basic auth and returns the port address required for use along with a git repo to push to)curl -X POST -u "testuser:123" -d "start=hello.js" http://api.nodester.com/apps/a
|
|
PUT |
/apps/<appname> - Updates starting app name (requires basic auth, appname, and starting page and returns the port address required for use along with a git repo to push to and running status of the app)curl -X PUT -u "testuser:123" -d "start=hello1.js" http://api.nodester.com/apps/a
|
|
PUT |
/apps/<appname> - Start and stop your hosted nodejs app (requires basic auth, appname, and running=true|false and returns the port address required for use along with a git repo to push to)curl -X PUT -u "testuser:123" -d "running=true" http://api.nodester.com/apps/a
|
|
DELETE |
/apps/<appname> - Deletes nodejs app (requires basic auth and appname)curl -X DELETE -u "testuser:123" http://api.nodester.com/apps/<appname>
|
|
GET |
/apps/<appname> - get nodejs app info (requires basic auth and appname)curl -X GET -u "testuser:123" http://api.nodester.com/apps/<appname>
|
|
applogs | ||
GET |
/applogs/<appname> - Gets nodejs app logs (requires basic auth and appname)curl -X GET -u "testuser:123" http://api.nodester.com/applogs/<appname>
|
|
env | ||
PUT |
/env - Create/update environment key/value pair (requires basic auth, appname, and environment key and value)curl -X PUT -u "testuser:123" -d "appname=a&key=color&value=blue" http://api.nodester.com/env
|
|
DELETE |
/env/<appname>/<key> - Deletes environment key/value pair (requires basic auth, appname, and environment key)curl -X DELETE -u "testuser:123" http://api.nodester.com/env/<appname>/<key>
|
|
GET |
/env - Gets environment info (requires basic auth, appname, and environment key)curl -X GET -u "testuser:123" http://api.nodester.com/env/<appname>
|
|
status | ||
GET |
/status - Returns platform status and number of apps hosted and runningcurl -X GET http://nodester.com/status
|
|
npm | ||
POST |
/npm - Allows you to manage the NPM packages for an application.curl -X POST -u "testuser:123" -d "appname=a&action=install&package=express" http://api.nodester.com/npm curl -X POST -u "testuser:123" -d "appname=a&action=update&package=express" http://api.nodester.com/npm curl -X POST -u "testuser:123" -d "appname=a&action=uninstall&package=express" http://api.nodester.com/npm
|
|
appdomains | ||
POST |
/appdomains - Creates app domain for hosting example.com (requires basic auth)curl -X POST -u "testuser:123" -d "appname=test&domain=example.com" http://api.nodester.com/appdomains
|
|
DELETE |
/appdomains/<appname>/<domain> - Deletes app domain for hosting example.com (requires basic auth)curl -X DELETE -u "testuser:123" http://api.nodester.com/appdomains/<appname>/<domain>
|
|
GET |
/appdomains - Gets list of your domains (requires basic auth)curl -X GET -u "testuser:123" http://api.nodester.com/appdomains
|
|
reset_password | ||
POST |
/reset_password - Sends a e-mail with a token to reset your user passwordcurl -X POST -d "user=your_username" http://nodester.com/reset_password
|
|
PUT |
/reset_password/<token> - Updates your password using the provided tokencurl -X PUT -d "password=your_new_password" http://nodester.com/reset_password/<token>
|
|
gitreset | ||
DELETE |
/gitreset/<appname> - Resets your Nodester git repository and npm list (pass in appname)curl -X DELETE -u "testuser:123" http://api.nodester.com/gitreset/<appname>
|