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.1 KiB
Python
43 lines
1.1 KiB
Python
import requests
|
|
import json
|
|
|
|
API_KEY = 'B3526FC8-82CB-4798-92C8-22AF05F9A49F'
|
|
BASE_URL = 'https://support.atl-group.ru/api/v3'
|
|
|
|
import urllib3
|
|
urllib3.disable_warnings()
|
|
|
|
# Try different listInfo format
|
|
url = BASE_URL + '/requests'
|
|
params = {
|
|
'TECHNICIAN_KEY': API_KEY,
|
|
'listInfo': '{"row_count":100,"start_index":1,"sort_field":"id","sort_order":"asc"}'
|
|
}
|
|
|
|
resp = requests.get(url, params=params, timeout=30, verify=False)
|
|
data = resp.json()
|
|
|
|
print('With compact listInfo:')
|
|
print('Requests count:', len(data.get('requests', [])))
|
|
print('List info:', json.dumps(data.get('list_info', {}), indent=2))
|
|
|
|
# Try with input_data
|
|
params2 = {
|
|
'TECHNICIAN_KEY': API_KEY,
|
|
'input_data': json.dumps({
|
|
'list_info': {
|
|
'row_count': 100,
|
|
'start_index': 1,
|
|
'sort_field': 'id',
|
|
'sort_order': 'asc'
|
|
}
|
|
})
|
|
}
|
|
|
|
resp2 = requests.get(url, params=params2, timeout=30, verify=False)
|
|
data2 = resp2.json()
|
|
|
|
print('\nWith input_data:')
|
|
print('Requests count:', len(data2.get('requests', [])))
|
|
print('List info:', json.dumps(data2.get('list_info', {}), indent=2))
|