- Core API's
- >
- Albums API Documentation
Albums API Documentation
A Simple to use CRUD API for your Albums application. This API is ready to use with any frontend/backend framework or language.
Endpoints
Name | Endpoint | Method | Copy |
---|---|---|---|
Album List | /api/albums | GET | |
Album Detail | /api/albums/1 | GET | |
Album Create | /api/albums | POST | |
Album Update | /api/albums/1 | PUT | |
Album Delete | /api/albums/1 | DELETE |
How to Use
Album List API
fetch('https://simplecrudapi.com/api/albums')
.then(response => response.json())
.then(data => console.log(data)})
.catch(error => console.error(error)});
Album Detail API
fetch('https://simplecrudapi.com/api/albums/1')
.then(response => response.json())
.then(data => console.log(data)})
.catch(error => console.error(error)});
Album Create API
fetch('https://simplecrudapi.com/api/albums', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'title': 'Greatest Hits',
'description': 'A compilation of the most popular tracks.',
'release_date': '2024-11-10'
})
})
.then(response => response.json())
.then(data => console.log(data)})
.catch(error => console.error(error)});
Album Update API
fetch('https://simplecrudapi.com/api/albums/1', {
method: 'PUT',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
'title': 'Updated Greatest Hits',
'description': 'An updated compilation of the most popular tracks.',
'release_date': '2024-11-11'
})
})
.then(response => response.json())
.then(data => console.log(data)})
.catch(error => console.error(error)});
Album Delete API
fetch('https://simplecrudapi.com/api/albums/1', {
method: 'DELETE',
headers: {
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data)})
.catch(error => console.error(error)});
Code Sandbox Demos
No Code sandbox demos found yet!
No demos found, You can create a demo and contact us to put that with your credit link.
Contact UsOr,
Browse All Code sandbox Demos