DocsQuotes
Quotes API
The quotes endpoint provides a dataset of sample quotes, including details like the quote text and author information, ideal for testing and prototyping features in applications that require motivational or inspirational content.
GET
/quotesReturns a paginated list of quotes.
Code Examples
fetch
fetch('https://api.dhanyalvian.my.id/dummy/v1/quotes', {
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));URL
https://api.dhanyalvian.my.id/dummy/v1/quotes
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| page | number | 1 | Page number for pagination. |
| limit | number | 20 | Number of items per page. |
| search | string | — | Search by quote or author. |
Response (200 OK)
{
"meta": {
"reqId": "9574084f-1632-4650-ac3e-718724d2b4fb",
"code": "200"
},
"message": "",
"pagination": {
"page": 1,
"next": 1,
"record": 1,
"totalPage": 1,
"totalRecord": 1
},
"records": [
{
"id": "1",
"quote": "The only way to do great work is to love what you do.",
"author": "Steve Jobs"
}
]
}Try it Yourself
GET
Query Params
page:
limit:
search:
GET
/quotes/:idReturns a single quotes by ID.
Code Examples
fetch
fetch('https://api.dhanyalvian.my.id/dummy/v1/quotes/1', {
headers: { 'Content-Type': 'application/json' }
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));URL
https://api.dhanyalvian.my.id/dummy/v1/quotes/:id
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Required | The unique identifier of the quote. |
Response (200 OK)
{
"meta": {
"reqId": "9674084f-1632-4650-ac3e-718724d2b4fb",
"code": "200"
},
"message": "",
"record": {
"id": "1",
"quote": "The only way to do great work is to love what you do.",
"author": "Steve Jobs"
}
}Error Response
{
"meta": {
"reqId": "4a16367e-66bc-4d5c-8ac1-c7e2eb294724",
"code": "400"
},
"message": "Data not found"
}Try it Yourself
GET