logo

Swagger Petstore (1.0.5)

logo

  • Authentication
  • pet
    • post uploads an image
    • post Add a new pet to the store
    • put Update an existing pet
    • get Finds Pets by status
    • get Finds Pets by tags
    • get Find pet by ID
    • post Updates a pet in the store with form data
    • delete Deletes a pet
  • store
    • post Place an order for a pet
    • get Find purchase order by ID
    • delete Delete purchase order by ID
    • get Returns pet inventories by status
  • user
    • post Creates list of users with given input array
    • post Creates list of users with given input array
    • get Get user by user name
    • put Updated user
    • delete Delete user
    • get Logs user into the system
    • get Logs out current logged in user session
    • post Create user

Built with API HTML

Swagger Petstore (1.0.5) swagger 2 source

This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.

Authentication

API key

An API key is a special token (api_key) that you need to provide in header when making API calls, Like: { api_key: "TOKEN_VALUE" }

OAuth 2.0

OAuth is an open standard for access delegation, commonly used as a way for Internet users to grant websites or applications access to their information on other websites but without giving them the passwords

Oauth Server Details

Authorization URL https://petstore.swagger.io/oauth/authorize
Token URL
Flow implicit

Scopes

read:pets read your pets
write:pets modify pets in your account

pet

uploads an image

post https://petstore.swagger.io/v2 /pet/{petId}/uploadImage Try Out

  • Request
  • Response
  • Coding

path

petId REQUIRED

integer

ID of pet to update

formData

additionalMetadata OPTIONAL

string

Additional data to pass to server

file OPTIONAL

file

file to upload

200

successful operation

Example Value | Model

{
    "code": "",
    "type": "",
    "message": ""
}
  • code Integer
  • type String
  • message String
cURL JavaScript Node Python
curl --request POST \
  --url https://petstore.swagger.io/v2/pet/{petId}/uploadImage \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --form 'additionalMetadata=Something' \
  --form 'file=@FILE'
fetch('https://petstore.swagger.io/v2/pet/{petId}/uploadImage', { 
    method: 'POST', 
    headers: {
        "Content-Type": "application/x-www-form-urlencoded"
    }, 
    body: 'additionalMetadata=Something&file=@FILE', 
}) 
.then(e => e.json()) 
.then((data) => { 
    console.log('Request succeeded with JSON response', data); 
}) 
.catch((error) => { 
    console.log('Request failed', error); 
});
const request = require('request');
 
const options = { 
    method: 'POST', 
    url: 'https://petstore.swagger.io/v2/pet/{petId}/uploadImage', 
    qs: {"additionalMetadata": "Something","file": "@FILE"}, 
    headers: {"Content-Type": "application/x-www-form-urlencoded"}, 
};
 
request(options, function (error, response, body) { 
    if (error) throw new Error(error);
 
    console.log(body); 
});
import requests

url = "https://petstore.swagger.io/v2/pet/{petId}/uploadImage"

headers = {
    "Content-Type": "application/x-www-form-urlencoded"
}

body = {
    "additionalMetadata": "Something",
    "file": "@FILE"
}

response = requests.POST(url, headers=headers)

Add a new pet to the store

post https://petstore.swagger.io/v2 /pet Try Out

  • Request
  • Response
  • Coding

body

body REQUIRED

Pet object that needs to be added to the store

Example Value | Model

