Skip to main content
GET
/
api
/
notes
Get Filtered Notes
curl --request GET \
  --url https://arfan-notes.val.run/api/notes
[
  {
    "id": 1,
    "title": "CSS Grid Layout",
    "content": "CSS Grid is a powerful layout system that allows you to create complex layouts with ease...",
    "category": "css",
    "group": "first",
    "color": "primary",
    "archived": false,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  },
  {
    "id": 15,
    "title": "Flexbox vs Grid",
    "content": "Understanding when to use Flexbox vs CSS Grid...",
    "category": "css",
    "group": "second",
    "color": "info",
    "archived": false,
    "createdAt": "2024-01-20T09:15:00Z",
    "updatedAt": "2024-01-20T09:15:00Z"
  }
]

Get Filtered Notes

Retrieve notes with optional filtering by category, group, and archived status. Use query parameters to filter the results according to your needs.

Query Parameters

category
string
Filter notes by category. Valid values: css, val-town, prompts, notes, chat-gpt, cursor-chats, bash-commands
group
string
Filter notes by group. Valid values: first, second, third, fourth, fifth
archived
boolean
Filter by archived status. Valid values: true, false

Examples

curl -X GET "https://arfan-notes.val.run/api/notes?category=css" \
  -H "Content-Type: application/json"

Response

[
  {
    "id": 1,
    "title": "CSS Grid Layout",
    "content": "CSS Grid is a powerful layout system that allows you to create complex layouts with ease...",
    "category": "css",
    "group": "first",
    "color": "primary",
    "archived": false,
    "createdAt": "2024-01-15T10:30:00Z",
    "updatedAt": "2024-01-15T10:30:00Z"
  },
  {
    "id": 15,
    "title": "Flexbox vs Grid",
    "content": "Understanding when to use Flexbox vs CSS Grid...",
    "category": "css",
    "group": "second",
    "color": "info",
    "archived": false,
    "createdAt": "2024-01-20T09:15:00Z",
    "updatedAt": "2024-01-20T09:15:00Z"
  }
]

Use Cases

  • Category Filtering: Get all notes related to a specific technology or topic
  • Group Filtering: Retrieve notes from a specific organizational group
  • Archived Filtering: Show only active notes or only archived notes
  • Combined Filtering: Use multiple filters to narrow down results precisely
I