Report API
Overview
Use the Report API to grab the JSON responses from previous API Vetting calls made within the last 30 days. This can be used to add scoring and risk hit meta-data to other systems such Hadoop, Tableau, and Splunk or train LLMs.
Endpoint (7.0)
https://feed-api.ehawk.net/report/
The API accepts both HTTPS POST and HTTPS GET.
For GET use the format:
https://feed-api.ehawk.net/report/function/?keyword=value
When using POST, make sure to have Content-Type: application/x-www-form-urlencoded
CURL POST API call example:
curl -X POST -H Content-Type:application/x-www-form-urlencoded -d 'apikey=your_apikey' https://feed-api.ehawk.net/report/function/
API Function
Select the action to take using function values:
data search for items matching username lead_id transaction_id
Send up to 100 combinations of lead_id/username/transaction_id name/value pairs. Use []= to create array with multiple items. GET example for two lead_ids:
https://feed-api.ehawk.net/report/data?apikey=your_apikey&lead_id[]=10&lead_id[]=12
date Start report at specific time using start or start_epoch
Send start timestamp in format of UTC-1 string without timezone: 2017-06-23 19:54:23, or start_epoch in Unix timestamp: 1498247663. For example:
https://feed-api.ehawk.net/report/date?apikey=your_apikey&start=2017-06-23%2019:54:23
Response
The response will be a JSON with each vetting API response in a new sub JSON string plus the addition of a counts array. As an example:
{
"pagination": {
"page": 1,
"lastpage": 1,
"num": 100,
"count": 1,
"total": 1
},
"response": [
JSON API responses 1...n,
],
"status": 200
}
"counts": {
"ip": 3,
"email": 4,
"emaildomain": 28
}
Where the counts array lists the related times that data point has been seen over the last 30 days. These counts are updated in real time so they will change as new data is added. In this example, the IP has 3 records, the email 4, and the emaildomain 28. To get a list of all usernames that have used the same IP, you could make a following call using the related function:
https://feed-api.ehawk.net/report/related?apikey=your_apikey&value=10.1.1.1&type=ip
{
"response": {
"type": "ip",
"usernames": [
"1213456",
"2356985",
"6599987"
]
},
"status": 200
}
Supported types for the related function are: phone ip emaildomain domain name email The function supports pagination.
Optional Marketing Append
You can add additional marketing data to the JSON response by using marketing=append
"marketing": {
"timestamp": "2022-06-30 13:42:33 GMT+2",
"lead_id": "12345",
"lead_source": "Source Name",
"sub_id": "100",
"campaign": "Campaign Name",
"postalcode": "12345"
}
For example:
https://feed-api.ehawk.net/report/data?apikey=your_apikey&lead_id[]=12345&marketing=append
Paging
Report API calls are limited to 500 rows. Use optional paging commands to page through large data sets.
page Default page starts at 1. Increase for each additional block of records. For example, for page 10
https://feed-api.ehawk.net/report/date?apikey=your_apikey&start=2017-06-23%2019:54:23&page=10
num number of records returned. Default is 100 and max is 500.
https://feed-api.ehawk.net/report/date?apikey=your_apikey&start=2017-06-23%2019:54:23&page=10&num=500
Pagination details are:
- page: requested page
- lastpage: total number of pages
- num: requested num (number of records)
- count: number of records in this page
- total: total of available records in search filters
Status Codes
| Status | Response |
|---|---|
| 200 | OK (no errors) |
| -6 | IP not in ACL |
| 502 | Invalid APIKEY or URL |
