Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
waap_ip_info_counts_v2 = client.waap.ip_info.get_account_counts(
ip="192.168.1.1",
)
print(waap_ip_info_counts_v2.attack_types)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/waap"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
waapIPInfoCountsV2, err := client.Waap.IPInfo.GetAccountCounts(context.TODO(), waap.IPInfoGetAccountCountsParams{
IP: "192.168.1.1",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", waapIPInfoCountsV2.AttackTypes)
}
curl --request GET \
--url https://api.gcore.com/waap/v2/ip-info/counts \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/waap/v2/ip-info/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/waap/v2/ip-info/counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/waap/v2/ip-info/counts")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/waap/v2/ip-info/counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_requests": 123,
"blocked_requests": 123,
"unique_sessions": 123,
"attack_types": 123,
"domains": 123,
"paths": 123,
"user_agents": 123
}{
"type": "http-bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Invalid domain name: ''''"
}{
"detail": "Auth token is missing or invalid"
}{
"detail": "Permission denied"
}{
"type": "http-not-found",
"title": "Not Found",
"status": 404,
"detail": "The resource is not found"
}{
"type": "request-validation-failed",
"title": "Request validation error.",
"status": 422,
"detail": "One or more fields have validation errors.",
"errors": [
{
"loc": [
"body",
"name"
],
"detail": "Input should be a valid string"
},
{
"loc": [
"body",
"date"
],
"detail": "Field required"
},
{
"loc": [
"query",
"limit"
],
"detail": "Field required"
}
]
}{
"type": "internal-server-error",
"title": "Internal server error.",
"status": 500,
"detail": "An unexpected condition was encountered which prevented the server from fulfilling the request."
}IP Spotlight
Get extended IP metrics (account-wide)
Retrieve comprehensive metrics for an IP address including distinct counts of attack types, domains, paths, and user agents across all account domains
GET
/
waap
/
v2
/
ip-info
/
counts
Python
import os
from gcore import Gcore
client = Gcore(
api_key=os.environ.get("GCORE_API_KEY"), # This is the default and can be omitted
)
waap_ip_info_counts_v2 = client.waap.ip_info.get_account_counts(
ip="192.168.1.1",
)
print(waap_ip_info_counts_v2.attack_types)package main
import (
"context"
"fmt"
"github.com/G-Core/gcore-go"
"github.com/G-Core/gcore-go/option"
"github.com/G-Core/gcore-go/waap"
)
func main() {
client := gcore.NewClient(
option.WithAPIKey("My API Key"),
)
waapIPInfoCountsV2, err := client.Waap.IPInfo.GetAccountCounts(context.TODO(), waap.IPInfoGetAccountCountsParams{
IP: "192.168.1.1",
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", waapIPInfoCountsV2.AttackTypes)
}
curl --request GET \
--url https://api.gcore.com/waap/v2/ip-info/counts \
--header 'Authorization: <api-key>'const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://api.gcore.com/waap/v2/ip-info/counts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gcore.com/waap/v2/ip-info/counts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.gcore.com/waap/v2/ip-info/counts")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gcore.com/waap/v2/ip-info/counts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_requests": 123,
"blocked_requests": 123,
"unique_sessions": 123,
"attack_types": 123,
"domains": 123,
"paths": 123,
"user_agents": 123
}{
"type": "http-bad-request",
"title": "Bad Request",
"status": 400,
"detail": "Invalid domain name: ''''"
}{
"detail": "Auth token is missing or invalid"
}{
"detail": "Permission denied"
}{
"type": "http-not-found",
"title": "Not Found",
"status": 404,
"detail": "The resource is not found"
}{
"type": "request-validation-failed",
"title": "Request validation error.",
"status": 422,
"detail": "One or more fields have validation errors.",
"errors": [
{
"loc": [
"body",
"name"
],
"detail": "Input should be a valid string"
},
{
"loc": [
"body",
"date"
],
"detail": "Field required"
},
{
"loc": [
"query",
"limit"
],
"detail": "Field required"
}
]
}{
"type": "internal-server-error",
"title": "Internal server error.",
"status": 500,
"detail": "An unexpected condition was encountered which prevented the server from fulfilling the request."
}Authorizations
API key for authentication. Make sure to include the word apikey, followed by a single space and then your token.
Example: apikey 1234_abcdef
Query Parameters
The IP address to check
Response
Successful Response
The total number of requests made by the IP address
The number of requests from the IP address that were blocked
The number of unique sessions from the IP address
The number of distinct attack types (rules) that blocked requests from this IP
The number of distinct domains accessed by this IP
The number of distinct paths (URLs) accessed by this IP
The number of distinct user agents used by this IP
Was this page helpful?