宠物商店
v2.0.0
  • latest
  • v2.0.0
首页常见问题
开发者中心
  • 更新日志
  • 开放 API
首页常见问题
开发者中心
  • 更新日志
  • 开放 API
v2.0.0
  • latest
  • v2.0.0
  1. 示例项目
  • 商品服务
    • 🦊一分钟,了解 Apifox !
    • 示例项目
      • 查询宠物详情
        GET
      • 新建宠物信息
        POST
      • 修改宠物信息
        PUT
      • 删除宠物信息
        DELETE
      • 根据状态查找宠物列表
        GET
    • Schemas
      • 示例数据模型
        • Pet
        • Category
        • Tag
  1. 示例项目

根据状态查找宠物列表

GET
/pet/findByStatus

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Query Params

Responses

🟢200成功
application/json
Body

🟠400错误的 status 值
Request Request Example
Shell
JavaScript
curl --location --request GET '/pet/findByStatus?status' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - 成功示例
{
    "code": 0,
    "data": [
        {
            "name": "Hello Kity",
            "photoUrls": [
                "http://dummyimage.com/400x400"
            ],
            "id": 3,
            "category": {
                "id": 71,
                "name": "Cat"
            },
            "tags": [
                {
                    "id": 22,
                    "name": "Cat"
                }
            ],
            "status": "sold"
        },
        {
            "name": "White Dog",
            "photoUrls": [
                "http://dummyimage.com/400x400"
            ],
            "id": 3,
            "category": {
                "id": 71,
                "name": "Dog"
            },
            "tags": [
                {
                    "id": 22,
                    "name": "Dog"
                }
            ],
            "status": "sold"
        }
    ]
}
Modified at 2024-08-15 07:00:30
Previous
删除宠物信息
Next
Pet
Built with