POST /users/registration/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Cache-Control: no-cache
{
"username":"[email protected]",
"password1":"123456",
"password2":"123456"
}
You expect back the following answer:
{
"username": "[email protected]",
"email": "[email protected]",
"first_name": "",
"last_name": ""
}
POST /users/token/username/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Cache-Control: no-cache
{
"username":"[email protected]",
"password":"123456"
}
You expect back token back:
{
"token": "593117c16294d2112b5106d0979c62623622967c"
}
GET /folders/ HTTP/1.1
Host: localhost:8000
Content-Type: application/json
Authorization: Token 593117c16294d2112b5106d0979c62623622967c
Cache-Control: no-cache
You get the following response back:
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"title": "My boards",
"users": [
{
"id": 1,
"username": "[email protected]",
"first_name": "",
"last_name": "",
"profile": {
"avatar_url": "https://secure.gravatar.com/avatar/baec6e2c742927fafc4e1ada9f5f4995.jpg?s=150&r=g&d=mm"
}
}
],
"email": "[email protected]",
"personal": true,
"creator": {
"id": 1,
"username": "[email protected]",
"first_name": "",
"last_name": "",
"profile": {
"avatar_url": "https://secure.gravatar.com/avatar/baec6e2c742927fafc4e1ada9f5f4995.jpg?s=150&r=g&d=mm"
}
},
"new_boards_allowed": true
}
]
}