To make any request to any of the Endpoints you will have to set Authorization
header to an auth token which will be auto generated whenever you login to https://api-intern.herokuapp.com/
. The auth token will expire in exactly one hour.
go to https://api-intern.herokuapp.com/
Enter admin@admin.com as email and admin123# as password
Get the auth key in the console
Now use this key as authorization header for all the requests
get all the events created
get all the events created
Expected body
format
{
date:Date // yyyy-mm-dd,
eventName:String
}
get all the events between a date range
Expected body
format
{
gte:Date, // yyyy-mm-dd
lte:Date // yyyy-mm-dd
}
delete an event
Expected body
format
{
id:_id // _id you will get from /events
}
update an event
Expected body
format
{
id:_id , // _id you will get from /events
data:{
// modified event details
}
}
all the requests will be made to https://api-intern.herokuapp.com/ through an HTTP server