api_test.py 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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": 500,
  8. "delivery_count": 1100,
  9. "cultivacation_id": "10000001",
  10. "limit_cycle_name": "202505W1(05.05-05.11)"
  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. # "city_uuid": "00000000000000000000000011445301",
  18. # "product_code": "440298",
  19. # }
  20. # headers = {'Content-Type': 'application/json'}
  21. # response = requests.post(url, data=json.dumps(payload), headers=headers)
  22. # print(response.json())
  23. # url = "http://127.0.0.1:7960/brandcultivation/api/v1/eval_report"
  24. # payload = {
  25. # "city_uuid": "00000000000000000000000011445301",
  26. # "product_code": "440298",
  27. # "start_time": "2025/2/10",
  28. # "end_time": "2025/2/16"
  29. # }
  30. # headers = {'Content-Type': 'application/json'}
  31. # response = requests.post(url, data=json.dumps(payload), headers=headers)
  32. # print(response.json())