Skip to content
v1.0.0

Parameter Testing API

Example of an OpenAPI document with different types of parameters.

Servers

https://api.example.com

Default


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

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

Powered by VitePress OpenAPI