{
    "id": "",
    "category": {
        "id": "",
        "name": ""
    },
    "name": "doggie",
    "photoUrls": [
        ""
    ],
    "tags": [
        {
            "id": "",
            "name": ""
        }
    ],
    "status": ""
}
  • id Integer
  • category Object
    • id Integer
    • name String
  • name String Example: doggie
  • photoUrls Array
    • tags Array
      • id Integer
      • name String
    • status String Enum: Description: pet status in the store
    405

    Invalid input

    Example Value | Model

    ""
      cURL JavaScript Node Python
      curl --request POST \
        --url https://petstore.swagger.io/v2/pet \
        --body '{"id":"","category":{"id":"","name":""},"name":"doggie","photoUrls":[""],"tags":[{"id":"","name":""}],"status":""}'
      fetch('https://petstore.swagger.io/v2/pet', { 
          method: 'POST', 
          body: {
              "id": "",
              "category": {
                  "id": "",
                  "name": ""
              },
              "name": "doggie",
              "photoUrls": [
                  ""
              ],
              "tags": [
                  {
                      "id": "",
                      "name": ""
                  }
              ],
              "status": ""
          }, 
      }) 
      .then(e => e.json()) 
      .then((data) => { 
          console.log('Request succeeded with JSON response', data); 
      }) 
      .catch((error) => { 
          console.log('Request failed', error); 
      });
      const request = require('request');
       
      const options = { 
          method: 'POST', 
          url: 'https://petstore.swagger.io/v2/pet', 
          body: {
              "id": "",
              "category": {
                  "id": "",
                  "name": ""
              },
              "name": "doggie",
              "photoUrls": [
                  ""
              ],
              "tags": [
                  {
                      "id": "",
                      "name": ""
                  }
              ],
              "status": ""
          }, 
      };
       
      request(options, function (error, response, body) { 
          if (error) throw new Error(error);
       
          console.log(body); 
      });
      import requests
      
      url = "https://petstore.swagger.io/v2/pet"
      
      headers = {
      
      }
      
      body = {
          "id": "",
          "category": {
              "id": "",
              "name": ""
          },
          "name": "doggie",
          "photoUrls": [
              ""
          ],
          "tags": [
              {
                  "id": "",
                  "name": ""
              }
          ],
          "status": ""
      }
      
      response = requests.POST(url, headers=headers, body=body)

      Update an existing pet

      put https://petstore.swagger.io/v2 /pet Try Out

      • Request
      • Response
      • Coding

      body

      body REQUIRED

      Pet object that needs to be added to the store

      Example Value | Model

      {
          "id": "",
          "category": {
              "id": "",
              "name": ""
          },
          "name": "doggie",
          "photoUrls": [
              ""
          ],
          "tags": [
              {
                  "id": "",
                  "name": ""
              }
          ],
          "status": ""
      }
      • id Integer
      • category Object
        • id Integer
        • name String
      • name String Example: doggie
      • photoUrls Array
        • tags Array
          • id Integer
          • name String
        • status String Enum: Description: pet status in the store
        400

        Invalid ID supplied

        Example Value | Model

        ""
          404

          Pet not found

          Example Value | Model

          ""
            405

            Validation exception

            Example Value | Model

            ""
              cURL JavaScript Node Python
              curl --request PUT \
                --url https://petstore.swagger.io/v2/pet \
                --body '{"id":"","category":{"id":"","name":""},"name":"doggie","photoUrls":[""],"tags":[{"id":"","name":""}],"status":""}'
              fetch('https://petstore.swagger.io/v2/pet', { 
                  method: 'PUT', 
                  body: {
                      "id": "",
                      "category": {
                          "id": "",
                          "name": ""
                      },
                      "name": "doggie",
                      "photoUrls": [
                          ""
                      ],
                      "tags": [
                          {
                              "id": "",
                              "name": ""
                          }
                      ],
                      "status": ""
                  }, 
              }) 
              .then(e => e.json()) 
              .then((data) => { 
                  console.log('Request succeeded with JSON response', data); 
              }) 
              .catch((error) => { 
                  console.log('Request failed', error); 
              });
              const request = require('request');
               
              const options = { 
                  method: 'PUT', 
                  url: 'https://petstore.swagger.io/v2/pet', 
                  body: {
                      "id": "",
                      "category": {
                          "id": "",
                          "name": ""
                      },
                      "name": "doggie",
                      "photoUrls": [
                          ""
                      ],
                      "tags": [
                          {
                              "id": "",
                              "name": ""
                          }
                      ],
                      "status": ""
                  }, 
              };
               
              request(options, function (error, response, body) { 
                  if (error) throw new Error(error);
               
                  console.log(body); 
              });
              import requests
              
              url = "https://petstore.swagger.io/v2/pet"
              
              headers = {
              
              }
              
              body = {
                  "id": "",
                  "category": {
                      "id": "",
                      "name": ""
                  },
                  "name": "doggie",
                  "photoUrls": [
                      ""
                  ],
                  "tags": [
                      {
                          "id": "",
                          "name": ""
                      }
                  ],
                  "status": ""
              }
              
              response = requests.PUT(url, headers=headers, body=body)

              Finds Pets by status

              Multiple status values can be provided with comma separated strings

              get https://petstore.swagger.io/v2 /pet/findByStatus Try Out

              • Request
              • Response
              • Coding

              query

              status REQUIRED

              array

              Possible Value: available, pending, sold

              Status values that need to be considered for filter

              200

              successful operation

              Example Value | Model

              ""
                400

                Invalid status value

                Example Value | Model

                ""
                  cURL JavaScript Node Python
                  curl --request GET \
                    --url https://petstore.swagger.io/v2/pet/findByStatus?status=
                  fetch('https://petstore.swagger.io/v2/pet/findByStatus?status=', { 
                      method: 'GET', 
                  }) 
                  .then(e => e.json()) 
                  .then((data) => { 
                      console.log('Request succeeded with JSON response', data); 
                  }) 
                  .catch((error) => { 
                      console.log('Request failed', error); 
                  });
                  const request = require('request');
                   
                  const options = { 
                      method: 'GET', 
                      url: 'https://petstore.swagger.io/v2/pet/findByStatus?status=', 
                  };
                   
                  request(options, function (error, response, body) { 
                      if (error) throw new Error(error);
                   
                      console.log(body); 
                  });
                  import requests
                  
                  url = "https://petstore.swagger.io/v2/pet/findByStatus?status="
                  
                  headers = {
                  
                  }
                  
                  response = requests.GET(url, headers=headers)

                  Finds Pets by tags (Deprecated)

                  Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.

                  get https://petstore.swagger.io/v2 /pet/findByTags Try Out

                  • Request
                  • Response
                  • Coding

                  query

                  tags REQUIRED

                  array

                  Tags to filter by

                  200

                  successful operation

                  Example Value | Model

                  ""
                    400

                    Invalid tag value

                    Example Value | Model

                    ""
                      cURL JavaScript Node Python
                      curl --request GET \
                        --url https://petstore.swagger.io/v2/pet/findByTags?tags=
                      fetch('https://petstore.swagger.io/v2/pet/findByTags?tags=', { 
                          method: 'GET', 
                      }) 
                      .then(e => e.json()) 
                      .then((data) => { 
                          console.log('Request succeeded with JSON response', data); 
                      }) 
                      .catch((error) => { 
                          console.log('Request failed', error); 
                      });
                      const request = require('request');
                       
                      const options = { 
                          method: 'GET', 
                          url: 'https://petstore.swagger.io/v2/pet/findByTags?tags=', 
                      };
                       
                      request(options, function (error, response, body) { 
                          if (error) throw new Error(error);
                       
                          console.log(body); 
                      });
                      import requests
                      
                      url = "https://petstore.swagger.io/v2/pet/findByTags?tags="
                      
                      headers = {
                      
                      }
                      
                      response = requests.GET(url, headers=headers)

                      Find pet by ID

                      Returns a single pet

                      get https://petstore.swagger.io/v2 /pet/{petId} Try Out

                      • Request
                      • Response
                      • Coding

                      path

                      petId REQUIRED

                      integer

                      ID of pet to return

                      200

                      successful operation

                      Example Value | Model

                      {
                          "id": "",
                          "category": {
                              "id": "",
                              "name": ""
                          },
                          "name": "doggie",
                          "photoUrls": [
                              ""
                          ],
                          "tags": [
                              {
                                  "id": "",
                                  "name": ""
                              }
                          ],
                          "status": ""
                      }
                      • id Integer
                      • category Object
                        • id Integer
                        • name String
                      • name String Example: doggie
                      • photoUrls Array
                        • tags Array
                          • id Integer
                          • name String
                        • status String Enum: Description: pet status in the store
                        400

                        Invalid ID supplied

                        Example Value | Model

                        ""
                          404

                          Pet not found

                          Example Value | Model

                          ""
                            cURL JavaScript Node Python
                            curl --request GET \
                              --url https://petstore.swagger.io/v2/pet/{petId}
                            fetch('https://petstore.swagger.io/v2/pet/{petId}', { 
                                method: 'GET', 
                            }) 
                            .then(e => e.json()) 
                            .then((data) => { 
                                console.log('Request succeeded with JSON response', data); 
                            }) 
                            .catch((error) => { 
                                console.log('Request failed', error); 
                            });
                            const request = require('request');
                             
                            const options = { 
                                method: 'GET', 
                                url: 'https://petstore.swagger.io/v2/pet/{petId}', 
                            };
                             
                            request(options, function (error, response, body) { 
                                if (error) throw new Error(error);
                             
                                console.log(body); 
                            });
                            import requests
                            
                            url = "https://petstore.swagger.io/v2/pet/{petId}"
                            
                            headers = {
                            
                            }
                            
                            response = requests.GET(url, headers=headers)

                            Updates a pet in the store with form data

                            post https://petstore.swagger.io/v2 /pet/{petId} Try Out

                            • Request
                            • Response
                            • Coding

                            path

                            petId REQUIRED

                            integer

                            ID of pet that needs to be updated

                            formData

                            name OPTIONAL

                            string

                            Updated name of the pet

                            status OPTIONAL

                            string

                            Updated status of the pet

                            405

                            Invalid input

                            Example Value | Model

                            ""
                              cURL JavaScript Node Python
                              curl --request POST \
                                --url https://petstore.swagger.io/v2/pet/{petId} \
                                --header 'Content-Type: application/x-www-form-urlencoded' \
                                --form 'name=Something' \
                                --form 'status=Something'
                              fetch('https://petstore.swagger.io/v2/pet/{petId}', { 
                                  method: 'POST', 
                                  headers: {
                                      "Content-Type": "application/x-www-form-urlencoded"
                                  }, 
                                  body: 'name=Something&status=Something', 
                              }) 
                              .then(e => e.json()) 
                              .then((data) => { 
                                  console.log('Request succeeded with JSON response', data); 
                              }) 
                              .catch((error) => { 
                                  console.log('Request failed', error); 
                              });
                              const request = require('request');
                               
                              const options = { 
                                  method: 'POST', 
                                  url: 'https://petstore.swagger.io/v2/pet/{petId}', 
                                  qs: {"name": "Something","status": "Something"}, 
                                  headers: {"Content-Type": "application/x-www-form-urlencoded"}, 
                              };
                               
                              request(options, function (error, response, body) { 
                                  if (error) throw new Error(error);
                               
                                  console.log(body); 
                              });
                              import requests
                              
                              url = "https://petstore.swagger.io/v2/pet/{petId}"
                              
                              headers = {
                                  "Content-Type": "application/x-www-form-urlencoded"
                              }
                              
                              body = {
                                  "name": "Something",
                                  "status": "Something"
                              }
                              
                              response = requests.POST(url, headers=headers)

                              Deletes a pet

                              delete https://petstore.swagger.io/v2 /pet/{petId} Try Out

                              • Request
                              • Response
                              • Coding

                              header

                              api_key OPTIONAL

                              string

                              path

                              petId REQUIRED

                              integer

                              Pet id to delete

                              400

                              Invalid ID supplied

                              Example Value | Model

                              ""
                                404

                                Pet not found

                                Example Value | Model

                                ""
                                  cURL JavaScript Node Python
                                  curl --request DELETE \
                                    --url https://petstore.swagger.io/v2/pet/{petId} \
                                    --header 'api_key: Something'
                                  fetch('https://petstore.swagger.io/v2/pet/{petId}', { 
                                      method: 'DELETE', 
                                      headers: {
                                          "api_key": "Something"
                                      }, 
                                  }) 
                                  .then(e => e.json()) 
                                  .then((data) => { 
                                      console.log('Request succeeded with JSON response', data); 
                                  }) 
                                  .catch((error) => { 
                                      console.log('Request failed', error); 
                                  });
                                  const request = require('request');
                                   
                                  const options = { 
                                      method: 'DELETE', 
                                      url: 'https://petstore.swagger.io/v2/pet/{petId}', 
                                      headers: {"api_key": "Something"}, 
                                  };
                                   
                                  request(options, function (error, response, body) { 
                                      if (error) throw new Error(error);
                                   
                                      console.log(body); 
                                  });
                                  import requests
                                  
                                  url = "https://petstore.swagger.io/v2/pet/{petId}"
                                  
                                  headers = {
                                      "api_key": "Something"
                                  }
                                  
                                  response = requests.DELETE(url, headers=headers)

                                  store

                                  Place an order for a pet

                                  post https://petstore.swagger.io/v2 /store/order Try Out

                                  • Request
                                  • Response
                                  • Coding

                                  body

                                  body REQUIRED

                                  order placed for purchasing the pet

                                  Example Value | Model

                                  {
                                      "id": "",
                                      "petId": "",
                                      "quantity": "",
                                      "shipDate": "",
                                      "status": "",
                                      "complete": ""
                                  }
                                  • id Integer
                                  • petId Integer
                                  • quantity Integer
                                  • shipDate String
                                  • status String Enum: Description: Order Status
                                  • complete Boolean
                                  200

                                  successful operation

                                  Example Value | Model

                                  {
                                      "id": "",
                                      "petId": "",
                                      "quantity": "",
                                      "shipDate": "",
                                      "status": "",
                                      "complete": ""
                                  }
                                  • id Integer
                                  • petId Integer
                                  • quantity Integer
                                  • shipDate String
                                  • status String Enum: Description: Order Status
                                  • complete Boolean
                                  400

                                  Invalid Order

                                  Example Value | Model

                                  ""
                                    cURL JavaScript Node Python
                                    curl --request POST \
                                      --url https://petstore.swagger.io/v2/store/order \
                                      --body '{"id":"","petId":"","quantity":"","shipDate":"","status":"","complete":""}'
                                    fetch('https://petstore.swagger.io/v2/store/order', { 
                                        method: 'POST', 
                                        body: {
                                            "id": "",
                                            "petId": "",
                                            "quantity": "",
                                            "shipDate": "",
                                            "status": "",
                                            "complete": ""
                                        }, 
                                    }) 
                                    .then(e => e.json()) 
                                    .then((data) => { 
                                        console.log('Request succeeded with JSON response', data); 
                                    }) 
                                    .catch((error) => { 
                                        console.log('Request failed', error); 
                                    });
                                    const request = require('request');
                                     
                                    const options = { 
                                        method: 'POST', 
                                        url: 'https://petstore.swagger.io/v2/store/order', 
                                        body: {
                                            "id": "",
                                            "petId": "",
                                            "quantity": "",
                                            "shipDate": "",
                                            "status": "",
                                            "complete": ""
                                        }, 
                                    };
                                     
                                    request(options, function (error, response, body) { 
                                        if (error) throw new Error(error);
                                     
                                        console.log(body); 
                                    });
                                    import requests
                                    
                                    url = "https://petstore.swagger.io/v2/store/order"
                                    
                                    headers = {
                                    
                                    }
                                    
                                    body = {
                                        "id": "",
                                        "petId": "",
                                        "quantity": "",
                                        "shipDate": "",
                                        "status": "",
                                        "complete": ""
                                    }
                                    
                                    response = requests.POST(url, headers=headers, body=body)

                                    Find purchase order by ID

                                    For valid response try integer IDs with value >= 1 and <= 10. Other values will generated exceptions

                                    get https://petstore.swagger.io/v2 /store/order/{orderId} Try Out

                                    • Request
                                    • Response
                                    • Coding

                                    path

                                    orderId REQUIRED

                                    integer

                                    ID of pet that needs to be fetched

                                    200

                                    successful operation

                                    Example Value | Model

                                    {
                                        "id": "",
                                        "petId": "",
                                        "quantity": "",
                                        "shipDate": "",
                                        "status": "",
                                        "complete": ""
                                    }
                                    • id Integer
                                    • petId Integer
                                    • quantity Integer
                                    • shipDate String
                                    • status String Enum: Description: Order Status
                                    • complete Boolean
                                    400

                                    Invalid ID supplied

                                    Example Value | Model

                                    ""
                                      404

                                      Order not found

                                      Example Value | Model

                                      ""
                                        cURL JavaScript Node Python
                                        curl --request GET \
                                          --url https://petstore.swagger.io/v2/store/order/{orderId}
                                        fetch('https://petstore.swagger.io/v2/store/order/{orderId}', { 
                                            method: 'GET', 
                                        }) 
                                        .then(e => e.json()) 
                                        .then((data) => { 
                                            console.log('Request succeeded with JSON response', data); 
                                        }) 
                                        .catch((error) => { 
                                            console.log('Request failed', error); 
                                        });
                                        const request = require('request');
                                         
                                        const options = { 
                                            method: 'GET', 
                                            url: 'https://petstore.swagger.io/v2/store/order/{orderId}', 
                                        };
                                         
                                        request(options, function (error, response, body) { 
                                            if (error) throw new Error(error);
                                         
                                            console.log(body); 
                                        });
                                        import requests
                                        
                                        url = "https://petstore.swagger.io/v2/store/order/{orderId}"
                                        
                                        headers = {
                                        
                                        }
                                        
                                        response = requests.GET(url, headers=headers)

                                        Delete purchase order by ID

                                        For valid response try integer IDs with positive integer value. Negative or non-integer values will generate API errors

                                        delete https://petstore.swagger.io/v2 /store/order/{orderId} Try Out

                                        • Request
                                        • Response
                                        • Coding

                                        path

                                        orderId REQUIRED

                                        integer

                                        ID of the order that needs to be deleted

                                        400

                                        Invalid ID supplied

                                        Example Value | Model

                                        ""
                                          404

                                          Order not found

                                          Example Value | Model

                                          ""
                                            cURL JavaScript Node Python
                                            curl --request DELETE \
                                              --url https://petstore.swagger.io/v2/store/order/{orderId}
                                            fetch('https://petstore.swagger.io/v2/store/order/{orderId}', { 
                                                method: 'DELETE', 
                                            }) 
                                            .then(e => e.json()) 
                                            .then((data) => { 
                                                console.log('Request succeeded with JSON response', data); 
                                            }) 
                                            .catch((error) => { 
                                                console.log('Request failed', error); 
                                            });
                                            const request = require('request');
                                             
                                            const options = { 
                                                method: 'DELETE', 
                                                url: 'https://petstore.swagger.io/v2/store/order/{orderId}', 
                                            };
                                             
                                            request(options, function (error, response, body) { 
                                                if (error) throw new Error(error);
                                             
                                                console.log(body); 
                                            });
                                            import requests
                                            
                                            url = "https://petstore.swagger.io/v2/store/order/{orderId}"
                                            
                                            headers = {
                                            
                                            }
                                            
                                            response = requests.DELETE(url, headers=headers)

                                            Returns pet inventories by status

                                            Returns a map of status codes to quantities

                                            get https://petstore.swagger.io/v2 /store/inventory Try Out

                                            • Request
                                            • Response
                                            • Coding
                                            200

                                            successful operation

                                            Example Value | Model

                                            {}
                                              cURL JavaScript Node Python
                                              curl --request GET \
                                                --url https://petstore.swagger.io/v2/store/inventory
                                              fetch('https://petstore.swagger.io/v2/store/inventory', { 
                                                  method: 'GET', 
                                              }) 
                                              .then(e => e.json()) 
                                              .then((data) => { 
                                                  console.log('Request succeeded with JSON response', data); 
                                              }) 
                                              .catch((error) => { 
                                                  console.log('Request failed', error); 
                                              });
                                              const request = require('request');
                                               
                                              const options = { 
                                                  method: 'GET', 
                                                  url: 'https://petstore.swagger.io/v2/store/inventory', 
                                              };
                                               
                                              request(options, function (error, response, body) { 
                                                  if (error) throw new Error(error);
                                               
                                                  console.log(body); 
                                              });
                                              import requests
                                              
                                              url = "https://petstore.swagger.io/v2/store/inventory"
                                              
                                              headers = {
                                              
                                              }
                                              
                                              response = requests.GET(url, headers=headers)

                                              user

                                              Creates list of users with given input array

                                              post https://petstore.swagger.io/v2 /user/createWithArray Try Out

                                              • Request
                                              • Response
                                              • Coding

                                              body

                                              body REQUIRED

                                              List of user object

                                              Example Value | Model

                                              ""
                                                default

                                                successful operation

                                                Example Value | Model

                                                ""
                                                  cURL JavaScript Node Python
                                                  curl --request POST \
                                                    --url https://petstore.swagger.io/v2/user/createWithArray \
                                                    --body '""'
                                                  fetch('https://petstore.swagger.io/v2/user/createWithArray', { 
                                                      method: 'POST', 
                                                      body: "", 
                                                  }) 
                                                  .then(e => e.json()) 
                                                  .then((data) => { 
                                                      console.log('Request succeeded with JSON response', data); 
                                                  }) 
                                                  .catch((error) => { 
                                                      console.log('Request failed', error); 
                                                  });
                                                  const request = require('request');
                                                   
                                                  const options = { 
                                                      method: 'POST', 
                                                      url: 'https://petstore.swagger.io/v2/user/createWithArray', 
                                                      body: "", 
                                                  };
                                                   
                                                  request(options, function (error, response, body) { 
                                                      if (error) throw new Error(error);
                                                   
                                                      console.log(body); 
                                                  });
                                                  import requests
                                                  
                                                  url = "https://petstore.swagger.io/v2/user/createWithArray"
                                                  
                                                  headers = {
                                                  
                                                  }
                                                  
                                                  body = ""
                                                  
                                                  response = requests.POST(url, headers=headers, body=body)

                                                  Creates list of users with given input array

                                                  post https://petstore.swagger.io/v2 /user/createWithList Try Out

                                                  • Request
                                                  • Response
                                                  • Coding

                                                  body

                                                  body REQUIRED

                                                  List of user object

                                                  Example Value | Model

                                                  ""
                                                    default

                                                    successful operation

                                                    Example Value | Model

                                                    ""
                                                      cURL JavaScript Node Python
                                                      curl --request POST \
                                                        --url https://petstore.swagger.io/v2/user/createWithList \
                                                        --body '""'
                                                      fetch('https://petstore.swagger.io/v2/user/createWithList', { 
                                                          method: 'POST', 
                                                          body: "", 
                                                      }) 
                                                      .then(e => e.json()) 
                                                      .then((data) => { 
                                                          console.log('Request succeeded with JSON response', data); 
                                                      }) 
                                                      .catch((error) => { 
                                                          console.log('Request failed', error); 
                                                      });
                                                      const request = require('request');
                                                       
                                                      const options = { 
                                                          method: 'POST', 
                                                          url: 'https://petstore.swagger.io/v2/user/createWithList', 
                                                          body: "", 
                                                      };
                                                       
                                                      request(options, function (error, response, body) { 
                                                          if (error) throw new Error(error);
                                                       
                                                          console.log(body); 
                                                      });
                                                      import requests
                                                      
                                                      url = "https://petstore.swagger.io/v2/user/createWithList"
                                                      
                                                      headers = {
                                                      
                                                      }
                                                      
                                                      body = ""
                                                      
                                                      response = requests.POST(url, headers=headers, body=body)

                                                      Get user by user name

                                                      get https://petstore.swagger.io/v2 /user/{username} Try Out

                                                      • Request
                                                      • Response
                                                      • Coding

                                                      path

                                                      username REQUIRED

                                                      string

                                                      The name that needs to be fetched. Use user1 for testing.

                                                      200

                                                      successful operation

                                                      Example Value | Model

                                                      {
                                                          "id": "",
                                                          "username": "",
                                                          "firstName": "",
                                                          "lastName": "",
                                                          "email": "",
                                                          "password": "",
                                                          "phone": "",
                                                          "userStatus": ""
                                                      }
                                                      • id Integer
                                                      • username String
                                                      • firstName String
                                                      • lastName String
                                                      • email String
                                                      • password String
                                                      • phone String
                                                      • userStatus Integer Description: User Status
                                                      400

                                                      Invalid username supplied

                                                      Example Value | Model

                                                      ""
                                                        404

                                                        User not found

                                                        Example Value | Model

                                                        ""
                                                          cURL JavaScript Node Python
                                                          curl --request GET \
                                                            --url https://petstore.swagger.io/v2/user/{username}
                                                          fetch('https://petstore.swagger.io/v2/user/{username}', { 
                                                              method: 'GET', 
                                                          }) 
                                                          .then(e => e.json()) 
                                                          .then((data) => { 
                                                              console.log('Request succeeded with JSON response', data); 
                                                          }) 
                                                          .catch((error) => { 
                                                              console.log('Request failed', error); 
                                                          });
                                                          const request = require('request');
                                                           
                                                          const options = { 
                                                              method: 'GET', 
                                                              url: 'https://petstore.swagger.io/v2/user/{username}', 
                                                          };
                                                           
                                                          request(options, function (error, response, body) { 
                                                              if (error) throw new Error(error);
                                                           
                                                              console.log(body); 
                                                          });
                                                          import requests
                                                          
                                                          url = "https://petstore.swagger.io/v2/user/{username}"
                                                          
                                                          headers = {
                                                          
                                                          }
                                                          
                                                          response = requests.GET(url, headers=headers)

                                                          Updated user

                                                          This can only be done by the logged in user.

                                                          put https://petstore.swagger.io/v2 /user/{username} Try Out

                                                          • Request
                                                          • Response
                                                          • Coding

                                                          path

                                                          username REQUIRED

                                                          string

                                                          name that need to be updated

                                                          body

                                                          body REQUIRED

                                                          Updated user object

                                                          Example Value | Model

                                                          {
                                                              "id": "",
                                                              "username": "",
                                                              "firstName": "",
                                                              "lastName": "",
                                                              "email": "",
                                                              "password": "",
                                                              "phone": "",
                                                              "userStatus": ""
                                                          }
                                                          • id Integer
                                                          • username String
                                                          • firstName String
                                                          • lastName String
                                                          • email String
                                                          • password String
                                                          • phone String
                                                          • userStatus Integer Description: User Status
                                                          400

                                                          Invalid user supplied

                                                          Example Value | Model

                                                          ""
                                                            404

                                                            User not found

                                                            Example Value | Model

                                                            ""
                                                              cURL JavaScript Node Python
                                                              curl --request PUT \
                                                                --url https://petstore.swagger.io/v2/user/{username} \
                                                                --body '{"id":"","username":"","firstName":"","lastName":"","email":"","password":"","phone":"","userStatus":""}'
                                                              fetch('https://petstore.swagger.io/v2/user/{username}', { 
                                                                  method: 'PUT', 
                                                                  body: {
                                                                      "id": "",
                                                                      "username": "",
                                                                      "firstName": "",
                                                                      "lastName": "",
                                                                      "email": "",
                                                                      "password": "",
                                                                      "phone": "",
                                                                      "userStatus": ""
                                                                  }, 
                                                              }) 
                                                              .then(e => e.json()) 
                                                              .then((data) => { 
                                                                  console.log('Request succeeded with JSON response', data); 
                                                              }) 
                                                              .catch((error) => { 
                                                                  console.log('Request failed', error); 
                                                              });
                                                              const request = require('request');
                                                               
                                                              const options = { 
                                                                  method: 'PUT', 
                                                                  url: 'https://petstore.swagger.io/v2/user/{username}', 
                                                                  body: {
                                                                      "id": "",
                                                                      "username": "",
                                                                      "firstName": "",
                                                                      "lastName": "",
                                                                      "email": "",
                                                                      "password": "",
                                                                      "phone": "",
                                                                      "userStatus": ""
                                                                  }, 
                                                              };
                                                               
                                                              request(options, function (error, response, body) { 
                                                                  if (error) throw new Error(error);
                                                               
                                                                  console.log(body); 
                                                              });
                                                              import requests
                                                              
                                                              url = "https://petstore.swagger.io/v2/user/{username}"
                                                              
                                                              headers = {
                                                              
                                                              }
                                                              
                                                              body = {
                                                                  "id": "",
                                                                  "username": "",
                                                                  "firstName": "",
                                                                  "lastName": "",
                                                                  "email": "",
                                                                  "password": "",
                                                                  "phone": "",
                                                                  "userStatus": ""
                                                              }
                                                              
                                                              response = requests.PUT(url, headers=headers, body=body)

                                                              Delete user

                                                              This can only be done by the logged in user.

                                                              delete https://petstore.swagger.io/v2 /user/{username} Try Out

                                                              • Request
                                                              • Response
                                                              • Coding

                                                              path

                                                              username REQUIRED

                                                              string

                                                              The name that needs to be deleted

                                                              400

                                                              Invalid username supplied

                                                              Example Value | Model

                                                              ""
                                                                404

                                                                User not found

                                                                Example Value | Model

                                                                ""
                                                                  cURL JavaScript Node Python
                                                                  curl --request DELETE \
                                                                    --url https://petstore.swagger.io/v2/user/{username}
                                                                  fetch('https://petstore.swagger.io/v2/user/{username}', { 
                                                                      method: 'DELETE', 
                                                                  }) 
                                                                  .then(e => e.json()) 
                                                                  .then((data) => { 
                                                                      console.log('Request succeeded with JSON response', data); 
                                                                  }) 
                                                                  .catch((error) => { 
                                                                      console.log('Request failed', error); 
                                                                  });
                                                                  const request = require('request');
                                                                   
                                                                  const options = { 
                                                                      method: 'DELETE', 
                                                                      url: 'https://petstore.swagger.io/v2/user/{username}', 
                                                                  };
                                                                   
                                                                  request(options, function (error, response, body) { 
                                                                      if (error) throw new Error(error);
                                                                   
                                                                      console.log(body); 
                                                                  });
                                                                  import requests
                                                                  
                                                                  url = "https://petstore.swagger.io/v2/user/{username}"
                                                                  
                                                                  headers = {
                                                                  
                                                                  }
                                                                  
                                                                  response = requests.DELETE(url, headers=headers)

                                                                  Logs user into the system

                                                                  get https://petstore.swagger.io/v2 /user/login Try Out

                                                                  • Request
                                                                  • Response
                                                                  • Coding

                                                                  query

                                                                  username REQUIRED

                                                                  string

                                                                  The user name for login

                                                                  password REQUIRED

                                                                  string

                                                                  The password for login in clear text

                                                                  200

                                                                  successful operation

                                                                  Example Value | Model

                                                                  ""

                                                                    Headers

                                                                    X-Expires-After string

                                                                    date in UTC when token expires

                                                                    X-Rate-Limit integer

                                                                    calls per hour allowed by the user

                                                                    400

                                                                    Invalid username/password supplied

                                                                    Example Value | Model

                                                                    ""
                                                                      cURL JavaScript Node Python
                                                                      curl --request GET \
                                                                        --url https://petstore.swagger.io/v2/user/login?username=Something&password=Something
                                                                      fetch('https://petstore.swagger.io/v2/user/login?username=Something&password=Something', { 
                                                                          method: 'GET', 
                                                                      }) 
                                                                      .then(e => e.json()) 
                                                                      .then((data) => { 
                                                                          console.log('Request succeeded with JSON response', data); 
                                                                      }) 
                                                                      .catch((error) => { 
                                                                          console.log('Request failed', error); 
                                                                      });
                                                                      const request = require('request');
                                                                       
                                                                      const options = { 
                                                                          method: 'GET', 
                                                                          url: 'https://petstore.swagger.io/v2/user/login?username=Something&password=Something', 
                                                                      };
                                                                       
                                                                      request(options, function (error, response, body) { 
                                                                          if (error) throw new Error(error);
                                                                       
                                                                          console.log(body); 
                                                                      });
                                                                      import requests
                                                                      
                                                                      url = "https://petstore.swagger.io/v2/user/login?username=Something&password=Something"
                                                                      
                                                                      headers = {
                                                                      
                                                                      }
                                                                      
                                                                      response = requests.GET(url, headers=headers)

                                                                      Logs out current logged in user session

                                                                      get https://petstore.swagger.io/v2 /user/logout Try Out

                                                                      • Request
                                                                      • Response
                                                                      • Coding
                                                                      default

                                                                      successful operation

                                                                      Example Value | Model

                                                                      ""
                                                                        cURL JavaScript Node Python
                                                                        curl --request GET \
                                                                          --url https://petstore.swagger.io/v2/user/logout
                                                                        fetch('https://petstore.swagger.io/v2/user/logout', { 
                                                                            method: 'GET', 
                                                                        }) 
                                                                        .then(e => e.json()) 
                                                                        .then((data) => { 
                                                                            console.log('Request succeeded with JSON response', data); 
                                                                        }) 
                                                                        .catch((error) => { 
                                                                            console.log('Request failed', error); 
                                                                        });
                                                                        const request = require('request');
                                                                         
                                                                        const options = { 
                                                                            method: 'GET', 
                                                                            url: 'https://petstore.swagger.io/v2/user/logout', 
                                                                        };
                                                                         
                                                                        request(options, function (error, response, body) { 
                                                                            if (error) throw new Error(error);
                                                                         
                                                                            console.log(body); 
                                                                        });
                                                                        import requests
                                                                        
                                                                        url = "https://petstore.swagger.io/v2/user/logout"
                                                                        
                                                                        headers = {
                                                                        
                                                                        }
                                                                        
                                                                        response = requests.GET(url, headers=headers)

                                                                        Create user

                                                                        This can only be done by the logged in user.

                                                                        post https://petstore.swagger.io/v2 /user Try Out

                                                                        • Request
                                                                        • Response
                                                                        • Coding

                                                                        body

                                                                        body REQUIRED

                                                                        Created user object

                                                                        Example Value | Model

                                                                        {
                                                                            "id": "",
                                                                            "username": "",
                                                                            "firstName": "",
                                                                            "lastName": "",
                                                                            "email": "",
                                                                            "password": "",
                                                                            "phone": "",
                                                                            "userStatus": ""
                                                                        }
                                                                        • id Integer
                                                                        • username String
                                                                        • firstName String
                                                                        • lastName String
                                                                        • email String
                                                                        • password String
                                                                        • phone String
                                                                        • userStatus Integer Description: User Status
                                                                        default

                                                                        successful operation

                                                                        Example Value | Model

                                                                        ""
                                                                          cURL JavaScript Node Python
                                                                          curl --request POST \
                                                                            --url https://petstore.swagger.io/v2/user \
                                                                            --body '{"id":"","username":"","firstName":"","lastName":"","email":"","password":"","phone":"","userStatus":""}'
                                                                          fetch('https://petstore.swagger.io/v2/user', { 
                                                                              method: 'POST', 
                                                                              body: {
                                                                                  "id": "",
                                                                                  "username": "",
                                                                                  "firstName": "",
                                                                                  "lastName": "",
                                                                                  "email": "",
                                                                                  "password": "",
                                                                                  "phone": "",
                                                                                  "userStatus": ""
                                                                              }, 
                                                                          }) 
                                                                          .then(e => e.json()) 
                                                                          .then((data) => { 
                                                                              console.log('Request succeeded with JSON response', data); 
                                                                          }) 
                                                                          .catch((error) => { 
                                                                              console.log('Request failed', error); 
                                                                          });
                                                                          const request = require('request');
                                                                           
                                                                          const options = { 
                                                                              method: 'POST', 
                                                                              url: 'https://petstore.swagger.io/v2/user', 
                                                                              body: {
                                                                                  "id": "",
                                                                                  "username": "",
                                                                                  "firstName": "",
                                                                                  "lastName": "",
                                                                                  "email": "",
                                                                                  "password": "",
                                                                                  "phone": "",
                                                                                  "userStatus": ""
                                                                              }, 
                                                                          };
                                                                           
                                                                          request(options, function (error, response, body) { 
                                                                              if (error) throw new Error(error);
                                                                           
                                                                              console.log(body); 
                                                                          });
                                                                          import requests
                                                                          
                                                                          url = "https://petstore.swagger.io/v2/user"
                                                                          
                                                                          headers = {
                                                                          
                                                                          }
                                                                          
                                                                          body = {
                                                                              "id": "",
                                                                              "username": "",
                                                                              "firstName": "",
                                                                              "lastName": "",
                                                                              "email": "",
                                                                              "password": "",
                                                                              "phone": "",
                                                                              "userStatus": ""
                                                                          }
                                                                          
                                                                          response = requests.POST(url, headers=headers, body=body)
                                                                          Authenticate