Everything about your Pets
Path Parameters
- petIdrequired
ID of pet to update
Form Data
- additionalMetadata
Additional data to pass to server
- file
file to upload
Responses
- 200
successful operation
POST/pet/{petId}/uploadImage
curl https://petstore.swagger.io/v2/pet//uploadImage \
--request POST \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data "additionalMetadata=&file="
{
"code": 1,
"type": "…",
"message": "…"
}Body Parameters
- bodyobjectrequired
Responses
- 405
Invalid input
POST/pet
curl https://petstore.swagger.io/v2/pet \
--request POST \
--header 'Content-Type: text/plain;charset=UTF-8' \
--data "{
"id": 1,
"category": {
"id": 1,
"name": ""
},
"name": "doggie",
"photoUrls": [
""
],
"tags": [
{
"id": 1,
"name": ""
}
],
"status": "available"
}"
No Body
Body Parameters
- bodyobjectrequired
Responses
- 400
Invalid ID supplied
- 404
Pet not found
- 405
Validation exception
PUT/pet
curl https://petstore.swagger.io/v2/pet \
--request PUT \
--header 'Content-Type: text/plain;charset=UTF-8' \
--data "{
"id": 1,
"category": {
"id": 1,
"name": ""
},
"name": "doggie",
"photoUrls": [
""
],
"tags": [
{
"id": 1,
"name": ""
}
],
"status": "available"
}"
No Body
Multiple status values can be provided with comma separated strings
Query Parameters
- statusrequired
Status values that need to be considered for filter
Responses
- 200
successful operation
- 400
Invalid status value
GET/pet/findByStatus
curl https://petstore.swagger.io/v2/pet/findByStatus
[
{
"id": 1,
"category": {
"id": 1,
"name": "…"
},
"name": "doggie",
"photoUrls": [
"…"
],
"tags": [
{
"id": 1,
"name": "…"
}
],
"status": "available"
}
] Deprecated
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
Query Parameters
- tagsrequired
Tags to filter by
Responses
- 200
successful operation
- 400
Invalid tag value
GET/pet/findByTags
curl https://petstore.swagger.io/v2/pet/findByTags
[
{
"id": 1,
"category": {
"id": 1,
"name": "…"
},
"name": "doggie",
"photoUrls": [
"…"
],
"tags": [
{
"id": 1,
"name": "…"
}
],
"status": "available"
}
]Returns a single pet
Path Parameters
- petIdrequired
ID of pet to return
Responses
- 200
successful operation
- 400
Invalid ID supplied
- 404
Pet not found
GET/pet/{petId}
curl https://petstore.swagger.io/v2/pet/ \
--header 'Api_key: YOUR_SECRET_TOKEN'
{
"id": 1,
"category": {
"id": 1,
"name": "…"
},
"name": "doggie",
"photoUrls": [
"…"
],
"tags": [
{
"id": 1,
"name": "…"
}
],
"status": "available"
}Path Parameters
- petIdrequired
ID of pet that needs to be updated
Form Data
- name
Updated name of the pet
- status
Updated status of the pet
Responses
- 405
Invalid input
POST/pet/{petId}
curl https://petstore.swagger.io/v2/pet/ \
--request POST \
--header 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' \
--data "name=&status="
No Body