Build API Docs with Apidog
  1. Example: Pet Store
Build API Docs with Apidog
  • Overview
  • REST API Documentations
    • Basics
      • API-Design First Approach
      • Specify an endpoint
      • Components
      • Common parameters
      • Global parameters
      • Schemas
        • Overview
        • Create a new schema
        • Build a schema
        • Generate Schemas from JSON etc.
    • Advanced features
      • Custom endpoint fields
      • Endpoint status
      • Appearance of parameter lists
      • Endpoint unique idenfication
    • Example: Pet Store
      • Get user info
        GET
      • Find pet by ID
        GET
      • Add a new pet to the store
        POST
      • Update an existing pet
        PUT
      • Deletes a pet
        DELETE
      • Finds Pets by status
        GET
  • SOAP API Documentations
    • How to Use Apidog to Write SOAP API Documentation
    • Example: WebService
      • WebService: Number To Words
      • SOAP: Add integers
      • SOAP/WSDL: Ebay
    • Example: Mastercard
      • Purchase Request
      • Submit a purchase request
  • GraphQL Documentation
    • How to Write GraphQL API Documentation Using Apidog
    • Example: Github
      • Introduction to GraphQL
      • Queries
      • Public schema
  • WebSocket Documentations
    • How to Use Apidog to Write WebSocket API Documentation
    • Example: Coinbase
      • Overview
      • Channel
  • SSE API Documentations
    • Example: Anthropic
      • Streaming Messages
      • Messages
  • gRPC API Documentations
    • How to Use Apidog for gRPC API Documentation and Testing
    • Example: Proto Documentation
      • Protocol Documentation
  1. Example: Pet Store

Finds Pets by status

GET
/pet/findByStatus
pet
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/pet/findByStatus?status'
Response Response Example
200 - Success example
{
  "code": 0,
  "data": [
    {
      "name": "Hello Kitty",
      "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"
    }
  ]
}

Request

Query Params
status
string 
required
Status values that need to be considered for filter

Responses

🟢200OK
application/json
Body
array of:
id
integer <int64>
required
Pet ID
>= 1
category
object (Category) 
required
group
id
integer <int64>
optional
Category ID
>= 1
name
string 
optional
Category Name
name
string 
required
name
Example:
doggie
photoUrls
array[string]
required
image URL
tags
array[object (Tag) {2}] 
required
tag
id
integer <int64>
optional
Tag ID
>= 1
name
string 
optional
Tag Name
status
enum<string> 
required
Pet Sales Status
Allowed values:
availablependingsold
🟠400Invalid status value
Previous
Deletes a pet
Next
How to Use Apidog to Write SOAP API Documentation
Built with