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 response
application/json
object
items
object[]
total
integer
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
object
name
string
Required
description
string
price
number
Format
"float"
category
string
Responses
Item created successfully
application/json
object
id
string
name
string
description
string
price
number
Format
"float"
category
string
createdAt
string
Format
"date-time"
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 response
application/json
object
id
string
name
string
description
string
price
number
Format
"float"
category
string