Developer Guide

This is the API documentation for OPSWAT Filescan API. If you would like to evaluate or have any questions about this documentation, please contact us via our Contact Us form.

apiKey apiKey
Fields
KeyIn
X-Api-KeyHeader

Scan

Upload file or URL resource for scan

Scan URL

Scan URL resource

Auth
Request Body
Body_scan_file_api_scan_url_postobject
save_presetboolean

Default: false

urlstring

Url of internet resource to be scanned

descriptionstring

Uploaded file/url description

tagsstring

Tags array to propagate

propagate_tagsboolean

If tags from description should be added to produced report(s)

Default: true

passwordstring

Custom password, in case uploaded archive is protected

is_privateboolean

If file should not be available for download by other users

skip_whitelistedboolean

If file is detected as whitelisted, report is not created

POST /api/scan/url
curl --request POST \
--url 'https://opswat.developerhub.io/api/scan/url' \
--header 'X-Api-Key: {X-Api-Key}' \
--data 'save_preset={save_preset}' \
--data 'url={url}' \
--data 'description={description}' \
--data 'tags={tags}' \
--data 'propagate_tags=true' \
--data 'password={password}' \
--data 'is_private={is_private}' \
--data 'skip_whitelisted={skip_whitelisted}'
Copy
Responses
200

Successful Response

URL Upload Was Successfulobject
flow_idstring
priorityobject
appliedinteger
max_possibleinteger
422

Validation Error

Response
{
"flow_id": "0123456789abcdefghijklmn",
"priority": {
"applied": 20,
"max_possible": 100
}
}
Copy

Scan File

Perform a scan of the uploaded file. After you submit a file for scanning you'll get the flow_id which is required to poll the result.

Auth
Request Body
Body_scan_file_api_scan_file_postobject
filefile
save_presetboolean

Default: false

descriptionstring

Uploaded file/url description

tagsstring

Tags array to propagate

propagate_tagsboolean

If tags from description should be added to produced report(s)

Default: true

passwordstring

Custom password, in case uploaded archive is protected

is_privateboolean

If file should not be available for download by other users

skip_whitelistedboolean

If file is detected as whitelisted, report is not created

POST /api/scan/file
curl --request POST \
--url 'https://opswat.developerhub.io/api/scan/file' \
--header 'X-Api-Key: {X-Api-Key}' \
--form 'file=@{file}'
Copy
Responses
200

Successful Response

File Upload Was Successfulobject
flow_idstring
priority3 fieldsobject
422

Validation Error

Response
{
"flow_id": "0123456789abcdefghijklmn",
"priority": {
"applied": 20,
"max_possible": 100,
"note": "In order to receive max possible scan priority, please ensure the last scan request is older than 60 seconds, and do not perform more than 60 scan requests per hour."
}
}
Copy

Search Report

Search for reports.

Finds reports and uploaded files by various tokens, like hash, filename, verdict, IOCs etc.

If query param is used, other params are ignored.

Auth
Query String
ageinteger

Search reports with age of "age" days

Default: -1

pageinteger

Page number starting from 1

Default: 1

page_size

Page size

Default: 10

method

Default: and

querystring
filenamestring
source_typestring

Enum: url,url-to-file,file

filetypestring

Enum: 64bits,7zip,ace,apk,bat,bmp,csv,doc,docm,docx,dot,dotm,dotx,eml,elf,gif,hta,htm,html,img,iso,java,java-bytecode,javascript,jpg,lnk,mbox,mthml,msg,msi,mso,ole,pdf,pedll,peexe,png,ppt,pptm,pptx,pot,potm,potx,ps,pub,powershell,rar,rfc822,rtf,svg,txt,vbs,wmv,wsf,xls,xlsm,xlsb,xlsx,xlt,xltm,xltx,xsl,zip,exe,mail,ms-office,script

media_typestring
verdictstring

Enum: benign,informational,suspicious,likely_malicious,malicious,unknown

tagstring
tagsstring
date_fromstring
date_tostring
rate_frominteger
rate_tointeger
domainstring
ipstring
urlstring
uuidstring
emailstring
registry_pathstring
revision_save_idstring
sha1string
sha256string
sha512string
md5string
imphashstring
ssdeepstring
fuzzyfsiohashstring
authentihashstring
yara_rulestring
retry_countinteger
scan_init_idstring
report_idstring
signal_groupsstring
mitre_techniquesstring
verdict_groupsstring
main_task_state

