1. 示例项目
7
  • 默认模块
    • 🦊一分钟,了解 Apifox !
    • 示例项目
      • /
        GET
      • Add a new pet to the store
        POST
      • Update an existing pet
        PUT
      • Finds Pets by status
        GET
      • Find pet by ID
        GET
      • Deletes a pet
        DELETE
    • a
    • pet
      • uploads an image
      • Finds Pets by tags
      • Updates a pet in the store with form data
    • store
      • Returns pet inventories by status
      • Place an order for a pet
      • Find purchase order by ID
      • Delete purchase order by ID
    • user
      • Creates list of users with given input array
      • Get user by user name
      • Updated user
      • Delete user
      • Logs user into the system
      • Logs out current logged in user session
      • Creates list of users with given input array
      • Create user
    • df
    • baidu
      GET
    • knife4j
      GET
    • a
      GET
    • c
      GET
    • 数据模型
      • 示例数据模型
      • Schemas
        • ApiResponse
        • Pet
        • Category
        • Tag
        • Order
        • User
      • RequestBodies
        • UserArray
      • test
  • test
    • lll
      GET
  1. 示例项目

Find pet by ID

GET
/pet/{petId}
Returns a single pet

请求参数

Authorization
API Key
在 header 添加参数
api_key
示例:
api_key: ********************
or
Path 参数

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/pet/' \
--header 'api_key: <api-key>'

返回响应

🟢200成功
application/json
successful operation
Bodyapplication/json

示例
{
    "id": 0,
    "category": {
        "id": 0,
        "name": "string"
    },
    "name": "doggie",
    "photoUrls": [
        "string"
    ],
    "tags": [
        {
            "id": 0,
            "name": "string"
        }
    ],
    "status": "available"
}
🟠404记录不存在
🟠400参数不正确
🟠400请求有误
🟠404记录不存在
修改于 2025-07-30 05:49:56
上一页
Finds Pets by status
下一页
Deletes a pet
Built with