{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
POST
/petOAuth 2.0Add a new pet to the store.
Request Body
Request Example
curl -X POST "/pet" \
-H "Authorization: Bearer <oauth-token>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"id":10,"name":"doggie","category":{"id":1,"name":"Dogs"},"photoUrls":["string"],"tags":[{"id":0,"name":"string"}],"status":"available"}'
Response
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
PUT
/petOAuth 2.0Update an existing pet.
Request Body
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
Request Example
curl -X PUT "/pet" \
-H "Authorization: Bearer <oauth-token>" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '{"id":10,"name":"doggie","category":{"id":1,"name":"Dogs"},"photoUrls":["string"],"tags":[{"id":0,"name":"string"}],"status":"available"}'
Response
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
GET
/pet/findByStatusOAuth 2.0Finds Pets by status.
Parameters
statusstringqueryDefault: availablerequiredStatus values that need to be considered for filter
Request Example
curl -X GET "/pet/findByStatus?status=available" \
-H "Authorization: Bearer <oauth-token>" \
-H "Accept: application/json"
Response
[
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
]
GET
/pet/findByTagsOAuth 2.0Finds Pets by tags.
Parameters
tagsstring[]queryrequiredTags to filter by
Request Example
curl -X GET "/pet/findByTags?tags=%3Ctags%3E" \
-H "Authorization: Bearer <oauth-token>" \
-H "Accept: application/json"
Response
[
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
]
GET
/pet/{petId}api_keyFind pet by ID.
Request Example
curl -X GET "/pet/{petId}" \
-H "X-API-Key: <api-key>" \
-H "Accept: application/json"
Response
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
POST
/pet/{petId}OAuth 2.0Updates a pet in the store with form data.
Parameters
namestringqueryName of pet that needs to be updated
statusstringqueryStatus of pet that needs to be updated
Request Example
curl -X POST "/pet/{petId}?name=%3Cname%3E&status=%3Cstatus%3E" \
-H "Authorization: Bearer <oauth-token>" \
-H "Accept: application/json"
Response
{
"id": 10,
"name": "doggie",
"category": {
"id": 1,
"name": "Dogs"
},
"photoUrls": [
"string"
],
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available"
}
DELETE
/pet/{petId}OAuth 2.0Deletes a pet.
Parameters
api_keystringheaderNo description provided.
Request Example
curl -X DELETE "/pet/{petId}" \
-H "Authorization: Bearer <oauth-token>" \
-H "api_key: <api_key>"
Response
POST
/pet/{petId}/uploadImageOAuth 2.0Uploads an image.
Parameters
additionalMetadatastringqueryAdditional Metadata
Request Body
"string"
Request Example
curl -X POST "/pet/{petId}/uploadImage?additionalMetadata=%3CadditionalMetadata%3E" \
-H "Authorization: Bearer <oauth-token>" \
-H "Accept: application/json" \
-H "Content-Type: application/octet-stream" \
-d '"string"'
Response
{
"code": 0,
"type": "string",
"message": "string"
}
Was this page helpful?