Default: success

excludestring
GET /api/reports/search
curl --get \
--url 'https://opswat.developerhub.io/api/reports/search' \
--header 'X-Api-Key: {X-Api-Key}' \
--data age=-1 \
--data page=1 \
--data page_size=10 \
--data method=and \
--data query={query} \
--data filename={filename} \
--data source_type={source_type} \
--data filetype={filetype} \
--data media_type={media_type} \
--data verdict={verdict} \
--data tag={tag} \
--data tags={tags} \
--data date_from={date_from} \
--data date_to={date_to} \
--data rate_from={rate_from} \
--data rate_to={rate_to} \
--data domain={domain} \
--data ip={ip} \
--data url={url} \
--data uuid={uuid} \
--data email={email} \
--data registry_path={registry_path} \
--data revision_save_id={revision_save_id} \
--data sha1={sha1} \
--data sha256={sha256} \
--data sha512={sha512} \
--data md5={md5} \
--data imphash={imphash} \
--data ssdeep={ssdeep} \
--data fuzzyfsiohash={fuzzyfsiohash} \
--data authentihash={authentihash} \
--data yara_rule={yara_rule} \
--data retry_count={retry_count} \
--data scan_init_id={scan_init_id} \
--data report_id={report_id} \
--data signal_groups={signal_groups} \
--data mitre_techniques={mitre_techniques} \
--data verdict_groups={verdict_groups} \
--data main_task_state=success \
--data exclude={exclude}
Copy
Responses
200

Successful Response

ReportSearchResponseobject

Search response returned to user

itemsarray
countinteger
count_search_paramsinteger
methodstring
dbs_syncboolean
400

Bad request

422

Validation Error

Response
{
"items": [
"{array...}"
],
"count": "{integer}",
"count_search_params": "{integer}",
"method": "{string}",
"dbs_sync": "{boolean}"
}
Copy

Get Most Interesting

Get most interesting report recently

Auth
GET /api/users/most-interesting
curl --get \
--url 'https://opswat.developerhub.io/api/users/most-interesting' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get Frequent Tags

Get most frequently seen tags recently

Auth
GET /api/users/get-frequent-tags
curl --get \
--url 'https://opswat.developerhub.io/api/users/get-frequent-tags' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get All Files

Obtain all files for given report

Auth
Path Params
report_idstring
Query String
type

Default: all

with_contentboolean

Compressed base64 data

Default: false

GET /api/reports/{report_id}/files
curl --get \
--url 'https://opswat.developerhub.io/api/reports/{report_id}/files' \
--header 'X-Api-Key: {X-Api-Key}' \
--data type=all \
--data with_content={with_content}
Copy
Responses
200

Successful Response

Successful Responseobject
404

Item not found

422

Validation Error

Response
{
"key": "value"
}
Copy

Get Specific Report

Obtain a report for given report_id.

Auth
Path Params
report_idstring

Report Id

file_hashstring

File hash

Query String
filterarray

Report fields that should be fetched

sortingarray

Sort parameters to be applied to fetched report data

otherarray

Extra options to get special data

GET /api/reports/{report_id}/{file_hash}
curl --get \
--url 'https://opswat.developerhub.io/api/reports/{report_id}/{file_hash}' \
--header 'X-Api-Key: {X-Api-Key}' \
--data filter=%5Bobject%20Object%5D \
--data sorting=allSignalGroups(description:asc,averageSignalStrength:desc),allTags(tag.name:asc) \
--data other=emulationGraph
Copy
Responses
200

Successful Response

Successful Responseobject
400

Bad request

404

Item not found

422

Validation Error

Response
{
"key": "value"
}
Copy

Files

Get a file by its hash or id in various format

Get Single File

Obtain single file for given report by file id or hash

Auth
Path Params
hashstring

File hash

Query String
report_idstring

Report Id

type

Default: base64

original_nameboolean

Default: false

passwordstring

Password to be used on compression

GET /api/files/{hash}
curl --get \
--url 'https://opswat.developerhub.io/api/files/{hash}' \
--header 'X-Api-Key: {X-Api-Key}' \
--data report_id={report_id} \
--data type=base64 \
--data original_name={original_name} \
--data password={password}
Copy
Responses
200

Successful Response

Successful Responseobject
404

Item not found

422

Validation Error

Response
{
"key": "value"
}
Copy

