Journal¶
Create Journal Entry¶
Endpoint: POST /journal/entry
Description: Create a new journal entry.
Request Body:
{
"title": "My Day",
"date": "2025-11-27T10:00:00Z",
"category": "Food",
"mood": "Happy",
"photos": ["https://example.com/photo1.jpg"],
"thoughts": "Today was a great day! I ate Bole and Fish."
}
Response: 201 Created
Delete Journal Entry¶
Endpoint: DELETE /journal/{entry_id}
Description: Delete a specific journal entry.
Response: 204 No Content
Edit Journal Entry¶
Endpoint: PATCH /journal/{entry_id}
Description: Edit a specific journal entry.
Request Body:
Response: 200 OK
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "My Awesome Day",
"content": "Today was a great day! I ate Bole and Fish.",
"mood": "Happy",
"entry_date": "2025-11-27T10:00:00Z",
"created_at": "2025-11-27T10:00:00Z",
"updated_at": "2025-11-27T10:00:00Z",
"category_id": "category_uuid"
}
Get Journal Entries by Category¶
Endpoint: GET /journal/by-category
Description: Retrieves journal entries by category with pagination.
Query Parameters:
- category (string): Category name to search for
- limit (integer): Number of entries to return
- offset (integer): Number of entries to skip
Response: 200 OK
{
"entries": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "My Day",
"content": "Today was a great day! I ate Bole and Fish.",
"mood": "Happy",
"entry_date": "2025-11-27T10:00:00Z",
"created_at": "2025-11-27T10:00:00Z",
"updated_at": "2025-11-27T10:00:00Z",
"category_id": "category_uuid"
}
],
"total": 1,
"limit": 10,
"offset": 0
}
Get All Journal Entries¶
Endpoint: GET /journal/entries
Description: Get all journal entries for a user.
Query Parameters:
- limit (integer): Number of entries to return
- offset (integer): Number of entries to skip
- sort_by (string): Field to sort by (entry_date or created_at)
- order (string): Sort order (asc or desc)
Response: 200 OK
{
"entries": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "My Day",
"content": "Today was a great day! I ate Bole and Fish.",
"mood": "Happy",
"entry_date": "2025-11-27T10:00:00Z",
"created_at": "2025-11-27T10:00:00Z",
"updated_at": "2025-11-27T10:00:00Z",
"category_id": "category_uuid"
}
],
"total": 1,
"limit": 10,
"offset": 0
}