api_test.py 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import requests
  2. import json
  3. # url = "http://127.0.0.1:7960/brandcultivation/api/v1/recommend"
  4. # payload = {
  5. # "city_uuid": "00000000000000000000000011445301",
  6. # "product_code": "440298",
  7. # "recall_cust_count": 1000,
  8. # "delivery_count": 2000,
  9. # "cultivacation_id": "10000001",
  10. # "limit_cycle_name": "202502W2(02.10-02.16)"
  11. # }
  12. # headers = {'Content-Type': 'application/json'}
  13. # response = requests.post(url, data=json.dumps(payload), headers=headers)
  14. # print(response.json())
  15. # url = "http://127.0.0.1:7960/brandcultivation/api/v1/report"
  16. # payload = {
  17. # "cultivacation_id": "10000001",
  18. # }
  19. # headers = {'Content-Type': 'application/json'}
  20. # response = requests.post(url, data=json.dumps(payload), headers=headers)
  21. # print(response.json())
  22. url = "http://127.0.0.1:7960/brandcultivation/api/v1/eval_report"
  23. payload = {
  24. "city_uuid": "00000000000000000000000011445301",
  25. "product_code": "440298",
  26. "cultivacation_id": "10000001",
  27. # "limit_cycle_name": "202502W2(02.10-02.16)"
  28. "start_time": "2025/2/10",
  29. "end_time": "2025/2/16"
  30. }
  31. headers = {'Content-Type': 'application/json'}
  32. response = requests.post(url, data=json.dumps(payload), headers=headers)
  33. print(response.json())