Too much.
\ before ? for test on terminal
/tool fetch http-header-field="Accept: application/json,Key: xxxxxxx" url="https://api.abuseipdb.com/api/v2/check\?ipAddress=183.136.226.2" dst-path=mydata.txt
for put the results on one variable:
(remember to remove \ before ? on scripts)
:global thisvar ([/tool fetch http-header-field="Accept: application/json,Key: xxxxxxx" url="https://api.abuseipdb.com/api/v2/check\?ipAddress=183.136.226.2" as-value output=user]->"data")
for example if you do that query on the variable go:
{
"data":
{
"ipAddress":"183.136.226.2",
"isPublic":true,
"ipVersion":4,
"isWhitelisted":false,
"abuseConfidenceScore":100,
"countryCode":"CN",
"usageType":null,
"isp":"ChinaNet Zhejiang Province Network",
"domain":"chinatelecom.com.cn",
"hostnames":[],
"totalReports":850,
"numDistinctUsers":82,
"lastReportedAt":"2021-08-28T22:07:36+00:00"
}
}
for read for example the country code result from memorized result on memory
:global fromthis "\"countryCode\":"
:global tothis ","
:global offset [:len $fromthis]
:global varpos [:find $thisvar $fromthis -1]
:global value [:pick $thisvar ($varpos + $offset) [:find $thisvar $tothis $varpos]]
:put $value