6c86f0f571
- integrated request-module into module registry - moved backend into modules/request-module - added manifest.json and module.py - implemented dynamic router mounting - implemented dynamic static mounting - removed direct dependencies from platform core - verified startup with request-module - verified startup without request-module - added implementation_report_003.md
43 lines
1.4 KiB
Python
43 lines
1.4 KiB
Python
import json
|
|
import requests
|
|
|
|
API_KEY = 'B3526FC8-82CB-4798-92C8-22AF05F9A49F'
|
|
BASE_URL = 'https://support.atl-group.ru/api/v3'
|
|
|
|
import urllib3
|
|
urllib3.disable_warnings()
|
|
|
|
# Get ticket with conversations
|
|
url = f'{BASE_URL}/requests/23010'
|
|
params = {'TECHNICIAN_KEY': API_KEY}
|
|
|
|
resp = requests.get(url, params=params, timeout=30, verify=False)
|
|
data = resp.json()
|
|
|
|
if 'request' in data:
|
|
req = data['request']
|
|
|
|
print('Request keys:', list(req.keys()))
|
|
print()
|
|
|
|
# Check all fields for conversation-like data
|
|
for key in req.keys():
|
|
value = req[key]
|
|
if isinstance(value, list) and len(value) > 0:
|
|
print(f'{key}: {len(value)} items')
|
|
if isinstance(value[0], dict):
|
|
print(f' First item keys: {list(value[0].keys())}')
|
|
elif isinstance(value, dict):
|
|
print(f'{key}: dict with keys {list(value.keys())}')
|
|
|
|
# Check conversations endpoint
|
|
print('\nChecking conversations endpoint...')
|
|
conv_url = f'{BASE_URL}/requests/23010/conversations'
|
|
resp2 = requests.get(conv_url, params=params, timeout=30, verify=False)
|
|
print(f'Conversations endpoint status: {resp2.status_code}')
|
|
if resp2.status_code == 200:
|
|
conv_data = resp2.json()
|
|
print(f'Conversations response keys: {list(conv_data.keys())}')
|
|
if 'conversations' in conv_data:
|
|
print(f'Conversations count: {len(conv_data["conversations"])}')
|