🚀 Getting Started
Welcome to the RealTestData API documentation. This API allows you to generate realistic test data for your applications using our advanced algorithms.
How to use the API and the web version on Azure
- In your web browser, point to "rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io" for the API, which displays "This is RealTestData API".
- With "rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/docs/<language>" this documentation is displayed in the respective language
- In this directory you will also find the Python file "RealTestData_API_Generate.py" with an example of using the API with Python.
- In this directory you will also find the JavaScript file "RealTestData_API_Generate.js" with an example of using the API with JavaScript.
- "https:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/" is the web version of RealTestData, which is completely based on the API
Base URL for the API
API Endpoint
http://<container-ip>:8000
Example: http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io:8000
Base URL for the web frontend
Web Frontend
//<container-ip>:5000
Example: http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io:5000
Authentication
Most endpoints are protected with JWT because they require a license to use.
After successful login (with the appropriate license) you will receive an access_token, which you must include in each header:
Authorization: Bearer <access_token>
API endpoints
/
API homepage
Response: "This is RealTestData API"
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/
Python example:
import requests
r = requests.get("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/")
print(r.text)
Postman example:
{
"method": "GET",
"url": "{{base_url}}/",
"headers": {}
}
/register
User Registration
Registers a new user and sends an activation link via email.
Body (JSON):
{
"username": "max",
"password": "secret",
"email": "max@example.com",
"forename": "Max",
"lastname": "Doe",
"phone": "0123456789",
"webserver": "http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"
}
Response:
{
"status": 201,
"message": "User max registered successfully. Please check your email to activate your account."
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/register \
-H "Content-Type: application/json" \
-d '{"username":"max","password":"secret","email":"max@example.com","forename":"Max","lastname":"Doe","phone":"0123456789","webserver":"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"}'
Python example:
import requests
data = {
"username": "max",
"password": "secret",
"email": "max@example.com",
"forename": "Max",
"lastname": "Doe",
"phone": "0123456789",
"webserver": "http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"
}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/register", json=data)
print(r.json())
/activate/<token>
Account Activation
Activate a user account using the link in the email. Only then can you log in.
Response:
{
"status": 200,
"message": "Account successfully activated"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/activate/<token>
Python example:
import requests
token = "your_activation_token_here"
r = requests.post(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/activate/{token}")
print(r.json())
/login
User Login
User login, returns JWT token.
Body (JSON):
{
"username": "max",
"password": "secret"
}
Response:
{
"status": 200,
"access_token": "<JWT>",
"message": "Successful login",
"forename": "Max",
"lastname": "Doe",
"email": "max@example.com",
"countries": "DE;AT;CH",
"version": 100,
"until": "2024-12-31"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/login \
-H "Content-Type: application/json" \
-d '{"username":"max","password":"secret"}'
Python example:
import requests
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/login", json={"username":"max","password":"secret"})
print(r.json())
/user/<name>
🔒 Requires Authentication
User Details
Details about a user (JWT required, own user only).
Response:
{
"status": 200,
"message": "User found",
"user": { ... }
}
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/user/max \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
username = "max"
r = requests.get(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/user/{username}", headers=headers)
print(r.json())
/change_password
🔒 Requires Authentication
Change Password
Change password (JWT required).
Body (JSON):
{
"old_password": "old_password",
"new_password": "new_password"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/change_password \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"old_password":"old_password","new_password":"new_password"}'
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
data = {"old_password": "old_password", "new_password": "new_password"}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/change_password", headers=headers, json=data)
print(r.json())
/logout
🔒 Requires Authentication
User Logout
Logout (JWT required, token becomes invalid).
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/logout \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/logout", headers=headers)
print(r.json())
/password_reset_request
Password Reset Request
Requests a password reset link via email.
Body (JSON):
{
"email": "max@example.com",
"webserver": "http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"
}
Response:
{
"status": 200,
"message": "Password reset link sent successfully",
"reset_link": "<URL>"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/password_reset_request \
-H "Content-Type: application/json" \
-d '{"email":"max@example.com","webserver":"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"}'
Python example:
import requests
data = {"email": "max@example.com", "webserver": "http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/password_reset_request", json=data)
print(r.json())
/password_reset/<token>
Password Reset
Reset password with token from email.
Body (JSON):
{
"new_password": "new_password",
"webserver": "http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"
}
Response:
{
"status": 200,
"message": "Password reset successfully"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/password_reset/<token> \
-H "Content-Type: application/json" \
-d '{"new_password":"new_password","webserver":"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"}'
Python example:
import requests
token = "reset_token_here"
data = {"new_password": "new_password", "webserver": "http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io"}
r = requests.post(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/password_reset/{token}", json=data)
print(r.json())
/generate
🔒 Requires Authentication
Generate Test Data
Generates test data (JWT required)
Body (JSON):
{
"version": 0
}
Response:
{
"status": 200,
"message": "File generated successfully",
"filename": "testdata_20231201_143052.csv",
"path": "/app/ResultData/"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/generate \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"version":0}'
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
data = {"version": 0}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/generate", headers=headers, json=data)
print(r.json())
/generate_live
🔒 Requires Authentication
Generate Test Data Live
Generates test data and delivers it directly as JSON (JWT required).
Body (JSON):
{
"version": 0
}
Response:
{
"status": 200,
"message": "File generated successfully",
"filename": "testdata.json",
"path": "/app/ResultData/",
"result": { ... }
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/generate_live \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"version":0}'
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
data = {"version": 0}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/generate_live", headers=headers, json=data)
print(r.json())
/download/<filename>
🔒 Requires Authentication
Download Generated File
Downloads a file generated with "/generate".
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/download/testdata_20231201_143052.csv \
-H "Authorization: Bearer <access_token>" \
-o testdata.csv
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
filename = "testdata_20231201_143052.csv"
r = requests.get(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/download/{filename}", headers=headers)
with open(filename, 'wb') as f:
f.write(r.content)
/countrylist
🔒 Requires Authentication
Get Country List
Returns a filtered country list (JWT required).
Body (JSON):
{
"usercountries": "DE;AT;CH"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/countrylist \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"usercountries":"DE;AT;CH"}'
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
data = {"usercountries": "DE;AT;CH"}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/countrylist", headers=headers, json=data)
print(r.json())
/config
🔒 Requires Authentication
Configuration Management
Reads or saves the configuration (JWT required).
- GET: Loads the configuration.
- POST: Saves the configuration.
cURL example (GET):
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/config \
-H "Authorization: Bearer <access_token>"
Python example (GET):
import requests
headers = {"Authorization": "Bearer <access_token>"}
r = requests.get("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/config", headers=headers)
print(r.json())
/Language
🔒 Requires Authentication
Language Management
Loads or sets the language (JWT required).
- GET: Returns the current language.
- POST: Sets the language (language: 0=de, 1=en, 2=fr, 3=cz, 4=es, 5=it).
Body (JSON) for POST:
{
"language": 1
}
cURL example (POST):
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/Language \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"language":1}'
Python example (POST):
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
data = {"language": 1} # 1 = English
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/Language", headers=headers, json=data)
print(r.json())
/health
API Health Check
API health check.
Response:
{
"status": "healthy",
"service": "myweb"
}
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/health
Python example:
import requests
r = requests.get("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/health")
print(r.json())
/checked
User Verification
Verifies and activates users via email (admin function). If the user is not found or the email is not identical, an error message will appear.
Body (JSON):
{
"email": "user@example.com"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/checked \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com"}'
Python example:
import requests
data = {"email": "user@example.com"}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/checked", json=data)
print(r.json())
/configall
🔒 Requires Authentication
Get All Configuration Values
Gets all configuration values (JWT required). Rarely used, as all configuration values are read and saved automatically.
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configall \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
r = requests.get("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configall", headers=headers)
print(r.json())
/config/<name>
🔒 Requires Authentication
Get Specific Configuration Value
Gets specific configuration value (JWT required). The name of the configuration value can only be viewed via the web interface.
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/config/Language \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
config_name = "Language"
r = requests.get(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/config/{config_name}", headers=headers)
print(r.json())
/configstring/<name>
🔒 Requires Authentication
Set Configuration String Value
Sets configuration string value (JWT required). Stores a value as a string.
Body (JSON):
{
"value": "CSV"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configstring/OutputFormat \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"value":"CSV"}'
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
config_name = "OutputFormat"
data = {"value": "CSV"}
r = requests.post(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configstring/{config_name}", headers=headers, json=data)
print(r.json())
/configint/<name>
🔒 Requires Authentication
Set Configuration Integer Value
Sets configuration integer value (JWT required). Stores a value as an integer.
Body (JSON):
{
"value": 1000
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configint/NumberRecords \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"value":1000}'
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
config_name = "NumberRecords"
data = {"value": 1000}
r = requests.post(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configint/{config_name}", headers=headers, json=data)
print(r.json())
/configbool/<name>
🔒 Requires Authentication
Set Configuration Boolean Value
Sets configuration Boolean value (JWT required). Stores a value as "Bool".
Body (JSON):
{
"value": "true"
}
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configbool/JSONArray \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{"value":"true"}'
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>", "Content-Type": "application/json"}
config_name = "JSONArray"
data = {"value": "true"}
r = requests.post(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/configbool/{config_name}", headers=headers, json=data)
print(r.json())
/countryadd/<value>
🔒 Requires Authentication
Add Country
Adds country to user record (JWT required). Adding a country. A maximum of only a certain number of countries can be added, depending on the license.
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/countryadd/FR \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
country_code = "FR"
r = requests.post(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/countryadd/{country_code}", headers=headers)
print(r.json())
/countrydel/<value>
🔒 Requires Authentication
Remove Country
Removes country from user record (JWT required).
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/countrydel/FR \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
country_code = "FR"
r = requests.post(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/countrydel/{country_code}", headers=headers)
print(r.json())
/init
🔒 Requires Authentication
Initialize Configuration
Initializes the configuration (JWT required). Reinitializes the entire configuration file.
cURL example:
curl -X POST http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/init \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
r = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/init", headers=headers)
print(r.json())
/test
🔒 Requires Authentication
Test Endpoint
Test endpoint (JWT required).
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/test \
-H "Authorization: Bearer <access_token>"
Python example:
import requests
headers = {"Authorization": "Bearer <access_token>"}
r = requests.get("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/test", headers=headers)
print(r.json())
/running
API Running Status
Checks whether the API is running.
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/running
Python example:
import requests
r = requests.get("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/running")
print(r.json())
/docs/<language>
API Documentation
Gets API documentation in the specified language.
Supported languages: en, de, fr, cz
cURL example:
curl -X GET http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/docs/de
Python example:
import requests
language = "de"
r = requests.get(f"http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/docs/{language}")
print(r.text)
🔐 Use JWT Token
For all protected endpoints:
- Read the
access_tokenafter logging in. - Include in the header:
Authorization: Bearer <access_token>
🚨 Error Handling
Error Response Format
All endpoints return a JSON with status ≠ 200 and a meaningful message on errors.
Common HTTP Status Codes
| Status Code | Description | Example Response |
|---|---|---|
400 |
Bad Request | {"status": 400, "message": "Missing required parameters"} |
401 |
Unauthorized | {"status": 401, "message": "Invalid or missing authentication"} |
403 |
Forbidden | {"status": 403, "message": "Insufficient permissions (Admin required)"} |
404 |
Not Found | {"status": 404, "message": "Resource not found"} |
500 |
Internal Server Error | {"status": 500, "message": "Server-side error"} |
Error Handling Best Practices
- Always check the
statusfield in responses - Handle authentication errors by redirecting to login
- Implement retry logic for temporary server errors (5xx)
- Log error details for debugging purposes
- Show user-friendly error messages based on status codes
Example Error Handling in Python:
import requests
def handle_api_response(response):
try:
data = response.json()
if data.get("status") == 200:
return data
else:
print(f"API Error: {data.get('message', 'Unknown error')}")
return None
except requests.exceptions.JSONDecodeError:
print(f"HTTP Error {response.status_code}: {response.text}")
return None
# Usage example
response = requests.post("http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io/login", json={"username": "test", "password": "test"})
result = handle_api_response(response)
if result:
access_token = result.get("access_token")
print("Login successful!")
else:
print("Login failed!")
📋 Additional Information
✅ Best Practices
- All data is sent and received as JSON
- The API is optimized for modern web and mobile clients
- Always set the header
Content-Type: application/jsonfor all POST requests - Store JWT tokens securely and refresh them when expired
- Use HTTPS in production environments
- Implement proper error handling in your applications
- Respect rate limits to ensure smooth operation
Language Codes
| Code | Language |
|---|---|
0 | German |
1 | English |
2 | French |
3 | Czech |
4 | Spanish |
5 | Italian |
🛠️ Contact & Support
Need Help?
If you have any problems or questions:
- Support Address: info@realtestdata.com
- Python Example: Check the included Python example:
RealTestData_API_Generate.py - JavaScript Example: Also available:
RealTestData_API_Generate.js - Web Interface: Use the web version at
http:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io:5000orhttp:/rtdweb.proudglacier-6fd951f3.westeurope.azurecontainerapps.io:8001
Getting Started Guide
Quick Start Steps
- Install Python: Download and install Python to try the API examples
- Register: Use
/registerendpoint to create an account - Activate: Check your email and activate your account
- Login: Get your JWT token via
/login - Generate Data: Use
/generate_livefor immediate results - Configure: Customize settings via configuration endpoints
API Testing Tools
Recommended Tools
- Postman: Use the provided Postman examples
- cURL: Command-line testing with provided cURL examples
- Python: Run the included
RealTestData_API_Generate.py - JavaScript: Use
RealTestData_API_Generate.jsfor web applications - Web Interface: Test functionality through the built-in web interface
⚠️ Important Notes
- License Required: Most functionality requires a valid license
- Country Limits: Number of available countries depends on your license level
- Rate Limiting: API calls may be rate-limited based on your subscription
- Token Expiration: JWT tokens have expiration times, handle accordingly
- Email Verification: Account activation requires email verification
🎉 You're Ready to Go!
You can use this documentation directly for your frontend, for testing, or for integrations.
All examples are executable and can be easily adapted! The API includes comprehensive examples in multiple programming languages.
Happy coding with RealTestData API! 🚀