Skip to main content

Network Reputation User Override API (TCA-0408) — Spectra Intelligence

The Network Reputation User Override service enables URL, domain, and IP address classification overrides and override removals. Any URL, domain, or IP address can be overridden to malicious, suspicious, or known, and any classification override can be removed. Users can make up to a total of 100 overrides and override removals in a single request. Overrides are visible to all users within the same organization. For your organization, a user override takes precedence over a ReversingLabs analyst override on the same network location. The service also supports listing existing overrides.

Network Location User Override Query​

This query sends network data to be overridden, and returns a list of network locations that were successfully overridden along with a list of invalid network locations and a list of network locations for which the override was successfully removed. All the parameters must be passed in the request body (either as JSON or XML).

View OpenAPI Specification

Request​

POST /api/networking/user_override/v1/query/{post_format}
  • post_format
    • allows choosing between XML and JSON format in the POST payload

Request body​

{
"rl": {
"query": {
"user_override": {
"override_network_locations": [
{
"network_location": "string",
"type": "string",
"TTL": "string",
"classification": "string",
"threat_level": "string",
"categories": [
"string"
]
}
],
"remove_overrides": [
{
"network_location": "string",
"type": "string"
}
]
},
"response_format": "string"
}
}
}
  • override_network_locations
    • List of network locations that the user wants to override
    • Optional
  • network_location
    • Network location that the user wants to override. For IP addresses, this can also be a CIDR block or an IP range. See IP address overrides.
    • Required
  • type
    • Type of URI that was listed in the network_location parameter. Supported types: url, domain, ip.
    • Required
  • TTL
    • Specifies the duration (in seconds) for which an override is valid. It defines the lifespan of the override before it expires and needs to be reassessed or renewed. In case the TTL is not set, there will be no expiration.
    • Optional
  • classification
    • Classification assigned to the network location in network_location. Allowed types correspond to the ReversingLabs classification scheme: malicious, suspicious, known, unknown.
    • Required
  • threat_level
    • Malware severity indicator for suspicious and malicious network locations, expressed as an integer between 0 and 5, where 5 indicates the most dangerous threats (highest severity). In case the value is not set, default values will be assigned based on the classification of the network location. For known network locations, the allowed value is 0. If the value is not set, the default value is 0. For suspicious and malicious network locations, the allowed values are 1, 2, 3, 4, or 5. If the value is not set, the default value is 5. For unknown network locations, setting the value is not allowed, and the value will default to None.
    • Optional
  • categories
    • List of categories that the URI in question belongs to. List items are strings. The strings are arbitrary values.
    • Optional
  • remove_overrides
    • List of network locations that the user wants to remove overrides from. Items in this list are objects. An object must contain two fields: network_location and type. These fields take in the same types of values as their equivalents in the override_network_locations parameter.
    • Optional
  • response_format
    • Allows choosing between XML and JSON format for the response. Default is xml.
    • Optional

The request body of the query must contain the override_network_locations field or the remove_overrides field or both.

IP address overrides​

When type is ip, network_location accepts IPv4 and IPv6 values in these forms:

  • A single IP address: 1.2.3.4, 2606:4700:10::6814:179a
  • A CIDR block: 1.2.3.0/24, 2001:db8:abcd:1234::/120
  • An IP range, with the first and last address separated by a dash: 1.2.3.0-1.2.4.255, 2001:db8:abcd:1234::1-2001:db8:abcd:1234::ff

Values that aren't a valid IP address, CIDR block, or IP range are returned in invalid_network_locations. A range is valid only if both addresses use the same IP version and the first address isn't higher than the last. Spaces around a value are ignored, but tabs, line breaks and other whitespace characters make it invalid.

The service normalizes IP values before storing them, and responses return the normalized form:

  • Leading and trailing spaces are removed.
  • IPv4 addresses are written without leading zeros: 01.02.03.004 becomes 1.2.3.4.
  • IPv6 addresses are compressed and lowercase: 2606:4700:0010:0000:0000:0000:6814:179A becomes 2606:4700:10::6814:179a. IPv4-mapped IPv6 addresses keep the mixed notation: ::ffff:1.2.3.4.
  • A CIDR block or range that covers a single address becomes that address: 1.2.3.4/32 and 1.2.3.4-1.2.3.4 become 1.2.3.4.
  • Any other CIDR block becomes a range from its first to its last address: 1.2.3.0/24 becomes 1.2.3.0-1.2.3.255, and 2001:db8:abcd:1234::/120 becomes 2001:db8:abcd:1234::-2001:db8:abcd:1234::ff. The block is calculated from the mask, so 1.2.3.5/24 also becomes 1.2.3.0-1.2.3.255.
  • Ranges stay ranges, even when they match a CIDR block.

remove_overrides accepts any equivalent form of a stored value. For example, 1.2.3.0/24 removes the override stored as 1.2.3.0-1.2.3.255.

When an IP address matches more than one override, the override with the smallest range applies. If several overrides of the same size match, the most severe classification applies: malicious over suspicious, and suspicious over known.

Response​

{
"rl": {
"user_override": {
"created_overrides": [],
"removed_overrides": []
}
}
}

rl.user_override.created_overrides[] and rl.user_override.removed_overrides[]

