curl --request GET \
--url https://api.example.com/interests{
"success": [
{
"id": 123,
"name": "<string>"
}
]
}Retrieve all interests from the system
curl --request GET \
--url https://api.example.com/interests{
"success": [
{
"id": 123,
"name": "<string>"
}
]
}GET /interests
[
{
"id": 1,
"name": "Hiking"
},
{
"id": 2,
"name": "Photography"
},
{
"id": 3,
"name": "Cultural Heritage"
},
{
"id": 4,
"name": "Adventure Sports"
}
]
{
"error": "Database connection failed"
}
const response = await fetch('http://your-api-base-url.com/interests', {
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
});
const interests = await response.json();
console.log(interests);