1.1. Hash Lookup

Description

Retrieving previous scan reports using hash value

URL Path

/hash/{hash value}

Method

GET

Metadefender provides multipe ways of looking up previously processed results using hashes or known data_id. If data_id is unknown, hash value (md5, sha1, or sha256) can be used to look up known scan results. While single hash lookup provides full scan results related to hash if found, Multiple Hashes Lookup will return condensed results with links (data_ids) to full scan result.

HTTP header parameters

apikey

If API key is configured by the administrator

OPTIONAL

Method: GET

URL path

/hash/{hash value}

REQUIRED

hash value: any of the followings.

  • SHA1

  • MD5

  • SHA256

Response Codes

code

status description

note

200

OK

either result is found or not found.

400

Bad request

Not supported HTTP method or invalid http request

401

Invalid API key

Either missing API key or invalid api is passed

404

Not found

The scan result for the given data_id was not found.

503

Internal server error

Server temporary unavailable. Try again later.

Response

Only when server returns 200 OK, proper response is returned.

Example of when result is not found:

When scan results are not found, a 200 response status code appears.

Status: 200
{
"BED12FDA073BB386B54700138FB47EEA": "Not Found"
}

Response

When result is not found (example):

Status: 200 (Should be 404)
{
"4f84e3b096d54908963d037b5457bf27": "Not Found"
}

When result is found:

It will return process result. Refer to 2. Response Description.