Get Feed Info

Get reports feed info

Auth
GET /api/feed/info
curl --get \
--url 'https://opswat.developerhub.io/api/feed/info' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get Feed

Get reports feed.

For API documentation page we show smaller amount of reports. To get full feed, query feed endpoint directly from browser address bar or from any suitable app.

Auth
GET /api/feed/atom
curl --get \
--url 'https://opswat.developerhub.io/api/feed/atom' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Users

Report-related and other functionality used by ordinary users.

Get Uploads

Get list of uploaded files

Auth
Query String
pageinteger

Page number starting from 1

Default: 1

page_size

Page size

Default: 10

GET /api/users/uploads
curl --get \
--url 'https://opswat.developerhub.io/api/users/uploads' \
--header 'X-Api-Key: {X-Api-Key}' \
--data page=1 \
--data page_size=10
Copy
Responses
200

Successful Response

Successful Responseobject
400

Bad request

422

Validation Error

Response
{
"key": "value"
}
Copy

Get Avatar Image

Get use avatar image

Auth
Path Params
account_idstring
GET /api/users/{account_id}/avatar
curl --get \
--url 'https://opswat.developerhub.io/api/users/{account_id}/avatar' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
{
"key": "value"
}
Copy

Get Translations

Obtain translations for specific language

Auth
Path Params
langstring

Enum: en,de,zh-CN,es,hi,ar,pt,bn,ru,ja,ko,fr,te,mr,tr,ta,vi,ur

GET /api/system/translations/{lang}
curl --get \
--url 'https://opswat.developerhub.io/api/system/translations/{lang}' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
{
"key": "value"
}
Copy

Get Mitre Data

Obtain MITRE tactics and techniques

Auth
GET /api/system/mitre
curl --get \
--url 'https://opswat.developerhub.io/api/system/mitre' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get Default

Return general information about webservice, just to indicate that API is working

Auth
GET /api/system/info
curl --get \
--url 'https://opswat.developerhub.io/api/system/info' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get Terms

Obtain privacy policy and terms & conditions

Auth
Path Params
terms_typestring

Enum: privacy-policy,terms-condition,cookie-policy

GET /api/system/get-terms/{terms_type}
curl --get \
--url 'https://opswat.developerhub.io/api/system/get-terms/{terms_type}' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
{
"key": "value"
}
Copy

Log Client Error

Perform needed actions with error data, obtained from front-end

Auth
POST /api/system/errors/log
curl --request POST \
--url 'https://opswat.developerhub.io/api/system/errors/log' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get Config

Obtain project configuration to use on front-end

Auth
GET /api/system/config
curl --get \
--url 'https://opswat.developerhub.io/api/system/config' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get Logo

Obtain MITRE tactics and techniques

Auth
Query String
typestring
themestring
namestring
GET /api/system/logo
curl --get \
--url 'https://opswat.developerhub.io/api/system/logo' \
--header 'X-Api-Key: {X-Api-Key}' \
--data type={type} \
--data theme={theme} \
--data name={name}
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
{
"key": "value"
}
Copy

Backend

Backend wrapper

Get Reputation

Wrapper for reputation api

Auth
Query String
sha256string

SHA256 digest as found in the response of submit or extracted resource in the report.

hashesarray

Array of one or more hashes

GET /api/backend/reputation
curl --get \
--url 'https://opswat.developerhub.io/api/backend/reputation' \
--header 'X-Api-Key: {X-Api-Key}' \
--data sha256={sha256} \
--data hashes={hashes}
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
{
"key": "value"
}
Copy

Get API Docs

Return API docs UI

Auth
GET /api/docs
curl --get \
--url 'https://opswat.developerhub.io/api/docs' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get Sitemap

Get sitemap xml

Auth
GET /api/docs/sitemap
curl --get \
--url 'https://opswat.developerhub.io/api/docs/sitemap' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get API Doc Styles

Return styles for api docs

Auth
GET /api/docs/styles
curl --get \
--url 'https://opswat.developerhub.io/api/docs/styles' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy

Get OpenAPI Endpoint

Return API json data to be used by docs UI

Auth
GET /openapi.json
curl --get \
--url 'https://opswat.developerhub.io/openapi.json' \
--header 'X-Api-Key: {X-Api-Key}'
Copy
Responses
200

Successful Response

Successful Responseobject
Response
{
"key": "value"
}
Copy