跳到主要内容

按状态查找宠物

按宠物状态查找宠物列表。

GET https://petstore3.swagger.io/api/v3/pet/findByStatus

示例

cURL
GET "https://petstore3.swagger.io/api/v3/pet/findByStatus?status=available" \
-H "accept: application/json" \
-H "api_key: <YOUR_API_KEY>"

响应

状态码描述
200操作成功
400输入无效
default意外错误
响应示例

200: 操作成功

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

参数

查询参数
参数名类型描述
status字符串待查找宠物的状态。
默认值: available
允许的值: availablependingsold