#####EndPoints && Functionality
-
POST /auth/login, Logs a user in
-
GET /auth/logout, Logs a user out
-
POST /bucketlists/, Create a new bucket list
-
GET /bucketlists/, List all the created bucket lists
-
GET /bucketlist/, Get single bucket list
-
POST /bucketlist/, Add a new item to this bucket list
-
PUT /bucketlist/, Update this bucket list
-
DELETE /bucketlist/, Delete this single bucket list
####Task 0 - Create API In this task you are required to create the API described above using Rails API. The JSON data model for a bucket list and a bucket list item is shown below.
{
id: 1,
name: “BucketList1”,
items: [
{
id: 1,
name: “I need to do X”,
date_created: “2015-08-12 11:57:23”,
date_modified: “2015-08-12 11:57:23”,
done: False
}
],
date_created: “2015-08-12 11:57:23”,
date_modified: “2015-08-12 11:57:23”,
created_by: “1113456”
}
####Task 1 - Implement Token Based Authentication For this task, you are required to implement Token Based Authentication for the API such that some methods are not accessible via unauthenticated users. Access control mapping is listed below.
#####EndPoints && Public Access
-
POST /auth/login, TRUE
-
GET /auth/logout, FALSE
-
POST /bucketlists/, FALSE
-
GET /bucketlists/, TRUE
-
GET /bucketlist/, FALSE
-
POST /bucketlist/, FALSE
-
PUT /bucketlist/, FALSE
-
DELETE /bucketlist/, FALSE
Note: GET /bucketlists/ should return an array of bucketlist containing name and id only.
####Task 2 - Version your API
To read the documentation and interact with the API, Click here