You are on page 1of 2

API EXERCISE Postman

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

https://petstore.swagger.io/#/pet

1. GET pets by status:


• Available
• Pending
• Sold

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

2. Get pet by ID:


https://petstore.swagger.io/v2/pet/1?ID=1

3. Insert a new PET: POST


POST
https://petstore.swagger.io/v2/pet
Format Type: JSON

Body:

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

4. Update an existing entry: PUT


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

Format Type: JSON

Body:

{
"id": 1,
"category": {
"id": 1,
"name": "Kuki"
}
}

You might also like