example.yaml 993 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # IP API Lookup Template
  2. # This template fetches IP geolocation data from ip-api.com
  3. #
  4. # Mapping format:
  5. # <OutputType_field>: <response_json_path>
  6. #
  7. # Example API response from http://ip-api.com/json/8.8.8.8:
  8. # {
  9. # "query": "8.8.8.8",
  10. # "status": "success",
  11. # "country": "United States",
  12. # "city": "Mountain View",
  13. # "lat": 37.386,
  14. # "lon": -122.0838,
  15. # "isp": "Google LLC"
  16. # }
  17. name: ip-api-lookup
  18. category: Ip
  19. version: 1.0
  20. input:
  21. type: Ip
  22. key: address
  23. request:
  24. method: GET
  25. url: http://ip-api.com/json/{{address}}
  26. params:
  27. fields: query,status,country,city,lat,lon,isp
  28. timeout: 30
  29. response:
  30. expect: json
  31. map:
  32. # Ip.address <- response["query"]
  33. address: query
  34. # Ip.latitude <- response["lat"]
  35. latitude: lat
  36. # Ip.longitude <- response["lon"]
  37. longitude: lon
  38. # Ip.country <- response["country"]
  39. country: country
  40. # Ip.city <- response["city"]
  41. city: city
  42. # Ip.isp <- response["isp"]
  43. isp: isp
  44. output:
  45. type: Ip