api_test.py 1.1 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": 1000,
  8. # "delivery_count": 2000,
  9. # "cultivacation_id": "10000002",
  10. # "limit_cycle_name": "202505W2(05.012-05.18)"
  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": "10000002",
  27. "limit_cycle_name": "202502W2(02.10-02.16)"
  28. }
  29. headers = {'Content-Type': 'application/json'}
  30. response = requests.post(url, data=json.dumps(payload), headers=headers)
  31. print(response.json())