メインコンテンツまでスキップ

ID でペットを検索する

一意の ID を使用してペットを検索します。

GET https://petstore3.swagger.io/api/v3/pet/{petId}

cURL
GET "https://petstore3.swagger.io/api/v3/pet/210" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

レスポンス

コード説明
200操作成功
400指定された ID が無効です
404ペットが見つかりません
default予期せぬエラー
レスポンス例

200: 操作成功

Response
{
"id": 210,
"name": "Krypto",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"文字列"
],
"tags": [
{
"id": 0,
"name": "文字列"
}
],
"status": "available"
}

パラメータ

パスパラメータ
名前タイプ説明
petId整数取得するペットの ID