Notes Endpoints
Get Filtered Notes
Retrieve notes filtered by category, group, or archived status
GET
/
api
/
notes
Get Filtered Notes
curl --request GET \
--url https://arfan-notes.val.run/api/notesimport requests
url = "https://arfan-notes.val.run/api/notes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://arfan-notes.val.run/api/notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://arfan-notes.val.run/api/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://arfan-notes.val.run/api/notes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://arfan-notes.val.run/api/notes")
.asString();require 'uri'
require 'net/http'
url = URI("https://arfan-notes.val.run/api/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"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
string
Filter notes by category. Valid values:
css, val-town, prompts, notes, chat-gpt, cursor-chats, bash-commandsstring
Filter notes by group. Valid values:
first, second, third, fourth, fifthboolean
Filter by archived status. Valid values:
true, falseExamples
curl -X GET "https://arfan-notes.val.run/api/notes?category=css" \
-H "Content-Type: application/json"
curl -X GET "https://arfan-notes.val.run/api/notes?group=first" \
-H "Content-Type: application/json"
curl -X GET "https://arfan-notes.val.run/api/notes?archived=false" \
-H "Content-Type: application/json"
curl -X GET "https://arfan-notes.val.run/api/notes?category=css&group=first&archived=false" \
-H "Content-Type: application/json"
// Filter by category and group
const response = await fetch('https://arfan-notes.val.run/api/notes?category=css&group=first', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const filteredNotes = await response.json();
console.log(filteredNotes);
import requests
# Filter by multiple parameters
params = {
'category': 'val-town',
'archived': 'false'
}
response = requests.get('https://arfan-notes.val.run/api/notes', params=params)
filtered_notes = response.json()
print(filtered_notes)
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
Get Filtered Notes
curl --request GET \
--url https://arfan-notes.val.run/api/notesimport requests
url = "https://arfan-notes.val.run/api/notes"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://arfan-notes.val.run/api/notes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://arfan-notes.val.run/api/notes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://arfan-notes.val.run/api/notes"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://arfan-notes.val.run/api/notes")
.asString();require 'uri'
require 'net/http'
url = URI("https://arfan-notes.val.run/api/notes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body[
{
"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"
}
]