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
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
Copy
Responses
200

Successful Response

URL Upload Was Successfulobject
flow_idstring
priorityobject
appliedinteger
max_possibleinteger
422

Validation Error

Response
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
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
Copy
Responses
200

Successful Response

File Upload Was Successfulobject
flow_idstring
priorityobject
appliedinteger
max_possibleinteger
notestring
422

Validation Error

Response
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
GET /api/reports/search
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
Copy

Get Most Interesting

Get most interesting report recently

Auth
GET /api/users/most-interesting
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy

Get Frequent Tags

Get most frequently seen tags recently

Auth
GET /api/users/get-frequent-tags
Copy
Responses
200

Successful Response

Successful Responseobject
Response
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

GET /api/reports/{report_id}/files
Copy
Responses
200

Successful Response

Successful Responseobject
404

Item not found

422

Validation Error

Response
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}
Copy
Responses
200

Successful Response

Successful Responseobject
400

Bad request

404

Item not found

422

Validation Error

Response
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
passwordstring

Password to be used on compression

GET /api/files/{hash}
Copy
Responses
200

Successful Response

Successful Responseobject
404

Item not found

422

Validation Error

Response
Copy

Feed

Atom feed

Get Feed Info

Get reports feed info

Auth
GET /api/feed/info
Copy
Responses
200

Successful Response

Successful Responseobject
Response
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
Copy
Responses
200

Successful Response

Successful Responseobject
Response
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
Copy
Responses
200

Successful Response

Successful Responseobject
400

Bad request

422

Validation Error

Response
Copy

Get Avatar Image

Get use avatar image

Auth
Path Params
account_idstring
GET /api/users/{account_id}/avatar
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
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}
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
Copy

Get Mitre Data

Obtain MITRE tactics and techniques

Auth
GET /api/system/mitre
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy

Get Default

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

Auth
GET /api/system/info
Copy
Responses
200

Successful Response

Successful Responseobject
Response
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}
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
Copy

Log Client Error

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

Auth
POST /api/system/errors/log
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy

Get Config

Obtain project configuration to use on front-end

Auth
GET /api/system/config
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy

Get Logo

Obtain MITRE tactics and techniques

Auth
Query String
typestring
themestring
namestring
GET /api/system/logo
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
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
Copy
Responses
200

Successful Response

Successful Responseobject
422

Validation Error

Response
Copy

Get API Docs

Return API docs UI

Auth
GET /api/docs
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy

Get Sitemap

Get sitemap xml

Auth
GET /api/docs/sitemap
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy

Get API Doc Styles

Return styles for api docs

Auth
GET /api/docs/styles
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy

Get OpenAPI Endpoint

Return API json data to be used by docs UI

Auth
GET /openapi.json
Copy
Responses
200

Successful Response

Successful Responseobject
Response
Copy