Skip to content
v1.0.0

Parameter Testing API

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

Typestring
Required
Exampleapi-key-123

Query Parameters

name

Filter users by name

Typestring
ExampleJohn
age

Filter users by age

Typeinteger
Example25
minimum0
maximum120
multipleOf1
limit

Maximum number of users to return

Typeinteger
Example10
minimum1
maximum100
default20
offset

Number of users to skip for pagination

Typeinteger
Example0
minimum0
default0

Responses

Successful response
application/json
JSON
{
"users": [
{
"userId": "string",
"name": "string",
"age": 0
}
],
"total": 0,
"limit": 0,
"offset": 0
}

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

Typestring
Required
Exampleapi-key-123
X-Request-ID

Unique request identifier for tracing

Typestring
Example123e4567-e89b-12d3-a456-426614174000
formatuuid

Query Parameters

dryRun

If true, validates the request without creating the user

Typeboolean
defaultfalse
region

Region for user creation

Typestring
Enum
us-eastus-westeu-central
defaultus-east

Request Body

application/json
JSON
{
"name": "John Doe",
"email": "john.doe@example.com",
"age": 30,
"address": {
"street": "123 Main St",
"city": "Anytown",
"state": "CA",
"zipCode": "12345",
"country": "USA"
},
"preferences": [
[
"email",
"push"
]
],
"metadata": {
"additionalProperties": "string"
}
}

Responses

User created successfully
application/json
JSON
{
"userId": "user-123",
"name": "John Doe",
"email": "john.doe@example.com",
"createdAt": "2023-01-01T12:00:00Z"
}

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

Typestring
Examplecustom-value
minLength3
maxLength50
pattern^[a-zA-Z0-9-]+$

Path Parameters

userId*

The ID of the user

Typestring
Required
Example123

Query Parameters

age

The age of the user to filter

Typeinteger
Example25
minimum0
maximum120
multipleOf1
acceptsCookies*

Whether the user accepts cookies

Typeboolean
Required
Exampletrue
isSubscribed

Whether the user is subscribed to the newsletter

Typeboolean
Examplefalse

Responses

Successful response
application/json
JSON
{
"userId": "string",
"name": "string",
"age": 0
}

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

Typestring
Required
Exampleapi-key-123
X-Transaction-ID

Unique transaction identifier for tracing

Typestring
Example123e4567-e89b-12d3-a456-426614174000
formatuuid

Path Parameters

documentId*

The ID of the document to update

Typestring
Required
Exampledoc-123

Query Parameters

version

Document version for concurrency control

Typeinteger
Example2
minimum1
overwrite

If true, completely overwrites the document instead of merging changes

Typeboolean
defaultfalse
format

Format of the document content

Typestring
Enum
plainmarkdownhtml
defaultplain
tags

Tags to associate with the document

Typearray
Exampleimportantdraft

Request Body

text/plain
JSON
"This is the updated content of the document. It can contain multiple paragraphs and lines of text. This is a new paragraph in the document."

Responses

Document updated successfully
application/json
JSON
{
"documentId": "doc-123",
"version": 3,
"updatedAt": "2023-01-01T12:00:00Z",
"size": 1024
}

Playground

Headers
Variables
Key
Value
Body

Samples

cURL
JavaScript
PHP
Python

Powered by VitePress OpenAPI