Skip to content
Ted Benson edited this page Jan 11, 2017 · 2 revisions

API

Auth

To auth an request, include the header

Authorization: Bearer tokenvalue

Login

Request

POST https://cloudstitch.com/api/1/login

Headers:

  • User-Agent=cloudstitch-cli Body:
  • username|email and password

Response

On succsess

{ "token": "XXX" }

On failure

{ "error": true, "message": "Some reason here." }

The message will be appropriate for displaying to user.

Sign Up

POST https://cloudstitch.com/api/1/signup

Headers:

  • User-Agent=cloudstitch-cli Body:
  • username, email, and password

Response

On succsess

{ "token": "XXX" }

On failure

{ "error": true, "message": "Some reason here." }

The message will be appropriate for displaying to user.

List

Request

GET /api/1/user/app/files (TODO(eob) -- this already exists..)

TODO(eob) make sure md5s in there.

Push

POST /api/1/user/app/files

Body Zip file. Only files with different md5s are necessary to perform an update to save time.

Response

{
  .. a token that represents the job status .. 
}

Push

GET /api/1/user/app/job-status

Url params: UserApp (ted/app) JobName

Response:

{
  "updateTime": 111,
  "status": success | failed | progress | waiting,
  "message": "hi there"
} 

Pull

GET /api/1/user/app/files

Response Returns a zip file of everything.

Clone this wiki locally