| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import requests
- import json
- url = "http://127.0.0.1:7960/brandcultivation/api/v1/recommend"
- payload = {
- "city_uuid": "00000000000000000000000011440801",
- "product_code": "440308",
- "recall_cust_count": 200,
- "delivery_count": 200,
- "cultivacation_id": "10000001",
- "limit_cycle_name": "202603W4(03.21-03.29)"
- }
- headers = {'Content-Type': 'application/json'}
- response = requests.post(url, data=json.dumps(payload), headers=headers)
- result = response.json()
- print(result)
- with open("api_test_result.json", "w", encoding="utf-8") as f:
- json.dump(result, f, ensure_ascii=False, indent=2)
- # url = "http://127.0.0.1:7960/brandcultivation/api/v1/report"
- # payload = {
- # "cultivacation_id": "10000001",
- # }
- # headers = {'Content-Type': 'application/json'}
- # response = requests.post(url, data=json.dumps(payload), headers=headers)
- # print(response.json())
- # url = "http://127.0.0.1:7960/brandcultivation/api/v1/eval_report"
- # payload = {
- # "city_uuid": "00000000000000000000000011445301",
- # "product_code": "440298",
- # "cultivacation_id": "10000001",
- # # "limit_cycle_name": "202502W2(02.10-02.16)"
- # "start_time": "2025/2/10",
- # "end_time": "2025/2/16"
- # }
- # headers = {'Content-Type': 'application/json'}
- # response = requests.post(url, data=json.dumps(payload), headers=headers)
- # print(response.json())
|