Finds Pets by tags
GEThttps://petstore.swagger.io/v2/pet/findByTags
This endpoint has been deprecated and may be replaced or removed in future versions of the API.
Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
Request
Query Parameters
Tags to filter by
Responses
- 200
- 400
successful operation
- application/json
- application/xml
- Schema
- Example (auto)
Schema
- Array [
- cat
- dog
- bee
- ]
Pet ID
category Category
The name given to a pet
Guru
The list of URL to a cute photos featuring pet
Possible values: <= 20
tags Tag[]
Pet status in the store
Possible values: [available
, pending
, sold
]
Type of a pet
Possible values: [cat
, dog
, bee
]
The measured skill for hunting
Possible values: [clueless
, lazy
, adventurous
, aggressive
]
lazy
adventurous
The size of the pack the dog is from
Possible values: >= 1
1
Average amount of honey produced per day in ounces
3.14
[
{
"id": 0,
"category": {
"id": 0,
"name": "string",
"sub": {
"prop1": "string"
}
},
"name": "Guru",
"photoUrls": [
"string"
],
"friend": {},
"tags": [
{
"id": 0,
"name": "string"
}
],
"status": "available",
"petType": {
"huntingSkill": "adventurous"
}
}
]
- Schema
- Example (auto)
Schema
- Array [
- cat
- dog
- bee
- ]
Pet ID
category Category
The name given to a pet
Guru
The list of URL to a cute photos featuring pet
Possible values: <= 20
tags Tag[]
Pet status in the store
Possible values: [available
, pending
, sold
]
Type of a pet
Possible values: [cat
, dog
, bee
]
The measured skill for hunting
Possible values: [clueless
, lazy
, adventurous
, aggressive
]
lazy
adventurous
The size of the pack the dog is from
Possible values: >= 1
1
Average amount of honey produced per day in ounces
3.14
<0>
<id>0</id>
<category>
<id>0</id>
<name>string</name>
<sub>
<prop1>string</prop1>
</sub>
</category>
<name>Guru</name>
<photoUrls>string</photoUrls>
<friend/>
<tags>
<id>0</id>
<name>string</name>
</tags>
<status>available</status>
<petType>
<huntingSkill>adventurous</huntingSkill>
</petType>
</0>
Invalid tag value
Authorization: oauth2
name: petstore_authtype: oauth2scopes:write:pets,read:pets
description: Get access to data while protecting your account credentials. OAuth2 is also a safer and more secure way to give you access.flows: { "implicit": { "authorizationUrl": "http://petstore.swagger.io/api/oauth/dialog", "scopes": { "write:pets": "modify pets in your account", "read:pets": "read your pets" } } }
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- dart
- javascript
- c
- objective-c
- ocaml
- r
- swift
- kotlin
- rust
- HTTP.CLIENT
- REQUESTS
import http.client
conn = http.client.HTTPSConnection("petstore.swagger.io")
payload = ''
headers = {
'Accept': 'application/json',
'Authorization': 'Bearer <token>'
}
conn.request("GET", "/v2/pet/findByTags", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))