Everything about your Pets
API Catalog///
- Petsstore
Train Travel API
- Updates a pets in the store with form data
Add a new pets to the store
Update an existing pets
Finds pets by status
Finds pets by tags
Find pets by ID
Deletes a pets
Uploads an image
Updates a pets in the sto...
Swagger Petsstore - OpenAPI 3.0 (1.0.20-SNAPSHOT)
This is a sample Pets Store Server based on the OpenAPI 3.0 specification. You can find out more about Swagger at http://swagger.io. In the third iteration of the pets store, we've switched to the design first approach! You can now help us improve the API whether it's by making changes to the definition itself or to the code. That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
Some useful links:
Download OpenAPI description
Overview
Languages
Servers
Mock server
https://vlad.redocly.xyz/_mock/apis/petsstore
https://vlad.redocly.xyz/v3
Bodyrequired
- application/json
- application/xml
- application/x-www-form-urlencoded
Create a new pets in the store
- Mock serverhttps://vlad.redocly.xyz/_mock/apis/petsstore/pets
- https://vlad.redocly.xyz/v3/pets
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://vlad.redocly.xyz/_mock/apis/petsstore/pets \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 1,
"name": "name"
}
],
"status": "available"
}'Response
<pets>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>1</id>
<name>name</name>
</tag>
</tags>
<status>available</status>
</pets>Bodyrequired
- application/json
- application/xml
- application/x-www-form-urlencoded
Update an existent pets in the store
- Mock serverhttps://vlad.redocly.xyz/_mock/apis/petsstore/pets
- https://vlad.redocly.xyz/v3/pets
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
https://vlad.redocly.xyz/_mock/apis/petsstore/pets \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 1,
"name": "name"
}
],
"status": "available"
}'Response
<pets>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>1</id>
<name>name</name>
</tag>
</tags>
<status>available</status>
</pets>- Mock serverhttps://vlad.redocly.xyz/_mock/apis/petsstore/pets/findByStatus
- https://vlad.redocly.xyz/v3/pets/findByStatus
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/findByStatus?status=available' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'Response
<pets>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>1</id>
<name>name</name>
</tag>
</tags>
<status>available</status>
</pets>- Mock serverhttps://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}
- https://vlad.redocly.xyz/v3/pets/{petId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}' \
-H 'api_key: YOUR_API_KEY_HERE'Response
<pets>
<id>10</id>
<name>doggie</name>
<category>
<id>1</id>
<name>Dogs</name>
</category>
<photoUrls>
<photoUrl>string</photoUrl>
</photoUrls>
<tags>
<tag>
<id>1</id>
<name>name</name>
</tag>
</tags>
<status>available</status>
</pets>- Mock serverhttps://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}
- https://vlad.redocly.xyz/v3/pets/{petId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}?name=string&status=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'- Mock serverhttps://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}
- https://vlad.redocly.xyz/v3/pets/{petId}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'api_key: string'- Mock serverhttps://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}/uploadImage
- https://vlad.redocly.xyz/v3/pets/{petId}/uploadImage
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
'https://vlad.redocly.xyz/_mock/apis/petsstore/pets/{petId}/uploadImage?additionalMetadata=string' \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/octet-stream' \
-d stringResponse
application/json
{ "code": 1, "type": "type", "message": "test message" }