- Core API's
- >
- Todos API
- >
- Todos - Show
Todos - Show API
Get the specified Todo.
Method GET
Parameters
Name | Details | Type | Required |
---|---|---|---|
id
|
The ID of the Todo. | integer | Yes |
How to Use
fetch('https://simplecrudapi.com/api/todos/1')
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error(error));
Response
{
"data": {
"id": 1,
"title": "Sample Todo",
"description": "This is a sample todo item",
"completed": true,
"user": {
"id": 1,
"name": "Jhon Doe",
"email": "jhondoe@example.com",
"email_verified_at": "2019-08-24T14:15:22Z",
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
},
"created_at": "2019-08-24T14:15:22Z",
"updated_at": "2019-08-24T14:15:22Z"
}
}
Try Now
fetch('https://simplecrudapi.com/api/todos/1')
.then(response => response.json())
.then(json => console.log(json))
.catch(error => console.error(error));