Suggesting the codes for RESTful API including filter/annotator for allowing user access and validating input data, user management, data management and some utils such as protecting data using 128/256-bit AES encryption and so on.
Please take a look at readme to see release note.
The followings are quick guides:
A. Preparing development environment
B. Quick guide how to run RESTful using this project
C. Customizing for your project (in progress)
- /restful/user/signup.html
- /restful/user/signin.html
- /restful/user/profile.html
- /restful/user/setting.html
- /restful/user/list.html (admin only)
- /restful/note/create.html
- /restful/note/update.html
- /restful/note/content.html
- /restful/note/list.html
// Creating a user
POST /restful/api/user/signup
Content-Type: application/json
{
"name": "axpower",
"pwd": "*****",
"username": "RESTful",
"role": "User"
}
// Signing in
POST /restful/api/user/signin
Content-Type: application/json
{
"name": "axpower",
"pwd": "*****"
}
// Signing out
GET /restful/api/user/signout
Content-Type: application/json
// Retrieving my information
GET /restful/api/user/profile
Content-Type: application/json
// Updating a user
PUT /restful/api/user
Content-Type: application/json
{
"name": "axpower",
"username": "Web service"
}
// Deleting a user
DELETE /restful/api/user
Content-Type: application/json
{
"name": "axpower"
}
// Retrieving a user (admin only)
GET /restful/api/user/ax
Content-Type: application/json
// Retrieving a list of user with paging and search query (admin only)
GET /restful/api/user/list
GET /restful/api/user/list?pn=1
GET /restful/api/user/list?pn=1&q=ax
Content-Type: application/json
// Creating a note
POST /restful/api/note
Content-Type: application/json
{
"subject": "Hello",
"content": "Nice to meet you!"
}
// Updating a note
PUT /restful/api/note
Content-Type: application/json
{
"idx": 1,
"subject": "Hello",
"content": "It's really nice to meet you."
}
// Deleting a note
DELETE /restful/api/note
Content-Type: application/json
{
"idx": 1
}
// Retrieving a note
GET /restful/api/note/1
Content-Type: application/json
// Retrieving a list of note with paging and search query
GET /restful/api/note/list
GET /restful/api/note/list?pn=1
GET /restful/api/note/list?pn=1&q=hello
Content-Type: application/json