Skip to content

Example of an OpenAPI document with different types of parameters.

Servers

https://api.example.com

List users

GET
/users

Returns a list of users with optional filtering.

Parameters

Header Parameters

X-API-Key*

API key for authentication

Type
string
Required
Example"api-key-123"

Query Parameters

name

Filter users by name

Type
string
Example"John"
age

Filter users by age

Type
integer
Example25
Minimum
0
Maximum
120
Multiple of
1
limit

Maximum number of users to return

Type
integer
Example10
Minimum
1
Maximum
100
Default
20
offset

Number of users to skip for pagination

Type
integer
Example0
Minimum
0
Default
0

Responses

Successful response

application/json
object
object[]

Playground

Headers
Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

Create a new user

POST
/users

Creates a new user with the provided information.

Parameters

Header Parameters

X-API-Key*

API key for authentication

Type
string
Required
Example"api-key-123"
X-Request-ID

Unique request identifier for tracing

Type
string
Example"123e4567-e89b-12d3-a456-426614174000"
Format
"uuid"

Query Parameters

dryRun

If true, validates the request without creating the user

Type
boolean
Default
false
region

Region for user creation

Type
string
Valid values
"us-east""us-west""eu-central"
Default
"us-east"

Request Body

application/json
object

User's full name

Min Length2
Max Length100

User's email address

Format"email"

User's age in years

Minimum18
Maximum120
object

User's address information

string[]

User's preferences

object

Additional user metadata

Responses

User created successfully

application/json
object

The ID of the newly created user

Format"date-time"

Playground

Headers
Variables
Key
Value
Body

Samples

cURL
JavaScript
PHP
Python

Get user information by ID

GET
/users/{userId}

Returns information for a specific user.

Parameters

Header Parameters

X-Custom-Header

A custom header for testing purposes

Type
string
Example"custom-value"
Min Length
3
Max Length
50
Pattern
"^[a-zA-Z0-9-]+$"

Path Parameters

userId*

The ID of the user

Type
string
Required
Example"123"

Query Parameters

age

The age of the user to filter

Type
integer
Example25
Minimum
0
Maximum
120
Multiple of
1
acceptsCookies*

Whether the user accepts cookies

Type
boolean
Required
Exampletrue
isSubscribed

Whether the user is subscribed to the newsletter

Type
boolean
Examplefalse

Responses

Successful response

application/json
object

Playground

Headers
Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

Update document content

PUT
/documents/{documentId}

Updates an existing document with plain text content.

Parameters

Header Parameters

X-API-Key*

API key for authentication

Type
string
Required
Example"api-key-123"
X-Transaction-ID

Unique transaction identifier for tracing

Type
string
Examples
"123e4567-e89b-12d3-a456-426614174000"
Format
"uuid"

Path Parameters

documentId*

The ID of the document to update

Type
string
Required
Examples
"doc-123"

Query Parameters

version

Document version for concurrency control

Type
integer
Examples
1
Minimum
1
overwrite

If true, completely overwrites the document instead of merging changes

Type
boolean
Default
false
format

Format of the document content

Type
string
Valid values
"plain""markdown""html"
Default
"plain"
tags

Tags to associate with the document

Type
array
Example"important""draft"
metadata

Additional JSON metadata for the document

Type
object
Example{ "author": "Jane Doe", "category": "report" }

Request Body

text/plain

Responses

Document updated successfully

application/json
object
Format"date-time"

Size of the document in bytes

Playground

Headers
Variables
Key
Value
Body

Samples

cURL
JavaScript
PHP
Python

Test deepObject parameter variants

GET
/deepobject-test

Endpoint to test different variants of deepObject style parameters in query strings.

Parameters

Header Parameters

X-API-Key*

API key for authentication

Type
string
Required
Example"api-key-123"

Query Parameters

simpleObject

Simple object with deepObject style and explode: true (default)

Type
object
Example{ "name": "John Doe", "age": 30, "active": true }
simpleObjectNoExplode

Simple object with deepObject style and explode: false

Type
object
Example{ "author": "Jane Doe", "category": "report" }
nestedObject

Nested object with deepObject style (object within object)

Type
object
Example{ "user": { "name": "John", "email": "john@example.com" }, "settings": { "theme": "dark", "notifications": true } }
objectWithArrays

Object containing arrays with deepObject style

Type
object
Example{ "tags": [ "important", "urgent" ], "categories": [ "work", "personal" ], "ids": [ 1, 2, 3 ] }
complexNestedObject

Complex nested object with multiple levels and mixed types

Type
object
Example{ "metadata": { "author": { "name": "Jane Doe", "id": 123 }, "created": "2023-01-01", "tags": [ "draft", "review" ] }, "config": { "enabled": true, "priority": 5 } }
mixedTypesObject

Object with mixed data types (string, number, boolean, array)

Type
object
Example{ "name": "Product", "price": 99.99, "inStock": true, "discount": 0.15, "features": [ "feature1", "feature2" ], "rating": 4.5 }
objectWithAdditionalProperties

Object with additionalProperties allowing dynamic keys

Type
object
Example{ "customField1": "value1", "customField2": "value2", "dynamicKey": "dynamicValue" }

Responses

Successful response with parsed deepObject parameters

application/json
object

Playground

Headers
Variables
Key
Value

Samples

cURL
JavaScript
PHP
Python

Test endpoint for named examples

POST
/test/named-examples/{resourceId}

Endpoint designed to test the named examples functionality with various parameter types and multiple named examples.

Parameters

Header Parameters

X-Environment

Environment header with named examples

Type
string
Valid values
"development""staging""production"
Examples
"development"
X-Request-Type

Request type with boolean-like named examples

Type
string
Examples
"async""sync""batch"

Path Parameters

resourceId*

Resource ID path parameter with named examples

Type
string
Required
Examples
"user-12345"
Pattern
"^[a-z0-9-]+$"

Query Parameters

status

Status of the operation with multiple named examples

Type
string
Valid values
"pending""active""completed""cancelled"
Examples
"pending""active""completed""cancelled"
priority

Priority level with numeric named examples

Type
integer
Examples
1
Minimum
1
Maximum
5
filter

Filter object with named examples containing different structures

Type
object
Examples
{ "field": "name", "value": "John", "operator": "equals" }
tags

Tags array with different named examples

Type
array
Examples
"important"
metadata

Complex metadata object with nested named examples

Type
object
Examples
{ "source": "api", "version": 1 }

Request Body

application/json
object

Responses

Successful response

Playground

Headers
Variables
Key
Value
Body

Samples

cURL
JavaScript
PHP
Python

Powered by VitePress OpenAPI