Appearance
WebAV API & SDKs
Anti-Virus for Web App Developers
SDKs
Official SDKs
Upcoming SDKs
- PHP (direct & Laravel package)
Virus Status Codes
In this API the responses often contain a virus_status
field as an integer code and a virus_status_label
as a string label of the scan status.
Code | Label | Description |
---|---|---|
0 | Pending | The scan is pending. |
1 | Passed | The scan passed. |
2 | Virus | The scan found a virus! |
3 | Unable | The scan was unable to complete. |
4 | Skipped | The scan was skipped. |
Scans are skipped if they exceed the maximum file size. You can scan lager files via the Upload file over HTTPS approach.
If you get the Unable status, this is likely due to an issue with the
file_url
or something on our end. You can reach out by email for support.
REST API
Base URL: https://api.webtender.host
Authentication
All API endpoints require authentication using a valid API key. The API key can be passed in the query parameter or in the request body as api_key
. Unauthorized requests will result in an HTTP 401 status code with a corresponding error message.
Get your API key from the WebTender Console.
Upload file over HTTPS
A common usecase, POST a file and retrieve an UUID to query later with the status API
POST /api/webav/scan
Warning: maximum upload is 100MB over HTTPS. See URL scanning for larger files.
Request Headers
Header | Value |
---|---|
Content-Type | application/json |
Request Body
Field | Type | Required | Description |
---|---|---|---|
api_key | string | Yes | The API key for the authorized user |
file | Blob | Yes | The file you are uploading |
Response Body
Field | Type | Description |
---|---|---|
id | uuid | The file scan ID |
virus_status | integer | Status of the file scan as integer code |
virus_status_label | string | Status of the file scan as string |
updated_at | timestamp | The last time the scan was received or completed processing |
created_at | timestamp | The scan was added to the processing queue |
Scan by public URL
Use a public URL to start a scan job.
POST /api/webav/scan
Great for scanning temporary URLs from your S3 or Azure Blob Storage. Supports the largest files up to 512MB.
Request Headers
Header | Value |
---|---|
Content-Type | application/json |
Request Body
Field | Type | Required | Description |
---|---|---|---|
api_key | string | Yes | The API key for the authorized user |
file_url | string | Yes | A public URL for the file to scan |
Response Body
Field | Type | Description |
---|---|---|
id | uuid | The file scan ID |
virus_status | integer | Status of the file scan as integer code |
virus_status_label | string | Status of the file scan as string |
Recently Scanned Status API
Query the status of a file scan.
GET /api/webav/status
Provides the status of recent scans. This data is ordered by latest first so the first item in the array is the most recent scan. Be careful of changing data when loading subsequent pages.
Request Headers
Header | Value |
---|---|
Content-Type | application/json |
Request Query Params
Field | Type | Required | Description |
---|---|---|---|
api_key | string | Yes | The API key for the authorized user |
page | integer | No | The page offset for the results |
Response Body
Field | Type | Description |
---|---|---|
current_page | integer | Current page |
last_page | integer | Last page |
per_page | integer | Number of FileStatus' per page |
data | FileStatus[] | Array of file scan statuses |
The data
property contains and array of File Scan Statuses, in the following structure.
FileStatus
Field | Type | Description |
---|---|---|
id | uuid | The file scan ID |
virus_status | integer | Status of the file scan as integer code |
virus_status_label | string | Status of the file scan as string |
updated_at | timestamp | The last time the scan was received or completed processing |
created_at | timestamp | The scan was added to the processing queue |
Scan Status API
Query the status of a file scan.
GET /api/webav/status/{id}
Provide the UUID (id) from either of the previous requests to get the status of the scan.
Request Headers
Header | Value |
---|---|
Content-Type | application/json |
Request Body
Field | Type | Required | Description |
---|---|---|---|
api_key | string | Yes | The API key for the authorized user |
Response Body
Field | Type | Description |
---|---|---|
id | uuid | The file scan ID |
virus_status | integer | Status of the file scan as integer code |
virus_status_label | string | Status of the file scan as string |
updated_at | timestamp | The last time the scan was received or completed processing |
created_at | timestamp | The scan was added to the processing queue |