Loading...

Score Profile API

Overview

Use the Score Profile API to get either a JSON or CSV of risk hit scoring for a specific API key.

Endpoint (6.3)

https://feed-api.ehawk.net/score/profile/

The API accepts both HTTPS POST and HTTPS GET.

For GET use the format:

https://feed-api.ehawk.net/score/profile/?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/score/profile/

Format Options

Add format option to select either json (default) or csv

For example, a JSON report using CURL:

curl -X POST -H Content-Type:application/x-www-form-urlencoded -d 'apikey=your_apikey' https://feed-api.ehawk.net/score/profile/

Or using GET to generate a CSV file:

https://feed-api.ehawk.net/score/profile/?apikey=your_apikey&format=csv

Response

The response will be a JSON string with each Incident in a new sub JSON string grouped by data type. As an example:

The response JSON contains the account and API key name in the E-HAWK Score Profile array. The hits array lists, by area, all possible hits, default scores, a description of the test, current score, last updated (if updated then user data and timestamp is appended). An example format is:

{
  "response": {
    "EHAWK Score Profile": {
      "account": "12345",
      "timestamp": "May 16 2020 14:20:04 GMT",
      "apikey_name": "Primary Key"
    },
    "hits": {
      "IP": {
        "Corporate Connection": {
          "area": "ip",
          "default_score": "1",
          "description": "IP is a Corporate connection",
          "current_score": "-1",
          "last_updated_timestamp": "2020-05-16 16:16:50",
          "updated": [
            {
              "timestamp": "May 16 2020 14:16:50 GMT",
              "user": "me@example.com",
              "score": "-1"
            }
          ]
        },
        "Invalid IP": {
          "area": "ip",
          "default_score": "-10",
          "description": "Non valid IP v4 or v6",
          "current_score": "-10",
          "last_updated_timestamp": "",
          "updated": []
        }
      }
    }
  },
  "status": 200
}

Status Codes

Status Response
200 OK (no errors)
-6 IP not in ACL
502 Invalid APIKEY or URL
Top