API to demonstrate the use of x-playground-example extension
Servers
https://api.example.com/v1Production server
List items with playground-specific examples
GET
/items
Demonstrates the use of x-playground-example extension.
Parameters
Header Parameters
X-Custom
Optionally provide parameters as a JSON object in this header.
Typestring
Example
{"id":"header-id-789"}
X-Api-Key*
API key for authentication
Typestring
RequiredExample
api-key-123
Query Parameters
id
Filter by ID (with playground-specific example)
Typestring
Example
general-id-456
name
Filter by name (with schema-level playground example)
Typestring
Example
General Item Name
category
Filter by category (with standard example)
Typestring
Example
electronics
Responses
Successful responseSchema default Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vel egestas dolor, nec dignissim metus. JSON JSON
application/json
{
"items": [
{
"id": "item-123",
"name": "Sample Item",
"description": "This is a sample item description",
"price": 19.99,
"category": "electronics"
}
],
"total": 1
}
Create a new item
POST
/items
Creates a new item with the provided details
Parameters
Header Parameters
X-Api-Key*
API key for authentication
Typestring
RequiredExample
api-key-123
Request Body
application/json
{
"name": "New Item",
"description": "Description of the new item",
"price": 29.99,
"category": "furniture"
}
Responses
Item created successfullySchema JSON JSON
application/json
{
"id": "item-456",
"name": "New Item",
"description": "Description of the new item",
"price": 29.99,
"category": "furniture",
"createdAt": "2023-06-15T14:30:00Z"
}
Get item by ID
GET
/items/{id}
Retrieves a specific item by its ID
Parameters
Header Parameters
X-Api-Key*
API key for authentication
Typestring
RequiredExample
api-key-123
Path Parameters
id*
Item ID
Typestring
RequiredExample
item-123
Responses
Successful responseSchema JSON JSON
application/json
{
"id": "item-123",
"name": "Sample Item",
"description": "This is a sample item description",
"price": 19.99,
"category": "electronics"
}