Skip to content

API to demonstrate the use of x-playground-example extension

Servers

https://api.example.com/v1Production server

Default


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.

Type
string
Example{"id":"header-id-789"}
X-Api-Key*

API key for authentication

Type
string
Required
Example"api-key-123"

Query Parameters

id

Filter by ID (with playground-specific example)

Type
string
Example"general-id-456"
name

Filter by name (with schema-level playground example)

Type
string
Example"General Item Name"
category

Filter by category (with standard example)

Type
string
Example"electronics"
filters

Filter criteria for fetching device points.

Type
string
Examples
{ "limit": 10, "order": [ "timestamp DESC" ] }{ "where": { "type": "temp" }, "limit": 10, "order": [ "timestamp DESC" ] }{ "where": { "type": "temp", "timestamp": { "between": [ "2024-12-01T00:00:00.000Z", "2024-12-01T23:59:59.999Z" ] } }, "order": [ "timestamp DESC" ] }{"limit":10,"order":["timestamp ASC"]}{"where":{"timestamp":{"between":["2024-12-01T00:00:00.000Z","2024-12-01T23:59:59.999Z"]}},"order":["timestamp DESC"]}{"where":{"correlationId":"abc123"}}
Format
"JSON"

Responses

Successful response

application/json
object
object[]

Playground

Headers
Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

Create a new item

POST
/items

Creates a new item with the provided details

Parameters

Header Parameters

X-Api-Key*

API key for authentication

Type
string
Required
Example"api-key-123"

Request Body

application/json
object
Format"float"

Responses

Item created successfully

application/json
object
Format"float"
Format"date-time"

Playground

Headers
Body

Samples

cURL
JavaScript
PHP
Python

Get item by ID

GET
/items/{id}

Retrieves a specific item by its ID

Parameters

Header Parameters

X-Api-Key*

API key for authentication

Type
string
Required
Example"api-key-123"

Path Parameters

id*

Item ID

Type
string
Required
Example"item-123"

Responses

Successful response

application/json
object
Format"float"

Playground

Headers
Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

Powered by VitePress OpenAPI