Swagger Petstore (REST API Design Article)
Simulate the Swagger Petstore (REST API Design Article) in seconds. This is a sample Pet Store Server based on the OpenAPI 3.0 specification.
[01]
About
Mock the Swagger Petstore (REST API Design Article) as a turnkey Mockzilla sim with 19 OpenAPI endpoints, realistic JSON payloads, no upstream signup or sandbox keys. This is a sample Pet Store Server based on the OpenAPI 3.0 specification. Methods: 8x GET, 6x POST, 3x DELETE, 2x PUT. Top resource groups: pet, user, store. Hit https://api.justmocks.com/article-rest-api-design for the Mockzilla API Explorer landing and per-endpoint sample requests.
Endpoints
19 across 3 resource groups
Methods
GET 8 · POST 6 · PUT 2 · DEL 3 none deprecated
OpenAPI
3.0.2 spec version 1.0.6
Source spec
20 KB · YAML
[02]
Endpoints
| PUT |
/pet
|
Update an existing pet Update an existing pet by Id. Mocked via Mockzilla.
|
| POST |
/pet
|
Add a new pet to the store Add a new pet to the store
|
| GET |
/pet/findByStatus
|
Finds Pets by status Multiple status values can be provided with comma separated strings
|
| GET |
/pet/findByTags
|
Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
|
| GET |
/pet/{petId}
|
Find pet by ID Returns a single pet
|
| POST |
/pet/{petId}
|
Updates a pet in the store with form data
|
| DEL |
/pet/{petId}
|
Deletes a pet
|
| POST |
/pet/{petId}/uploadImage
|
uploads an image
|
| GET |
/store/inventory
|
Returns pet inventories by status Returns a map of status codes to quantities. Available as a Mockzilla mock endpoint.
|
| POST |
/store/order
|
Place an order for a pet Place a new order in the store
|
| GET |
/store/order/{orderId}
|
Find purchase order by ID For valid response try integer IDs with value 10. Other values will generated exceptions
|
| DEL |
/store/order/{orderId}
|
Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
| POST |
/user
|
Create user This can only be done by the logged in user.
|
| POST |
/user/createWithList
|
Creates list of users with given input array Creates list of users with given input array. Mockzilla mock: no signup, no API key.
|
| GET |
/user/login
|
Logs user into the system
|
| GET |
/user/logout
|
Logs out current logged in user session
|
| GET |
/user/{username}
|
Get user by user name
|
| PUT |
/user/{username}
|
Update user This can only be done by the logged in user.
|
| DEL |
/user/{username}
|
Delete user This can only be done by the logged in user.
|