InterviewDB
Experience
Backend Assignment Interview: Build a REST API for a Task Management Service
Interview Experience
Round 1 Coding
Problem
You are given a take-home backend assignment. Implement a REST API for a task management service with the following requirements:
POST /tasks— create a task withtitle,description,status(todo/in_progress/done),due_dateGET /tasks— list all tasks; support filtering bystatusand sorting bydue_dateGET /tasks/{id}— retrieve a single taskPATCH /tasks/{id}— update task fieldsDELETE /tasks/{id}— delete a task
python
# Expected request body for POST /tasks
{
"title": "Write tests",
"description": "Cover all edge cases",
"status": "todo",
"due_date": "2025-06-01"
}
Example
POST /tasks -> 201 {"id": 1, "title": "Write tests", ...}
GET /tasks?status=todo&sort=due_date -> [{...}, ...]
PATCH /tasks/1 -> 200 {"id": 1, "status": "done", ...}
DELETE /tasks/1 -> 204
Follow-ups
- How do you validate the
due_dateformat and reject invalid status values? - What HTTP status codes do you return for a missing task or bad request body?
- How would you add user authentication so each user only sees their own tasks?
- Describe how you would write integration tests for the
PATCHendpoint.
Full Details
Round 1 Coding
Problem
You are given a take-home backend assignment. Implement a REST API for a task management service with the following requirements:
POST /tasks— create a task withtitle,description,status(todo/in_progress/done),due_dateGET /tasks— list all tasks; support filtering bystatusand sorting bydue_dateGET /tasks/{id}— retrieve a single taskPATCH /tasks/{id}— update task fieldsDELETE /tasks/{id}— delete a task
python
# Expected request body for POST /tasks
{
"title": "Write tests",
"description": "Cover all edge cases",
"status": "todo",
"due_date": "2025-06-01"
}
Example
POST /tasks -> 201 {"id": 1, "title": "Write tests", ...}
GET /tasks?status=todo&sort=due_date -> [{...}, ...]
PATCH /tasks/1 -> 200 {"id": 1, "status": "done", ...}
DELETE /tasks/1 -> 204
Follow-ups
- How do you validate the
due_dateformat and reject invalid status values? - What HTTP status codes do you return for a missing task or bad request body?
- How would you add user authentication so each user only sees their own tasks?
- Describe how you would write integration tests for the
PATCHendpoint.
Free preview. Unlock all Glean questions →
About This Question
This is a candidate experience report from a glean interview for a backend role during the onsite round.
More Glean Interview Questions
1p3a
fulltime machine learning onsite interview experience at glean sf office
1p3a
glean software engineer tech phone screen interview experience
InterviewDB
Glean SWE Phone - Array Compression
1p3a
Glean Backend Engineer Interview Experience and Rejection Discussion
1p3a
Glean Tech Phone Screen Problem: Document Processing and Node Allocation