WellNuo/api/WellNuo_Minimal.postman_collection.json
Sergei 1dd7eb8289 Remove hardcoded credentials and use environment variables
- Remove hardcoded database credentials from all scripts
- Remove hardcoded Legacy API tokens from backend scripts
- Remove hardcoded MQTT credentials from mqtt-test.js
- Update backend/.env.example with DB_HOST, DB_USER, DB_PASSWORD, DB_NAME
- Update backend/.env.example with LEGACY_API_TOKEN and MQTT credentials
- Add dotenv config to all scripts requiring credentials
- Create comprehensive documentation:
  - scripts/README.md - Root scripts usage
  - backend/scripts/README.md - Backend scripts documentation
  - MQTT_TESTING.md - MQTT testing guide
  - SECURITY_CREDENTIALS_CLEANUP.md - Security changes summary

All scripts now read credentials from backend/.env instead of hardcoded values.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 12:13:32 -08:00

147 lines
5.3 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"info": {
"name": "WellNuo Minimal API",
"description": "Минимальный набор полей для работы с WellNuo Legacy API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"variable": [
{
"key": "base_url",
"value": "https://eluxnetworks.net/function/well-api/api"
},
{
"key": "user_name",
"value": "robster"
},
{
"key": "password",
"value": "rob2"
},
{
"key": "token",
"value": ""
},
{
"key": "mini_photo",
"value": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAABAAEDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAn/xAAUEAEAAAAAAAAAAAAAAAAAAAAA/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAX/xAAUEQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIRAxEAPwCwAB//2Q=="
}
],
"item": [
{
"name": "1. Get Token (RUN FIRST!)",
"event": [
{
"listen": "test",
"script": {
"exec": [
"var jsonData = pm.response.json();",
"if (jsonData.access_token) {",
" pm.collectionVariables.set(\"token\", jsonData.access_token);",
" console.log(\"Token saved!\");",
"}"
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{ "key": "function", "value": "credentials", "type": "text" },
{ "key": "user_name", "value": "{{user_name}}", "type": "text" },
{ "key": "ps", "value": "{{password}}", "type": "text" },
{ "key": "clientId", "value": "001", "type": "text" },
{ "key": "nonce", "value": "{{$timestamp}}", "type": "text" }
]
},
"url": {
"raw": "{{base_url}}",
"host": ["{{base_url}}"]
}
}
},
{
"name": "2. Create Deployment (set_deployment)",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{ "key": "function", "value": "set_deployment", "type": "text" },
{ "key": "user_name", "value": "{{user_name}}", "type": "text" },
{ "key": "token", "value": "{{token}}", "type": "text" },
{ "key": "deployment", "value": "NEW", "type": "text" },
{ "key": "beneficiary_name", "value": "Test User", "type": "text" },
{ "key": "beneficiary_email", "value": "test{{$timestamp}}@example.com", "type": "text" },
{ "key": "beneficiary_user_name", "value": "testuser{{$timestamp}}", "type": "text" },
{ "key": "beneficiary_password", "value": "test123", "type": "text" },
{ "key": "beneficiary_address", "value": "Test Address", "type": "text" },
{ "key": "beneficiary_photo", "value": "{{mini_photo}}", "type": "text" },
{ "key": "firstName", "value": "Test", "type": "text" },
{ "key": "lastName", "value": "User", "type": "text" },
{ "key": "first_name", "value": "Test", "type": "text" },
{ "key": "last_name", "value": "User", "type": "text" },
{ "key": "new_user_name", "value": "testuser{{$timestamp}}", "type": "text" },
{ "key": "phone_number", "value": "+10000000000", "type": "text" },
{ "key": "key", "value": "test123", "type": "text" },
{ "key": "signature", "value": "Test", "type": "text" },
{ "key": "gps_age", "value": "0", "type": "text" },
{ "key": "wifis", "value": "[]", "type": "text" },
{ "key": "devices", "value": "[]", "type": "text" }
]
},
"url": {
"raw": "{{base_url}}",
"host": ["{{base_url}}"]
}
}
},
{
"name": "3. List Deployments",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{ "key": "function", "value": "deployments_list", "type": "text" },
{ "key": "user_name", "value": "{{user_name}}", "type": "text" },
{ "key": "token", "value": "{{token}}", "type": "text" },
{ "key": "first", "value": "0", "type": "text" },
{ "key": "last", "value": "100", "type": "text" }
]
},
"url": {
"raw": "{{base_url}}",
"host": ["{{base_url}}"]
}
}
},
{
"name": "4. Get Deployment by ID",
"request": {
"method": "POST",
"header": [],
"body": {
"mode": "urlencoded",
"urlencoded": [
{ "key": "function", "value": "get_deployment", "type": "text" },
{ "key": "user_name", "value": "{{user_name}}", "type": "text" },
{ "key": "token", "value": "{{token}}", "type": "text" },
{ "key": "deployment_id", "value": "21", "type": "text" },
{ "key": "date", "value": "{{$isoTimestamp}}", "type": "text" }
]
},
"url": {
"raw": "{{base_url}}",
"host": ["{{base_url}}"]
}
}
}
]
}