Skip to content

Commit 85059e0

Browse files
committed
changed URI endpoint schema, added extended param to reports
1 parent 2295940 commit 85059e0

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

fireeyepy/__init__.py

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,17 @@ def submit_file(self, body=None, files=None):
7171
Returns:
7272
dict -- Returns a dict of the http response.
7373
"""
74-
return self.post(self.api_host, "/file-submit", body, files)
74+
return self.post(self.api_host, "/files", body, files)
7575

76-
def get_file_result(self, submission_id):
77-
"""Allows you to get the full malware analysis results of a given malware analysis submission id.
78-
79-
Arguments:
80-
submission_id {string} -- This is a Detection On Demand submission id, typically received in the response of submit_file().
76+
def get_report(self, report_id, extended=False):
77+
"""Allows you to get a list of all of your submissions.
8178
8279
Returns:
83-
dict -- Returns a dict of the http response.
80+
dict -- Returns a dict of all of the submissions under your API key.
8481
"""
85-
return self.get(self.api_host, "/file-result", {"submission_id": submission_id})
82+
return self.get(self.api_host, "/reports/{}".format(report_id), {"extended": extended})
8683

87-
def get_hash_lookup(self, hash):
84+
def get_hash(self, hash):
8885
"""Allows you to get the malware analysis results for a given hash.
8986
9087
Arguments:
@@ -93,15 +90,7 @@ def get_hash_lookup(self, hash):
9390
Returns:
9491
dict -- Returns a dict of the http response.
9592
"""
96-
return self.get(self.api_host, "/hash-lookup", {"hash": hash})
97-
98-
def get_submissions(self):
99-
"""Allows you to get a list of all of your submissions.
100-
101-
Returns:
102-
dict -- Returns a dict of all of the submissions under your API key.
103-
"""
104-
return self.get(self.api_host, "/get-submissions")
93+
return self.get(self.api_host, "/hashes/{}".format(hash))
10594

10695
def get(self, host, request_uri, params=None):
10796
uri = "https://{host}{request_uri}".format(host=host, request_uri=request_uri)

0 commit comments

Comments
 (0)