接口示例 /api/v1.tag_mgr/getTag : 获取某标签关联的所有资源

 

  1. [root@frmstock frmtag]#
  2. [root@frmstock frmtag]# timestamp=`date +%s` ; authorization=`echo -n "d19638d0-ea32-11ed-8a52-000c2921ab31:$timestamp:/api/v1.tag_mgr/gettag" | md5sum | cut -d " " -f 1`; curl -v -k "https://tag.frmstock.org.cn/index.php/api/v1.tag_mgr/getTag" -H "authorization: $authorization" -H "timestamp: $timestamp" -H "Cookie: PHPSESSID=3f8d519d4e6ac8da868a248a5801730b;" -X POST -d "tid=644770fe9dc6d63e2e57f8c4"
  3. * About to connect() to tag.frmstock.org.cn port 443 (#0)
  4. * Trying 106.14.219.145...
  5. * Connected to tag.frmstock.org.cn (106.14.219.145) port 443 (#0)
  6. > POST /index.php/api/v1.tag_mgr/getTag HTTP/1.1
  7. > User-Agent: curl/7.29.0
  8. > Host: tag.frmstock.org.cn
  9. > Accept: */*
  10. > authorization: 83b3e3ffc8e7c0e017ed6922cd68f605
  11. > timestamp: 1683279406
  12. > Cookie: PHPSESSID=3f8d519d4e6ac8da868a248a5801730b;
  13. > Content-Length: 28
  14. > Content-Type: application/x-www-form-urlencoded
  15. >
  16. * upload completely sent off: 28 out of 28 bytes
  17. < HTTP/1.1 200 OK
  18. < Server: nginx/1.20.1
  19. < Date: Fri, 05 May 2023 09:36:46 GMT
  20. < Content-Type: text/html; charset=UTF-8
  21. < Transfer-Encoding: chunked
  22. < Connection: keep-alive
  23. < X-Powered-By: PHP/7.1.33
  24. < Expires: Thu, 19 Nov 1981 08:52:00 GMT
  25. < Cache-Control: no-store, no-cache, must-revalidate
  26. < Pragma: no-cache
  27. <
  28. * Connection #0 to host tag.frmstock.org.cn left intact
  29. {"status":0,"message":"","data":{"name":"project","id":"644770fe9dc6d63e2e57f8c4","assets":[{"asset":{"asset_id":"100002","asset_field":{"ip":"172.18.12.2","status":"0","belongto":"zl"}}},{"asset":{"asset_id":"c5cef528-49c5-4802-8966-3788d9c80ca6","asset_field":{"ip":"172.18.12.99","status":"2","belongto":"zxt","test":"test"}}}]}}
  30. [root@frmstock frmtag]#