Thursday 9 April 2020

webservice URL which returns 200 HTTP response code - PETSTORE

Note : If using IIB for POC's and SSL is not configured to your local broker, it may throw SSL error, Please change the url from https to http it starts working.

1. Add a pet in petstore

HTTP method : POST

URL : https://petstore.swagger.io/v2/pet

Request :

{
  "id": 91643488483,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "dog",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

2. Update existing pet details

HTTP method : POST

URL : https://petstore.swagger.io/v2/pet

Request Message :

{
  "id": 91643488483,
  "category": {
    "id": 0,
    "name": "string"
  },
  "name": "sonu beta",
  "photoUrls": [
    "string"
  ],
  "tags": [
    {
      "id": 0,
      "name": "string"
    }
  ],
  "status": "available"
}

3. Find a pet by its status (available,pending,sold)

HTTP method : GET

URL : https://petstore.swagger.io/v2/pet/findByStatus?status=available


4. Find a pet by its ID

HTTP method : GET

URL : https://petstore.swagger.io/v2/pet/91643488482

5. Oder pet through store 

HTTP method : POST

URL : https://petstore.swagger.io/v2/store/order

Request message
{
  "id": 91643488482,
  "petId": 0,
  "quantity": 1,
  "shipDate": "2020-04-09T07:50:20.280Z",
  "status": "placed",
  "complete": true

}



No comments:

Post a Comment