{
"network_location": "string",
"type": "string",
"ttl": 0,
"classification": "string",
"categories": [
"string"
],
"reason": "string",
"threat_level": 0
}
  • created_overrides
    • List of network locations for which overrides were created.
  • network_location
    • The overridden URI.
  • type
    • Type of URI that was listed in the network_location parameter.
  • TTL
    • Duration (in seconds) specified by the user for which an override is valid. It defines the lifespan of the override before it expires and needs to be reassessed or renewed. In case the TTL is not set, there will be no expiration.
  • classification
    • Classification that the user listed in the request.
  • threat_level
    • Malware severity indicator for suspicious and malicious URIs, expressed as an integer between 0 and 5, where 5 indicates the most dangerous threats (highest severity). In case the value is not set, default values will be assigned based on the classification of the URI. For known URIs, the allowed value is 0. If the value is not set, the default value is 0. For suspicious and malicious URIs, the allowed values are 1, 2, 3, 4, or 5. If the value is not set, the default value is 5. For unknown URIs, setting the value is not allowed, and the value will default to None.
  • categories
    • List of categories that the requested URI belongs to.
  • removed_overrides
    • List of network locations from which overrides were removed, along with their type.
  • invalid_network_locations
    • List of invalid network locations.

List User Network Location Overrides Query​

This query returns the list of overrides that the user has made.

View OpenAPI Specification

Request​

GET /api/networking/user_override/v1/query/list_overrides?[format=xml|json]&next_network_location={next page SHA1}&type=[url|domain|ip]

Query parameters​

  • next_network_location: SHA1 hash of the next network location in the response. In case the response has reached the maximum number of entries for a single response (1000), paging is used.
  • format: response format (JSON/XML)
  • type: type of network location to filter by. Supported types: url, domain, ip. Default value is url, so listing IP address overrides requires type=ip.

Response format​

{
"rl": {
"user_override": {
"next_network_location": "string",
"network_locations": []
}
}
}

rl.user_override.network_locations[]

{
"network_location": "string",
"type": "string",
"classification": "string"
}
  • network_location
    • Network location (URI) that is overridden.
  • type
    • Type of network location. Supported types: url, domain, ip.
  • classification
    • Classification assigned to the URI in network_location. Allowed types correspond to the ReversingLabs classification scheme: malicious, suspicious, known, unknown.
  • expiration_time
    • The specific time and date when the override will expire, calculated based on the TTL value provided. If the TTL is not set, the expiration_time will indicate no expiration.
  • threat_level
    • Malware severity indicator for suspicious and malicious URIs, expressed as an integer between 0 and 5, where 5 indicates the most dangerous threats (highest severity). In case the value is not set, default values will be assigned based on the classification of the URI. For known URIs, the allowed value is 0. If the value is not set, the default value is 0. For suspicious and malicious URIs, the allowed values are 1, 2, 3, 4, or 5. If the value is not set, the default value is 5. For unknown URIs, setting the value is not allowed, and the value will default to None.

Examples​

Example 1​

This request assigns an override to two network locations, and removes an existing override from a third network location. One of the new overrides is invalid.

Request:

/api/networking/user_override/v1/query/json
{
"rl": {
"query": {
"user_override": {
"override_network_locations": [
{
"network_location": "https://location-example.com",
"type": "url",
"classification": "malicious",
"categories": [
"phishing"
]
},
{
"network_location": "http://test.com",
"type": "url",
"classification": "suspicious"
}
],
"remove_overrides": [
{
"network_location": "https://example.com",
"type": "url"
}
]
},
"response_format": "json"
}
}
}

Response:

{
"rl": {
"user_override": {
"created_overrides": [
{
"network_location": "https://location-example.com",
"type": "url",
"classification": "malicious",
"categories": [
"phishing"
]
}
],
"removed_overrides": [
{
"network_location": "https://example.com",
"type": "url"
}
],
"invalid_network_locations": [
"http://test.com"
]
}
}
}

Example 2​

This request returns a list of overrides by the user.

Request:

/api/networking/user_override/v1/query/list_overrides?format=json

Response:

{
"rl": {
"user_override": {
"network_locations": [
{
"network_location": "https://location-example.com",
"type": "url",
"classification": "malicious"
}
],
"next_network_location": "9865c7ecda437034e1513cc43ae9a1f6f334bb7f"
}
}
}

Example 3​

This request returns a list of overrides by the user, in paginated form.

Request:

/api/networking/user_override/v1/query/list_overrides?next_network_location=9865c7ecda437034e1513cc43ae9a1f6f334bb7f&format=json

Response:

{
"rl": {
"user_override": {
"network_locations": [
{
"network_location": "https://location-example.com",
"type": "url",
"classification": "malicious"
}
],
"next_network_location": null
}
}
}

Example 4​

This request overrides a CIDR block and an IPv6 address, and includes an invalid IP address. The response returns the overrides in normalized form: the CIDR block as a range, and the IPv6 address compressed and lowercase. The invalid value is listed in invalid_network_locations.

Request:

/api/networking/user_override/v1/query/json
{
"rl": {
"query": {
"user_override": {
"override_network_locations": [
{
"network_location": "198.51.100.5/24",
"type": "ip",
"classification": "known"
},
{
"network_location": "2001:DB8:FEED:0:0:0:0:7",
"type": "ip",
"classification": "known"
},
{
"network_location": "999.1.1.1",
"type": "ip",
"classification": "known"
}
]
},
"response_format": "json"
}
}
}

Response:

{
"rl": {
"user_override": {
"created_overrides": [
{
"network_location": "198.51.100.0-198.51.100.255",
"type": "ip",
"classification": "known",
"reason": "user_override",
"threat_level": 0
},
{
"network_location": "2001:db8:feed::7",
"type": "ip",
"classification": "known",
"reason": "user_override",
"threat_level": 0
}
],
"invalid_network_locations": [
"999.1.1.1"
]
}
}
}

Custom Response Status Codes​

This API implements custom response status codes. Find a complete list of possible HTTP response codes and their descriptions in the General section of the documentation.

CODEDESCRIPTION
413The request contained more than the maximum allowed amount of network locations (100).