data

//get -- get all tutorials
GET
http://localhost/demo/index.php/api/data/tt/tutorials

//get --- get tutorial id = 1
 GET 
http://localhost/demo/index.php/api/data/tt/tutorials/1

//get -- get tutorial cate = C++
 GET 
http://localhost/demo/index.php/api/data/tt/tutorials/cate/Cplusplus

//post - create a tutorial
POST 
http://localhost/demo/index.php/api/data/tt/tutorials
ContentType: application/json
body
{	"id":"6",
	"name":"Asp.net CRUD tutorial",
	"cate":"Asp.net",
	"author":"tt",
	"content":"this is a demo",
	"date":"2015-04-07 00:33:39"
}

//put --- update one tutorial
PUT
http://localhost/demo/index.php/api/data/tt/tutorials/6
{	"id":"6",
	"name":"Asp.net CRUD tutorial",
	"cate":"Asp.net",
	"author":"xx",
	"content":"this is a demo",
	"date":"2015-04-07 00:33:39"
}

//delete --- delete a tutorial
DELETE
http://localhost/demo/index.php/api/data/tt/tutorials/7


file

//post --- upload a file
POST
http://localhost/demo/index.php/api/file/upload
Content-Disposition : attachment; filename=/repository/Evils.doc
/repository/Evils.doc

//post --- upload a file with update the database
POST
http://localhost/demo/index.php/api/file/upload/tt/tutorials/6
Content-Disposition : attachment; filename=/repository/file.txt
/repository/file.txt




//get --- download a file
GET
http://localhost/demo/index.php/api/file/download/file.txt

//delete -- delete a file
DELETE
http://localhost/demo/index.php/api/file/delete/file.txt