API post
Post blog yang ditulis pengguna 101-110, dengan tag, like, dan komentar bersarang. Data tetap di memori: penulisan bertahan sampai aplikasi dimulai ulang.
Gratis: endpoint ini tidak butuh akun.
- GET
https://api.testingapis.com/api/PostsList posts with filtering, sorting, search and pagination. - POST
https://api.testingapis.com/api/PostsCreate a post. - GET
https://api.testingapis.com/api/Posts/{id}Get a post by ID. - PUT
https://api.testingapis.com/api/Posts/{id}Update a post. - DELETE
https://api.testingapis.com/api/Posts/{id}Delete a post. - GET
https://api.testingapis.com/api/Posts/{id}/commentsList the comments on a post. - GET
https://api.testingapis.com/api/Posts/user/{userId}List the posts written by a user.
Contoh request
List posts with filtering, sorting, search and pagination. Referensi lengkap dan tombol Send (dalam bahasa Inggris).
cURL
curl -X GET "https://api.testingapis.com/api/Posts?limit=2"Response · 200 OK
[
{
"id": 1,
"userId": 101,
"title": "Getting Started with REST APIs",
"body": "REST APIs are the backbone of modern web applications. In this post, we'll cover the basics of HTTP methods, status codes, and request/re…
"tags": ["api", "tutorial", "beginner"],
"publishedAt": "2025-07-01T14:00:00Z",
"likes": 42
},
{
"id: 2,
… (3 more lines)Filter, pengurutan, dan paginasi
Endpoint daftar menerima limit, page, offset, sort, order, dan q, serta nama field apa pun sebagai filter persis. Totalnya kembali di header X-Total-Count. Penulisan disimpan di memori sampai server dimulai ulang, jadi tes bebas membuat, mengubah, dan menghapus data. Referensi parameter query.