投稿 API
ユーザー 101〜110 が書いたブログ投稿で、タグ、いいね、ネストしたコメント付き。メモリ上の固定データで、書き込みはアプリの再起動まで残ります。
無料:これらのエンドポイントはアカウント不要です。
- 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.
リクエストの例
List posts with filtering, sorting, search and pagination. 完全なリファレンスと Send ボタン(英語).
cURL
curl -X GET "https://api.testingapis.com/api/Posts?limit=2"レスポンス · 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)絞り込み、並べ替え、ページネーション
一覧エンドポイントは limit、page、offset、sort、order、q を受け付け、任意のフィールド名を完全一致の絞り込みに使えます。件数は X-Total-Count ヘッダーで返ります。書き込みはサーバーを再起動するまでメモリに残るので、テストで自由にレコードを作成・変更・削除できます。 クエリパラメータのリファレンス.