E2E Tests GitBook Open
  • Welcome
  • Text page
    • Long text thisisaveryyyylonnnnngwordthatisnotrealisic butit'sok
  • Empty page
  • Page options
    • Page no index
      • Descendant of page no index
    • Page no robots index
      • Descendant of page no robots index
    • Page without TOC
    • Page with description
    • Page with cover
    • Page with cover and no TOC
    • Page with hero cover
    • 馃實Page with emoji
    • Page with icon
      • Cake
      • Ice cream
      • Burger
      • Food
  • Blocks
    • Code
    • Annotations
    • Tabs
    • Hints
    • Integrations
    • Tables
    • Cards
    • Headings
    • Expandables
    • Inline Images
    • Block Images
    • Marks
    • Emojis
    • Links
    • Page links
    • API blocks
    • Math
    • Files
    • Embeds
    • Lists
    • Stepper
Powered by GitBook
On this page
Export as PDF
  1. Blocks

API blocks

PreviousPage linksNextMath

Last updated 1 day ago

A first block:

Webhooks :

Models:

Finds Pets by status.

get

Multiple status values can be provided with comma separated strings.

Authorizations
Query parameters
statusstring 路 enum 路 default: "available"optional

Status values that need to be considered for filter

Options: available, pending, sold
Responses
cURL
JavaScript
Python
HTTP
curl -L \
  --url '/api/v3/pet/findByStatus'
200
400
default
application/json
application/xml
[
  {
    "id": 10,
    "name": "doggie",
    "category": {
      "id": 1,
      "name": "Dogs"
    },
    "photoUrls": [
      "text"
    ],
    "tags": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "status": "available"
  }
]

successful operation

Deletes a pet.

delete

Delete a pet.

Authorizations
Path parameters
petIdinteger 路 int64required

Pet id to delete

Header parameters
api_keystringoptional
Responses
cURL
JavaScript
Python
HTTP
curl -L \
  --request DELETE \
  --url '/api/v3/pet/{petId}'
200
400
default

No body

Pet deleted

idinteger 路 int64optional
Example: 10
namestringrequired
Example: doggie
categoryobjectoptional

photoUrlsstring[]required
tagsobject[]optional

statusstring 路 enumoptional

pet status in the store

Options: available, pending, sold
  • POSTAdd a new pet to the store.
  • PUTUpdate an existing pet.
  • GETFinds Pets by status.
  • DELETEDeletes a pet.

Add a new pet to the store.

post

Add a new pet to the store.

Authorizations
Body
idinteger 路 int64optional
Example: 10
namestringrequired
Example: doggie
categoryobjectoptional

photoUrlsstring[]required
tagsobject[]optional

statusstring 路 enumoptional

pet status in the store

Options: available, pending, sold
Responses
cURL
JavaScript
Python
HTTP
curl -L \
  --request POST \
  --url '/api/v3/pet' \
  --header 'Content-Type: application/json' \
  --data '{
    "id": 10,
    "name": "doggie",
    "category": {
      "id": 1,
      "name": "Dogs"
    },
    "photoUrls": [
      "text"
    ],
    "tags": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "status": "available"
  }'
200
400
422
default
application/json
application/xml
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}

Successful operation

Update an existing pet.

put

Update an existing pet by Id.

Authorizations
Body
idinteger 路 int64optional
Example: 10
namestringrequired
Example: doggie
categoryobjectoptional

photoUrlsstring[]required
tagsobject[]optional

statusstring 路 enumoptional

pet status in the store

Options: available, pending, sold
Responses
cURL
JavaScript
Python
HTTP
curl -L \
  --request PUT \
  --url '/api/v3/pet' \
  --header 'Content-Type: application/json' \
  --data '{
    "id": 10,
    "name": "doggie",
    "category": {
      "id": 1,
      "name": "Dogs"
    },
    "photoUrls": [
      "text"
    ],
    "tags": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "status": "available"
  }'
200
400
404
422
default
application/json
application/xml
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}

Successful operation