Get a List of All Reputations
Endpoint URL: https://<your server>/rest/classification/download
Endpoint URI: classification/download
Action: GET
Returns a CSV list of custom reputations for files, IP addresses, and domain names. These reputations are specific to your organization.
Note
Ensure that you have logged into the Cybereason platform. For details, see Log in with the API.
Request Headers
You must add an Content-Type:application/json header with the request.
Note
If you are using cURL, add the authorization cookie details or the path to the file with cookie details with every request.
Request Body
None
Request Parameters
URL/URI parameters: none
Request Body Parameters: none
Response Status Codes
This request can return the following status codes:
200: Success OK or an error message saying why
Response Success Schema
The response contains a comma-delimited (CSV) list of items, including:
key: The file hash value, IP address, or domain name for the custom reputation
reputation: The custom reputation, either whitelist or blacklist
prevent execution: The prevention status for Application Control, either true or false
comment: Any custom comments added to the reputation classification.
remove: Instructs the platform whether or not to overwrite the existing reputation.
Response Failure Schema
None
Example: Download the reputations list
Request
curl --request GET \
--url https://12.34.56.78/rest/classification/download \
--header 'Content-Type:application/json' \
Response
key,reputation,prevent execution,comment,remove
11.11.11.11,whitelist,false,null,false
12.12.12.12,blacklist,false,null,false
13.131.13.131,whitelist,false,null,false
xn--wgv12a13e.us,blacklist,false,null,false
www.website.com,blacklist,false,null,false
mail.ru.net,blacklist,false,null,false
Request
Response
key,reputation,prevent execution,comment,remove
11.11.11.11,whitelist,false,null,false
12.12.12.12,blacklist,false,null,false
13.131.13.131,whitelist,false,null,false
xn--wgv12a13e.us,blacklist,false,null,false
www.website.com,blacklist,false,null,false
mail.ru.net,blacklist,false,null,false
Request
Depending on your browser settings, this linked file may open in a separate tab instead of downloading directly to your machine. If this happens, use the Save As option in your browser to save the file locally.
import requests
import json
# Login information
username = "[email protected]"
password = "mypassword"
server = "myserver.com"
port = "443"
data = {
"username": username,
"password": password
}
headers = {"Content-Type": "application/json"}
base_url = "https://" + server + ":" + port
login_url = base_url + "/login.html"
session = requests.session()
login_response = session.post(login_url, data=data, verify=True)
print (login_response.status_code)
print (session.cookies.items())
# Request URL
endpoint_url = "/rest/classification/download"
api_url = base_url + endpoint_url
api_headers = {'Content-Type':'application/json'}
api_response = session.request("GET", api_url, headers=api_headers)
print(api_response.content)
Response
key,reputation,prevent execution,comment,remove
11.11.11.11,whitelist,false,null,false
12.12.12.12,blacklist,false,null,false
13.131.13.131,whitelist,false,null,false
xn--wgv12a13e.us,blacklist,false,null,false
www.website.com,blacklist,false,null,false
mail.ru.net,blacklist,false,null,false