ユーザー API(people)
ネストした住所、緯度経度、会社を含む詳しいユーザープロフィール。場所は /api/people で、旧 /api/user エンドポイントとは別です。メモリ上の固定データで、書き込みはアプリの再起動まで残ります。ネストした住所、緯度経度、会社を含む詳しいユーザープロフィール。場所は … で、旧 … エンドポイントとは別です。メモリ上の固定データで、書き込みはアプリの再起動まで残ります。
あなたのアカウントでこれらのエンドポイントが使えます。各エンドポイントのページの Try it でリクエストを送れます。
- GET
https://api.testingapis.com/api/PeopleList people with filtering, sorting, search and paginationList people with filtering, sorting, search and pagination. - POST
https://api.testingapis.com/api/PeopleCreate a personCreate a person. - GETHEAD
https://api.testingapis.com/api/People/{id}Get a person by IDGet a person by ID (HEAD returns the headers only). - PUT
https://api.testingapis.com/api/People/{id}Replace a personReplace a person. - PATCH
https://api.testingapis.com/api/People/{id}Partially update a person with a JSON merge patchPartially update a person with a JSON merge patch. - DELETE
https://api.testingapis.com/api/People/{id}Delete a personDelete a person. - POST
https://api.testingapis.com/api/People/bulkCreate up to 100 people in one requestCreate up to 100 people in one request. - DELETE
https://api.testingapis.com/api/People/bulkDelete several people by IDDelete several people by ID. - GET
https://api.testingapis.com/api/People/countCount all peopleCount all people.
リクエストの例
List people with filtering, sorting, search and pagination. 完全なリファレンスと Send ボタン(英語).
cURL
curl -X GET "https://api.testingapis.com/api/People?limit=2"レスポンス · 200 OK
[
{
"id": 1,
"firstName": "Aisha",
"lastName": "Khan",
"username": "akhan",
"email": "akhan@example.com",
"gender": "female",
"dateOfBirth": "1991-04-12",
"phone": "+1-555-200-3000",
"avatar": "https://i.pravatar.cc/150?img=1",
"address": {
… (3 more lines)サインインして詳細を見る
これらのエンドポイントのパラメータ、リクエストとレスポンスの例、ライブの Try it パネルは、サインインしたメンバー向けです。アカウントは無料で、数秒で作成できます。
絞り込み、並べ替え、ページネーション
一覧エンドポイントは limit、page、offset、sort、order、q を受け付け、任意のフィールド名を完全一致の絞り込みに使えます。件数は X-Total-Count ヘッダーで返ります。書き込みはサーバーを再起動するまでメモリに残るので、テストで自由にレコードを作成・変更・削除できます。 クエリパラメータのリファレンス.