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 dark cover
    • Page with cover and no TOC
    • Page with hero cover
    • Page with repositioned 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
    • Icons
    • Links
    • Buttons
    • Page links
    • API blocks
    • Math
    • Files
    • Embeds
    • Lists
    • Stepper
    • Columns
    • Expressions
Powered by GitBook
On this page
Export as PDF
  1. Blocks

API blocks

PreviousPage linksNextMath

Last updated 3 months ago

CtrlK

A first block:

Webhooks :

Models:

  • 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 ยท int64OptionalExample: 10
namestringRequiredExample: doggie
photoUrlsstring[]Required
statusstring ยท enumOptional

pet status in the store

Possible values:
Responses
200

Successful operation

400

Invalid input

422

Validation exception

default

Unexpected error

post

Update an existing pet.

put

Update an existing pet by Id.

Authorizations
Body
idinteger ยท int64OptionalExample: 10
namestringRequiredExample: doggie
photoUrlsstring[]Required
statusstring ยท enumOptional

pet status in the store

Possible values:
Responses
200

Successful operation

400

Invalid ID supplied

404

Pet not found

422

Validation exception

default

Unexpected error

put

Finds Pets by status.

get

Multiple status values can be provided with comma separated strings.

Authorizations
Query parameters
statusstring ยท enumOptional

Status values that need to be considered for filter

Default: availablePossible values:
Responses
200

successful operation

400

Invalid status value

default

Unexpected error

get

Deletes a pet.

delete

Delete a pet.

Authorizations
Path parameters
petIdinteger ยท int64Required

Pet id to delete

Header parameters
api_keystringOptional
Responses
200

Pet deleted

400

Invalid pet value

default

Unexpected error

delete
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}
{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}
[
  {
    "id": 10,
    "name": "doggie",
    "category": {
      "id": 1,
      "name": "Dogs"
    },
    "photoUrls": [
      "text"
    ],
    "tags": [
      {
        "id": 1,
        "name": "text"
      }
    ],
    "status": "available"
  }
]

No content

POST /api/v3/pet HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 133

{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}
PUT /api/v3/pet HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 133

{
  "id": 10,
  "name": "doggie",
  "category": {
    "id": 1,
    "name": "Dogs"
  },
  "photoUrls": [
    "text"
  ],
  "tags": [
    {
      "id": 1,
      "name": "text"
    }
  ],
  "status": "available"
}
GET /api/v3/pet/findByStatus HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
DELETE /api/v3/pet/{petId} HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*

newPet

Payload
idinteger ยท int64Required
namestringRequired
tagstringOptional
Responses
200

Return a 200 status to indicate that the data was received successfully

Payload

{
  "id": 1,
  "name": "text",
  "tag": "text"
}