Synchronous API v3.0
Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.
Authentication
-
HTTP Authentication, scheme: Basic
-
HTTP Authentication, scheme: Bearer
Analyse and Rebuild
API endpoints to remove threats from files
Analyses and rebuilds a binary file
Code samples
# You can also use wget
curl -X POST /api/v3/cdr-file \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: null' \
-H 'password: null'
POST /api/v3/cdr-file HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: null
password: null
const inputBody = '{
"ContentManagementPolicy": "{\"ContentManagementFlags\":{\"PdfContentManagement\":{\"Acroform\":1,\"ActionsAll\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Javascript\":1,\"Metadata\":1,\"Watermark\":\"\",\"DigitalSignatures\":1,\"ValueOutsideReasonableLimits\":1,\"RetainExportedStreams\":1},\"WordContentManagement\":{\"DynamicDataExchange\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1},\"ExcelContentManagement\":{\"DynamicDataExchange\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1, \"Connections\":1},\"PowerPointContentManagement\":{\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1},\"ArchiveConfig\":{\"bmp\":1,\"doc\":1,\"docx\":1,\"emf\":1,\"gif\":1,\"jpg\":1,\"wav\":1,\"elf\":1,\"pe\":1,\"mp4\":1,\"mpg\":1,\"pdf\":1,\"png\":1,\"ppt\":1,\"pptx\":1,\"tif\":1,\"wmf\":1,\"xls\":1,\"xlsx\":1,\"mp3\":1,\"rtf\":1,\"coff\":1,\"macho\":1,\"svg\":1,\"webp\":1,\"unknown\":1},\"SvgConfig\":{\"ForeignObjects\":1,\"Hyperlinks\":1,\"Scripts\":1},\"WebpConfig\":{\"Metadata\":1},\"TiffConfig\":{\"GeoTiff\":1}}}",
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':null,
'password':null
};
fetch('/api/v3/cdr-file',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'X-Session-Id' => null,
'password' => null
}
result = RestClient.post '/api/v3/cdr-file',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'X-Session-Id': null,
'password': null
}
r = requests.post('/api/v3/cdr-file', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'X-Session-Id' => 'null',
'password' => 'null',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v3/cdr-file', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/v3/cdr-file");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
"X-Session-Id": []string{"null"},
"password": []string{"null"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v3/cdr-file", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/cdr-file
This endpoint accepts requests to analyse and rebuild binary files, by comparing them to their known manufacturer’s specification. The file is input via the request body as a field in ‘multipart/form-data’. Once the process is complete, the rebuilt file along with either a XML or JSON report, is produced and available as a ZIP download in the Responses section. If an archive file is submitted, the response is a ZIP file which includes the rebuilt archive along with a report file detailing the outcome of each processed file within the archive.
Body parameter
ContentManagementPolicy: '{"ContentManagementFlags":{"PdfContentManagement":{"Acroform":1,"ActionsAll":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Javascript":1,"Metadata":1,"Watermark":"","DigitalSignatures":1,"ValueOutsideReasonableLimits":1,"RetainExportedStreams":1},"WordContentManagement":{"DynamicDataExchange":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1},"ExcelContentManagement":{"DynamicDataExchange":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1,
"Connections":1},"PowerPointContentManagement":{"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1},"ArchiveConfig":{"bmp":1,"doc":1,"docx":1,"emf":1,"gif":1,"jpg":1,"wav":1,"elf":1,"pe":1,"mp4":1,"mpg":1,"pdf":1,"png":1,"ppt":1,"pptx":1,"tif":1,"wmf":1,"xls":1,"xlsx":1,"mp3":1,"rtf":1,"coff":1,"macho":1,"svg":1,"webp":1,"unknown":1},"SvgConfig":{"ForeignObjects":1,"Hyperlinks":1,"Scripts":1},"WebpConfig":{"Metadata":1},"TiffConfig":{"GeoTiff":1}}}'
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Session-Id | header | string | false | A string that can be used to group requests in reports |
policyName | query | string | false | Specifies the named policy to be applied during Glasswall Halo processing. Alternatively a ‘dynamic policy’ can be provided in the message body, dynamic policy refers to any valid policy structure passed at the point of the request being made. If no policy is specified then the default policy is applied, this is the default behaviour. |
response-content | query | string | false | Defines the output required for the request and depending on the value will determine what Glasswall Halo will do to your file. |
generate-hash-types | query | string | false | For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value. |
format | query | ReportFormat | false | The format of the anaylsis report to be returned if an analysis report is requested |
return-executable-file | query | boolean | false | Allow the return of software file types that are structurally repaired, but where |
password | header | string | false | If processing an encrypted ZIP archive file the password can be passed in as a base 64 encoded string in the header |
body | body | object | false | none |
» ContentManagementPolicy | body | object | false | This field contains each of the Content Management Flags for the file types that the engine supports. |
» file | body | string(binary) | true | The file to be processed in binary format |
Detailed descriptions
response-content: Defines the output required for the request and depending on the value will determine what Glasswall Halo will do to your file.
Available values: noAnalysisReport, noRebuiltFile.
Multiple values can be provided in a comma seperated list.
If you set noAnalysisReport you will just receive the rebuilt file (Rebuild Mode). If you set noRebuiltFile you will receive the analysis report (Analysis Mode). If you set noRebuiltFile,noAnalysisReport you will receive the file type as a response header (File Type Detection). Leaving this value blank you will recieve both the analysis and rebuilt file along with the file type in the header (Composite Mode), this is the default behaviour.
generate-hash-types: For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value.
Available values: SHA256,SHA1,MD5.
return-executable-file: Allow the return of software file types that are structurally repaired, but where Glasswall Halo processing does not inspect, validate or disarm any malware that may be contained in specific streams that comprise the software file.
» ContentManagementPolicy: This field contains each of the Content Management Flags for the file types that the engine supports.
This determines how the engine will behave on each request and affords dynamic policy adaptation.
The server treats this field as a JSON string. All the properties including the field itself are optional.
Content Management Flag Key:
0
- Allow
1
- Sanitise
2
- Disallow
Enumerated Values
Parameter | Value |
---|---|
format | XML |
format | JSON |
Example responses
400 Error returned if the body of the request is invalid
{
"Errors": [
{
"ErrorCode": 4001,
"ErrorDescription": "The request body was invalid"
}
]
}
400 Error returned if the form file contained no data or is null
{
"Errors": [
{
"ErrorCode": 4002,
"ErrorDescription": "File did not contain any data."
},
{
"ErrorCode": 4002,
"ErrorDescription": "File cannot be null"
}
]
}
400 Error returned if the policy is invalid
{
"Errors": [
{
"ErrorCode": 4004,
"ErrorDescription": "Invalid content management policy"
}
]
}
400 Error if archive processing fails during unpacking
{
"Errors": [
{
"ErrorCode": 4005,
"ErrorDescription": "Failed to Unpack Archive"
}
]
}
400 Error if archive is above documented allowed limits
{
"Errors": [
{
"ErrorCode": 4011,
"ErrorDescription": "The Archive exceeded allowed limits. Refer to Glasswall Halo documentation for more information"
}
]
}
400 Error if archive processing fails during repacking
{
"Errors": [
{
"ErrorCode": 4006,
"ErrorDescription": "Failed to Repack Archive"
}
]
}
400 Error if the password provided is invalid for the protected archive
{
"Errors": [
{
"ErrorCode": 4007,
"ErrorDescription": "Failed to Unpack Archive Due to an incorrect password"
}
]
}
400 Error if protected archive is an unsupported format
{
"Errors": [
{
"ErrorCode": 4007,
"ErrorDescription": "Protected Archives must be a ZIP file"
}
]
}
400 if the File is an executable file type and the allow query parameter was not set
{
"Errors": [
{
"ErrorCode": 4010,
"ErrorDescription": "File is an executable file type and not allowed by default"
}
]
}
The current active license has expired, or the system cannot find an active license. Upload an active license via the License Management Service and try again.
{
"Errors": [
{
"ErrorCode": 5012,
"ErrorDescription": "No license was set within the engine."
}
]
}
The system cannot accept new requests as it is currently at max load. Inspect the “Retry-After” header for a time to wait before retrying
{
"Errors": [
{
"ErrorCode": 4029,
"ErrorDescription": "Too many requests"
}
]
}
500 Error if Glasswall engine timesout during processing
{
"Errors": [
{
"ErrorCode": 5001,
"ErrorDescription": "Internal server error: Server timed out processing this request."
}
]
}
500 Error if Glasswall engine is unable to determine file type
{
"Errors": [
{
"ErrorCode": 5003,
"ErrorDescription": "Failed to detect file type"
}
]
}
500 Error if Glasswall engine fails to rebuild file
{
"Errors": [
{
"ErrorCode": 5004,
"ErrorDescription": "Failed to rebuild file"
}
]
}
500 Error if Glasswall engine fails to generate an analysis report
{
"Errors": [
{
"ErrorCode": 5006,
"ErrorDescription": "Failed to generate analysis report"
}
]
}
500 Error if the original file fails to save to storage
{
"Errors": [
{
"ErrorCode": 5007,
"ErrorDescription": "Failed to upload original file"
}
]
}
500 Error if there is not enough information to build a composite response
{
"Errors": [
{
"ErrorCode": 5008,
"ErrorDescription": "Not Enough Information to build composite response"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | None |
206 | Partial Content | Partial Response | None |
400 | Bad Request | Bad Request | ErrorResponse |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | ErrorResponse |
429 | Too Many Requests | Too Many Requests | ErrorResponse |
500 | Internal Server Error | Server Error | ErrorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-file-size | string | The size in bytes of the original input file | |
201 | x-applied-policy | string | Identifies the policy applied during Glasswall Halo processing. | |
201 | x-filereputation-responsecode | string | Response code returned from the file reputation service | |
201 | x-filereputation-status | string | Response status from the file reputation service. | |
201 | x-filereputation-threatname | string | Malware family name if file is detected as Malicious or Suspicious | |
201 | x-filereputation-threatlevel | string | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value | |
201 | x-filereputation-trustlevel | string | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. | |
206 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
206 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
206 | x-file-size | string | The size in bytes of the original input file | |
206 | x-applied-policy | string | Identifies the policy applied during Glasswall Halo processing. | |
206 | x-filereputation-responsecode | string | Response code returned from the file reputation service | |
206 | x-filereputation-status | string | Response status from the file reputation service. | |
206 | x-filereputation-threatname | string | Malware family name if file is detected as Malicious or Suspicious | |
206 | x-filereputation-threatlevel | string | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value | |
206 | x-filereputation-trustlevel | string | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. | |
500 | x-filereputation-responsecode | string | Response code returned from the file reputation service | |
500 | x-filereputation-status | string | Response status from the file reputation service. | |
500 | x-filereputation-threatname | string | Malware family name if file is detected as Malicious or Suspicious | |
500 | x-filereputation-threatlevel | string | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value | |
500 | x-filereputation-trustlevel | string | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. |
Analyses and rebuilds a Base64 encoded file
Code samples
# You can also use wget
curl -X POST /api/v3/cdr \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/v3/cdr HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Session-Id: string
const inputBody = '{
"base64": "string",
"contentManagementPolicyDetail": {
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
},
"fileName": "Hello I am a filename example",
"password": null
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Session-Id':'string'
};
fetch('/api/v3/cdr',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Session-Id' => 'string'
}
result = RestClient.post '/api/v3/cdr',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Session-Id': 'string'
}
r = requests.post('/api/v3/cdr', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Session-Id' => 'string',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v3/cdr', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/v3/cdr");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-Session-Id": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v3/cdr", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/cdr
This endpoint accepts requests to analyse and rebuild Base64 encoded files, by comparing them to their known manufacturer’s specification. The request body is a JSON that contains a Base64 representation of the file. Once the process is complete, the rebuilt file along with either a XML or JSON report, is produced and available as a ZIP download in the Responses section. If an archive file is submitted, the response is a ZIP file which includes the rebuilt archive along with a report file detailing the outcome of each processed file within the archive.
Body parameter
{
"base64": "string",
"contentManagementPolicyDetail": {
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
},
"fileName": "Hello I am a filename example",
"password": null
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Session-Id | header | string | false | A string that can be used to group requests in reports |
policyName | query | string | false | Specifies the named policy to be applied during Glasswall Halo processing. Alternatively a ‘dynamic policy’ can be provided in the message body, dynamic policy refers to any valid policy structure passed at the point of the request being made. If no policy is specified then the default policy is applied, this is the default behaviour. |
response-content | query | string | false | Defines the output required for the request and depending on the value will determine what Glasswall Halo will do to your file. |
generate-hash-types | query | string | false | For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value. |
format | query | ReportFormat | false | The format of the anaylsis report to be returned if an analysis report is requested |
return-executable-file | query | boolean | false | Allow the return of software file types that are structurally repaired, but where |
body | body | RebuildBase64Request | true | none |
Detailed descriptions
response-content: Defines the output required for the request and depending on the value will determine what Glasswall Halo will do to your file.
Available values: noAnalysisReport, noRebuiltFile.
Multiple values can be provided in a comma seperated list.
If you set noAnalysisReport you will just receive the rebuilt file (Rebuild Mode). If you set noRebuiltFile you will receive the analysis report (Analysis Mode). If you set noRebuiltFile,noAnalysisReport you will receive the file type as a response header (File Type Detection). Leaving this value blank you will recieve both the analysis and rebuilt file along with the file type in the header (Composite Mode).
generate-hash-types: For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value.
Available values: SHA256,SHA1,MD5.
return-executable-file: Allow the return of software file types that are structurally repaired, but where Glasswall Halo processing does not inspect, validate or disarm any malware that may be contained in specific streams that comprise the software file.
Enumerated Values
Parameter | Value |
---|---|
format | XML |
format | JSON |
Example responses
Analysis Report is returned and describes basic file metadata (size, hash, ‘unknown’)
{
"ErrorReason": "file type unsupported",
"ProcessingId": "5cdba78f-71cc-4e95-b20c-291c1d7b47f7",
"ProcessingStatus": "failed",
"FileType": "unknown",
"AnalysisReport": {
"Content": "QmFzZTY0IHN0cmluZw==",
"ContentType": "application/xml",
"ContentEncoding": "base64"
},
"RebuiltFile": null
}
Analysis Report is included in the response
{
"ErrorReason": "Failed to rebuild file",
"ProcessingId": "5cdba78f-71cc-4e95-b20c-291c1d7b47f7",
"ProcessingStatus": "failed",
"FileType": "pdf",
"AnalysisReport": {
"Content": "QmFzZTY0IHN0cmluZw==",
"ContentType": "application/xml",
"ContentEncoding": "base64"
},
"RebuiltFile": null
}
Archive file containing analysis reports and manifest file is included in response, along with an archive file containing the rebuilt files and info substitution files (for those files that could not be rebuilt)
{
"ErrorReason": " Failed to rebuild item",
"ProcessingId": "5cdba78f-71cc-4e95-b20c-291c1d7b47f7",
"ProcessingStatus": "failed",
"FileType": "zip",
"AnalysisReport": {
"Content": "QmFzZTY0IHN0cmluZw==",
"ContentType": "application/zip",
"ContentEncoding": "base64"
},
"RebuiltFile": {
"Content": "QW50b2hlciBCYXNlNjQgc3RyaW5n",
"ContentType": "application/octet-stream",
"ContentEncoding": "base64"
}
}
400 Error returned if base64 string is incorrect
{
"Errors": [
{
"ErrorCode": 4003,
"ErrorDescription": "Unable to parse base64 file"
}
]
}
400 Error returned if the policy is invalid
{
"Errors": [
{
"ErrorCode": 4004,
"ErrorDescription": "Invalid content management policy"
}
]
}
400 Error if archive processing fails during unpacking
{
"Errors": [
{
"ErrorCode": 4005,
"ErrorDescription": "Failed to Unpack Archive"
}
]
}
400 Error if archive is above documented allowed limits
{
"Errors": [
{
"ErrorCode": 4011,
"ErrorDescription": "The Archive exceeded allowed limits. Refer to Glasswall Halo documentation for more information"
}
]
}
400 Error if archive processing fails during repacking
{
"Errors": [
{
"ErrorCode": 4006,
"ErrorDescription": "Failed to Repack Archive"
}
]
}
400 Error if the password provided is invalid for the protected archive
{
"Errors": [
{
"ErrorCode": 4007,
"ErrorDescription": "Failed to Unpack Archive Due to an incorrect password"
}
]
}
400 Error if protected archive is an unsupported format
{
"Errors": [
{
"ErrorCode": 4007,
"ErrorDescription": "Protected Archives must be a ZIP file"
}
]
}
400 if the File is an executable file type and the allow query parameter was not set
{
"Errors": [
{
"ErrorCode": 4010,
"ErrorDescription": "File is an executable file type and not allowed by default"
}
]
}
The current active license has expired, or the system cannot find an active license. Upload an active license via the License Management Service and try again.
{
"Errors": [
{
"ErrorCode": 5012,
"ErrorDescription": "No license was set within the engine."
}
]
}
The system cannot accept new requests as it is currently at max load. Inspect the “Retry-After” header for a time to wait before retrying
{
"Errors": [
{
"ErrorCode": 4029,
"ErrorDescription": "Too many requests"
}
]
}
500 Error if Glasswall engine timesout during processing
{
"Errors": [
{
"ErrorCode": 5001,
"ErrorDescription": "Internal server error: Server timed out processing this request."
}
]
}
500 Error if Glasswall engine is unable to determine file type
{
"Errors": [
{
"ErrorCode": 5003,
"ErrorDescription": "Failed to detect file type"
}
]
}
500 Error if Glasswall engine fails to rebuild file
{
"Errors": [
{
"ErrorCode": 5004,
"ErrorDescription": "Failed to rebuild file"
}
]
}
500 Error if Glasswall engine fails to generate an analysis report
{
"Errors": [
{
"ErrorCode": 5006,
"ErrorDescription": "Failed to generate analysis report"
}
]
}
500 Error if the original file fails to save to storage
{
"Errors": [
{
"ErrorCode": 5007,
"ErrorDescription": "Failed to upload original file"
}
]
}
500 Error if there is not enough information to build a composite response
{
"Errors": [
{
"ErrorCode": 5008,
"ErrorDescription": "Not Enough Information to build composite response"
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | None |
206 | Partial Content | Partial Response | Base64Output |
400 | Bad Request | Bad Request | ErrorResponse |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | ErrorResponse |
429 | Too Many Requests | Too Many Requests | ErrorResponse |
500 | Internal Server Error | Server Error | ErrorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-file-size | string | The size in bytes of the original input file | |
201 | x-applied-policy | string | Identifies the policy applied during Glasswall Halo processing. | |
201 | x-filereputation-responsecode | string | Response code returned from the file reputation service | |
201 | x-filereputation-status | string | Response status from the file reputation service. | |
201 | x-filereputation-threatname | string | Malware family name if file is detected as Malicious or Suspicious | |
201 | x-filereputation-threatlevel | string | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value | |
201 | x-filereputation-trustlevel | string | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. | |
206 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
206 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
206 | x-applied-policy | string | Identifies the policy applied during Glasswall Halo processing. | |
206 | x-filereputation-responsecode | string | Response code returned from the file reputation service | |
206 | x-filereputation-status | string | Response status from the file reputation service. | |
206 | x-filereputation-threatname | string | Malware family name if file is detected as Malicious or Suspicious | |
206 | x-filereputation-threatlevel | string | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value | |
206 | x-filereputation-trustlevel | string | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. | |
500 | x-filereputation-responsecode | string | Response code returned from the file reputation service | |
500 | x-filereputation-status | string | Response status from the file reputation service. | |
500 | x-filereputation-threatname | string | Malware family name if file is detected as Malicious or Suspicious | |
500 | x-filereputation-threatlevel | string | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value | |
500 | x-filereputation-trustlevel | string | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. |
Import and Export
API endpoints to export and import a file to and from XML/SISL file(s)
Exports a binary file as a ZIP containing SISL/XML file(s)
Code samples
# You can also use wget
curl -X POST /api/v3/export-file \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/v3/export-file HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"ContentManagementPolicy": "{\"ContentManagementFlags\":{\"PdfContentManagement\":{\"Acroform\":1,\"ActionsAll\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Javascript\":1,\"Metadata\":1,\"Watermark\":\"\",\"DigitalSignatures\":1,\"ValueOutsideReasonableLimits\":1,\"RetainExportedStreams\":1},\"WordContentManagement\":{\"DynamicDataExchange\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1},\"ExcelContentManagement\":{\"DynamicDataExchange\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1, \"Connections\":1},\"PowerPointContentManagement\":{\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1},\"ArchiveConfig\":{\"bmp\":1,\"doc\":1,\"docx\":1,\"emf\":1,\"gif\":1,\"jpg\":1,\"wav\":1,\"elf\":1,\"pe\":1,\"mp4\":1,\"mpg\":1,\"pdf\":1,\"png\":1,\"ppt\":1,\"pptx\":1,\"tif\":1,\"wmf\":1,\"xls\":1,\"xlsx\":1,\"mp3\":1,\"rtf\":1,\"coff\":1,\"macho\":1,\"svg\":1,\"webp\":1,\"unknown\":1},\"SvgConfig\":{\"ForeignObjects\":1,\"Hyperlinks\":1,\"Scripts\":1},\"WebpConfig\":{\"Metadata\":1},\"TiffConfig\":{\"GeoTiff\":1}}}",
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};
fetch('/api/v3/export-file',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'X-Session-Id' => 'string'
}
result = RestClient.post '/api/v3/export-file',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'X-Session-Id': 'string'
}
r = requests.post('/api/v3/export-file', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'X-Session-Id' => 'string',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v3/export-file', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/v3/export-file");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
"X-Session-Id": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v3/export-file", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/export-file
This endpoint exports a binary file as a ZIP containing SISL/XML file(s), each with a limit of up to 10 MB. The file is input via the request body as a field in ‘multipart/form-data’. Once the process is complete, the file is a ZIP file containing SISL/XML file(s). The response ‘Content-Type’ is ‘application/octet-stream’
Body parameter
ContentManagementPolicy: '{"ContentManagementFlags":{"PdfContentManagement":{"Acroform":1,"ActionsAll":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Javascript":1,"Metadata":1,"Watermark":"","DigitalSignatures":1,"ValueOutsideReasonableLimits":1,"RetainExportedStreams":1},"WordContentManagement":{"DynamicDataExchange":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1},"ExcelContentManagement":{"DynamicDataExchange":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1,
"Connections":1},"PowerPointContentManagement":{"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1},"ArchiveConfig":{"bmp":1,"doc":1,"docx":1,"emf":1,"gif":1,"jpg":1,"wav":1,"elf":1,"pe":1,"mp4":1,"mpg":1,"pdf":1,"png":1,"ppt":1,"pptx":1,"tif":1,"wmf":1,"xls":1,"xlsx":1,"mp3":1,"rtf":1,"coff":1,"macho":1,"svg":1,"webp":1,"unknown":1},"SvgConfig":{"ForeignObjects":1,"Hyperlinks":1,"Scripts":1},"WebpConfig":{"Metadata":1},"TiffConfig":{"GeoTiff":1}}}'
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Session-Id | header | string | false | A string that can be used to group requests in reports |
policyName | query | string | false | Specifies the named policy to be applied during Glasswall Halo processing. Alternatively a ‘dynamic policy’ can be provided in the message body, dynamic policy refers to any valid policy structure passed at the point of the request being made. If no policy is specified then the default policy is applied, this is the default behaviour. |
generateHashTypes | query | string | false | For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value. |
exportEmbeddedImages | query | boolean | false | Specifies for the export process how Glasswall Halo should deal with images within a document being exported. When this value is set to true Glasswall Halo will export any embeded images to the defined interchange type (SISL/XML). When this value is set to false Glasswall Halo will export the image in it’s native type which is defined in the file. |
exportTextDump | query | boolean | false | The Export Text Dump feature offers a convenient option to generate a comprehensive text file that includes all the content from the input file being exported. This text dump file is automatically created and saved in the same ZIP as the output files. |
interchangeType | query | InterchangeType | false | Specifies what the exported file types are. If XML then the file will be exported into XML format. If SISL the file will be exported into SISL format |
body | body | object | false | none |
» ContentManagementPolicy | body | object | false | This field contains each of the Content Management Flags for the file types that the engine supports. |
» file | body | string(binary) | true | The file to be processed in binary format |
Detailed descriptions
generateHashTypes: For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value.
Valid Parameters: SHA256,SHA1,MD5.
» ContentManagementPolicy: This field contains each of the Content Management Flags for the file types that the engine supports.
This determines how the engine will behave on each request and affords dynamic policy adaptation.
The server treats this field as a JSON string. All the properties including the field itself are optional.
Content Management Flag Key:
0
- Allow
1
- Sanitise
2
- Disallow
Enumerated Values
Parameter | Value |
---|---|
interchangeType | XML |
interchangeType | SISL |
Example responses
400 Response
{
"errors": [
{
"errorCode": 0,
"errorDescription": "string"
}
]
}
The current active license has expired, or the system cannot find an active license. Upload an active license via the License Management Service and try again.
{
"Errors": [
{
"ErrorCode": 5012,
"ErrorDescription": "No license was set within the engine."
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | None |
400 | Bad Request | Bad Request | ErrorResponse |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | ErrorResponse |
429 | Too Many Requests | Too Many Requests | ErrorResponse |
500 | Internal Server Error | Server Error | ErrorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-file-size | string | The size in bytes of the original input file |
Exports a Base64 encoded file as a Base64 encoded ZIP containing SISL/XML file(s)
Code samples
# You can also use wget
curl -X POST /api/v3/export \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/v3/export HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Session-Id: string
const inputBody = '{
"base64": "string",
"contentManagementPolicyDetail": {
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
},
"fileName": "Hello I am a filename example",
"password": null
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Session-Id':'string'
};
fetch('/api/v3/export',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Session-Id' => 'string'
}
result = RestClient.post '/api/v3/export',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Session-Id': 'string'
}
r = requests.post('/api/v3/export', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Session-Id' => 'string',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v3/export', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/v3/export");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-Session-Id": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v3/export", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/export
This endpoint exports a Base64 encoded file as a ZIP containing SISL/XML file(s), each with a limit of up to 10 MB. The request body is a JSON that contains a Base64 representation of the file. Once the process is complete, the file is a ZIP file containing SISL/XML file(s). The response ‘Content-Type’ is ‘application/octet-stream’
Body parameter
{
"base64": "string",
"contentManagementPolicyDetail": {
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
},
"fileName": "Hello I am a filename example",
"password": null
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Session-Id | header | string | false | A string that can be used to group requests in reports |
policyName | query | string | false | Specifies the named policy to be applied during Glasswall Halo processing. Alternatively a ‘dynamic policy’ can be provided in the message body, dynamic policy refers to any valid policy structure passed at the point of the request being made. If no policy is specified then the default policy is applied, this is the default behaviour. |
generateHashTypes | query | string | false | For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value. |
exportEmbeddedImages | query | boolean | false | Specifies for the export process how Glasswall Halo should deal with images within a document being exported. When this value is set to true Glasswall Halo will export any embeded images to the defined interchange type (SISL/XML). When this value is set to false Glasswall Halo will export the image in it’s native type which is defined in the file. |
exportTextDump | query | boolean | false | The Export Text Dump feature offers a convenient option to generate a comprehensive text file that includes all the content from the input file being exported. This text dump file is automatically created and saved in the same ZIP as the output files. |
interchangeType | query | InterchangeType | false | Specifies what the exported file types are. If XML then the file will be exported into XML format. If SISL the file will be exported into SISL format |
body | body | RebuildBase64Request | true | none |
Detailed descriptions
generateHashTypes: For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value.
Valid Parameters: SHA256,SHA1,MD5.
Enumerated Values
Parameter | Value |
---|---|
interchangeType | XML |
interchangeType | SISL |
Example responses
400 Response
{
"errors": [
{
"errorCode": 0,
"errorDescription": "string"
}
]
}
The current active license has expired, or the system cannot find an active license. Upload an active license via the License Management Service and try again.
{
"Errors": [
{
"ErrorCode": 5012,
"ErrorDescription": "No license was set within the engine."
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | None |
400 | Bad Request | Bad Request | ErrorResponse |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | ErrorResponse |
429 | Too Many Requests | Too Many Requests | ErrorResponse |
500 | Internal Server Error | Server Error | ErrorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-file-size | string | The size in bytes of the original input file |
Imports a ZIP containing SISL/XML file(s) from the export endpoint and returns a binary file
Code samples
# You can also use wget
curl -X POST /api/v3/import-file \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/v3/import-file HTTP/1.1
Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"ContentManagementPolicy": "{\"ContentManagementFlags\":{\"PdfContentManagement\":{\"Acroform\":1,\"ActionsAll\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Javascript\":1,\"Metadata\":1,\"Watermark\":\"\",\"DigitalSignatures\":1,\"ValueOutsideReasonableLimits\":1,\"RetainExportedStreams\":1},\"WordContentManagement\":{\"DynamicDataExchange\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1},\"ExcelContentManagement\":{\"DynamicDataExchange\":1,\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1, \"Connections\":1},\"PowerPointContentManagement\":{\"EmbeddedFiles\":1,\"EmbeddedImages\":1,\"ExternalHyperlinks\":1,\"InternalHyperlinks\":1,\"Macros\":1,\"Metadata\":1,\"ReviewComments\":1},\"ArchiveConfig\":{\"bmp\":1,\"doc\":1,\"docx\":1,\"emf\":1,\"gif\":1,\"jpg\":1,\"wav\":1,\"elf\":1,\"pe\":1,\"mp4\":1,\"mpg\":1,\"pdf\":1,\"png\":1,\"ppt\":1,\"pptx\":1,\"tif\":1,\"wmf\":1,\"xls\":1,\"xlsx\":1,\"mp3\":1,\"rtf\":1,\"coff\":1,\"macho\":1,\"svg\":1,\"webp\":1,\"unknown\":1},\"SvgConfig\":{\"ForeignObjects\":1,\"Hyperlinks\":1,\"Scripts\":1},\"WebpConfig\":{\"Metadata\":1},\"TiffConfig\":{\"GeoTiff\":1}}}",
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};
fetch('/api/v3/import-file',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'X-Session-Id' => 'string'
}
result = RestClient.post '/api/v3/import-file',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'multipart/form-data',
'Accept': 'application/json',
'X-Session-Id': 'string'
}
r = requests.post('/api/v3/import-file', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
'X-Session-Id' => 'string',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v3/import-file', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/v3/import-file");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"multipart/form-data"},
"Accept": []string{"application/json"},
"X-Session-Id": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v3/import-file", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/import-file
This endpoint imports ZIP files containing SISL/XML file(s). The file is input via the request body as a field in ‘multipart/form-data’. Once the process is complete, the response is a binary file. The response ‘Content-Type’ is ‘application/octet-stream’.
Body parameter
ContentManagementPolicy: '{"ContentManagementFlags":{"PdfContentManagement":{"Acroform":1,"ActionsAll":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Javascript":1,"Metadata":1,"Watermark":"","DigitalSignatures":1,"ValueOutsideReasonableLimits":1,"RetainExportedStreams":1},"WordContentManagement":{"DynamicDataExchange":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1},"ExcelContentManagement":{"DynamicDataExchange":1,"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1,
"Connections":1},"PowerPointContentManagement":{"EmbeddedFiles":1,"EmbeddedImages":1,"ExternalHyperlinks":1,"InternalHyperlinks":1,"Macros":1,"Metadata":1,"ReviewComments":1},"ArchiveConfig":{"bmp":1,"doc":1,"docx":1,"emf":1,"gif":1,"jpg":1,"wav":1,"elf":1,"pe":1,"mp4":1,"mpg":1,"pdf":1,"png":1,"ppt":1,"pptx":1,"tif":1,"wmf":1,"xls":1,"xlsx":1,"mp3":1,"rtf":1,"coff":1,"macho":1,"svg":1,"webp":1,"unknown":1},"SvgConfig":{"ForeignObjects":1,"Hyperlinks":1,"Scripts":1},"WebpConfig":{"Metadata":1},"TiffConfig":{"GeoTiff":1}}}'
file: string
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Session-Id | header | string | false | A string that can be used to group requests in reports |
policyName | query | string | false | Specifies the named policy to be applied during Glasswall Halo processing. Alternatively a ‘dynamic policy’ can be provided in the message body, dynamic policy refers to any valid policy structure passed at the point of the request being made. If no policy is specified then the default policy is applied, this is the default behaviour. |
generateHashTypes | query | string | false | For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value. |
exportEmbeddedImages | query | boolean | false | Specifies for the import process how the images were exported during the export process. If set to true Glasswall Halo is expecting the images in the format relating to the interchange type. If false Glasswall Halo is expecting the images to be in the original image format. |
exportTextDump | query | boolean | false | Informs the api the input was generated with the exportTextDump flag set to true so the correct files are imported. |
interchangeType | query | InterchangeType | false | Specifies what the exported file types are. If XML then the file will be exported into XML format. If SISL the file will be exported into SISL format |
body | body | object | false | none |
» ContentManagementPolicy | body | object | false | This field contains each of the Content Management Flags for the file types that the engine supports. |
» file | body | string(binary) | true | The file to be processed in binary format |
Detailed descriptions
generateHashTypes: For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value.
Valid Parameters: SHA256,SHA1,MD5.
» ContentManagementPolicy: This field contains each of the Content Management Flags for the file types that the engine supports.
This determines how the engine will behave on each request and affords dynamic policy adaptation.
The server treats this field as a JSON string. All the properties including the field itself are optional.
Content Management Flag Key:
0
- Allow
1
- Sanitise
2
- Disallow
Enumerated Values
Parameter | Value |
---|---|
interchangeType | XML |
interchangeType | SISL |
Example responses
400 Response
{
"errors": [
{
"errorCode": 0,
"errorDescription": "string"
}
]
}
The current active license has expired, or the system cannot find an active license. Upload an active license via the License Management Service and try again.
{
"Errors": [
{
"ErrorCode": 5012,
"ErrorDescription": "No license was set within the engine."
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | None |
400 | Bad Request | Bad Request | ErrorResponse |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | ErrorResponse |
429 | Too Many Requests | Too Many Requests | ErrorResponse |
500 | Internal Server Error | Server Error | ErrorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-file-size | string | The size in bytes of the original input file |
Imports a Base64 encoded ZIP containing SISL/XML file(s) from the export endpoint and returns a Base64 encoded file
Code samples
# You can also use wget
curl -X POST /api/v3/import \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/v3/import HTTP/1.1
Content-Type: application/json
Accept: application/json
X-Session-Id: string
const inputBody = '{
"base64": "string",
"contentManagementPolicyDetail": {
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
},
"fileName": "Hello I am a filename example",
"password": null
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Session-Id':'string'
};
fetch('/api/v3/import',
{
method: 'POST',
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
require 'rest-client'
require 'json'
headers = {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Session-Id' => 'string'
}
result = RestClient.post '/api/v3/import',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'X-Session-Id': 'string'
}
r = requests.post('/api/v3/import', headers = headers)
print(r.json())
<?php
require 'vendor/autoload.php';
$headers = array(
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Session-Id' => 'string',
);
$client = new \GuzzleHttp\Client();
// Define array of request body.
$request_body = array();
try {
$response = $client->request('POST','/api/v3/import', array(
'headers' => $headers,
'json' => $request_body,
)
);
print_r($response->getBody()->getContents());
}
catch (\GuzzleHttp\Exception\BadResponseException $e) {
// handle exception or api errors.
print_r($e->getMessage());
}
// ...
URL obj = new URL("/api/v3/import");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestMethod("POST");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Content-Type": []string{"application/json"},
"Accept": []string{"application/json"},
"X-Session-Id": []string{"string"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("POST", "/api/v3/import", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
POST /api/v3/import
This endpoint imports ZIP containing SISL/XML file(s). The request body is a JSON that contains a Base64 representation of the file. Once the process is complete, the response is a Base64 encoded file. The response ‘Content-Type’ is ‘application/octet-stream’.
Body parameter
{
"base64": "string",
"contentManagementPolicyDetail": {
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
},
"fileName": "Hello I am a filename example",
"password": null
}
Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
X-Session-Id | header | string | false | A string that can be used to group requests in reports |
policyName | query | string | false | Specifies the named policy to be applied during Glasswall Halo processing. Alternatively a ‘dynamic policy’ can be provided in the message body, dynamic policy refers to any valid policy structure passed at the point of the request being made. If no policy is specified then the default policy is applied, this is the default behaviour. |
generateHashTypes | query | string | false | For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value. |
exportEmbeddedImages | query | boolean | false | Specifies for the import process how the images were exported during the export process. If set to true Glasswall Halo is expecting the images in the format relating to the interchange type. If false Glasswall Halo is expecting the images to be in the original image format. |
exportTextDump | query | boolean | false | Informs the api the input was generated with the exportTextDump flag set to true so the correct files are imported. |
interchangeType | query | InterchangeType | false | Specifies what the exported file types are. If XML then the ZIP input should contain the XML files which were produced during the export process. If SISL then the ZIP input should contain the SISL files which were produced during the export process. |
body | body | RebuildBase64Request | true | none |
Detailed descriptions
generateHashTypes: For each of the given hashing algorithms in this comma separated list, an input and output file hash string will be created and placed in the response header. If the value is blank no hash values will be returned, this is the default value.
Valid Parameters: SHA256,SHA1,MD5.
Enumerated Values
Parameter | Value |
---|---|
interchangeType | XML |
interchangeType | SISL |
Example responses
400 Response
{
"errors": [
{
"errorCode": 0,
"errorDescription": "string"
}
]
}
The current active license has expired, or the system cannot find an active license. Upload an active license via the License Management Service and try again.
{
"Errors": [
{
"ErrorCode": 5012,
"ErrorDescription": "No license was set within the engine."
}
]
}
Responses
Status | Meaning | Description | Schema |
---|---|---|---|
201 | Created | Created | None |
400 | Bad Request | Bad Request | ErrorResponse |
401 | Unauthorized | Unauthorized | None |
403 | Forbidden | Forbidden | ErrorResponse |
429 | Too Many Requests | Too Many Requests | ErrorResponse |
500 | Internal Server Error | Server Error | ErrorResponse |
Response Headers
Status | Header | Type | Format | Description |
---|---|---|---|---|
201 | x-hash-{algo}-input | string | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-hash-{algo}-output | string | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm | |
201 | x-file-size | string | The size in bytes of the original input file |
Schemas
XAppliedPolicy
"(name)"
Identifies the policy applied during Glasswall Halo processing.
(name)
the named policy that was applieddefault
the configured default policy was appliedservice-dynamic
a dynamic policy was submitted with the request and appliedglasswall-fallback
the fallback policy was applied since the specified policy was not available
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Identifies the policy applied during Glasswall Halo processing. - (name) the named policy that was applied- default the configured default policy was applied- service-dynamic a dynamic policy was submitted with the request and applied- glasswall-fallback the fallback policy was applied since the specified policy was not available |
Enumerated Values
Property | Value |
---|---|
anonymous | (name) |
anonymous | default |
anonymous | service-dynamic |
anonymous | glasswall-fallback) |
XFileReputationStatus
"Known"
Response status from the file reputation service.
Known
File hash is known, but found to be benign.Unknown
File hash has not been seen by the File Reputation Service before.Malicious
File hash is classified as Malicious.Suspicious
File hash is considered suspicious based on the File Reputation Services classification algorithm.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | Response status from the file reputation service. - Known File hash is known, but found to be benign.- Unknown File hash has not been seen by the File Reputation Service before.- Malicious File hash is classified as Malicious.- Suspicious File hash is considered suspicious based on the File Reputation Services classification algorithm. |
Enumerated Values
Property | Value |
---|---|
anonymous | Known |
anonymous | Unknown |
anonymous | Malicious |
anonymous | Suspicious) |
ArchiveConfig
{
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
}
Properties
Base64Output
{
"errorReason": "string",
"processingId": "string",
"processingStatus": "string",
"fileType": "string",
"analysisReport": {
"content": "string",
"contentType": "string",
"contentEncoding": "string"
},
"rebuiltFile": {
"content": "string",
"contentType": "string",
"contentEncoding": "string"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
errorReason | string¦null | false | none | none |
processingId | string¦null | false | none | none |
processingStatus | string¦null | false | none | none |
fileType | string¦null | false | none | none |
analysisReport | Base64ResponseFile | false | none | none |
rebuiltFile | Base64ResponseFile | false | none | none |
Base64ResponseFile
{
"content": "string",
"contentType": "string",
"contentEncoding": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
content | string¦null | false | none | none |
contentType | string¦null | false | none | none |
contentEncoding | string¦null | false | none | none |
WordContentManagement
{
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
DynamicDataExchange | ContentManagementFlagAction | false | none | none |
EmbeddedFiles | ContentManagementFlagAction | false | none | none |
EmbeddedImages | ContentManagementFlagAction | false | none | none |
ExternalHyperlinks | ContentManagementFlagAction | false | none | none |
InternalHyperlinks | ContentManagementFlagAction | false | none | none |
Macros | ContentManagementFlagAction | false | none | none |
Metadata | ContentManagementFlagAction | false | none | none |
ReviewComments | ContentManagementFlagAction | false | none | none |
ExcelContentManagement
{
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
DynamicDataExchange | ContentManagementFlagAction | false | none | none |
EmbeddedFiles | ContentManagementFlagAction | false | none | none |
EmbeddedImages | ContentManagementFlagAction | false | none | none |
ExternalHyperlinks | ContentManagementFlagAction | false | none | none |
InternalHyperlinks | ContentManagementFlagAction | false | none | none |
Macros | ContentManagementFlagAction | false | none | none |
Metadata | ContentManagementFlagAction | false | none | none |
ReviewComments | ContentManagementFlagAction | false | none | none |
Connections | ContentManagementFlagAction | false | none | none |
PowerPointContentManagement
{
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
EmbeddedFiles | ContentManagementFlagAction | false | none | none |
EmbeddedImages | ContentManagementFlagAction | false | none | none |
ExternalHyperlinks | ContentManagementFlagAction | false | none | none |
InternalHyperlinks | ContentManagementFlagAction | false | none | none |
Macros | ContentManagementFlagAction | false | none | none |
Metadata | ContentManagementFlagAction | false | none | none |
ReviewComments | ContentManagementFlagAction | false | none | none |
ContentManagementFlagAction
1
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | integer(int32) | false | none | none |
Enumerated Values
Property | Value |
---|---|
anonymous | 0 |
anonymous | 1 |
anonymous | 2 |
ContentManagementFlags
{
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
PdfContentManagement | PdfContentManagement | false | none | none |
WordContentManagement | WordContentManagement | false | none | none |
ExcelContentManagement | ExcelContentManagement | false | none | none |
PowerPointContentManagement | PowerPointContentManagement | false | none | none |
ArchiveConfig | ArchiveConfig | false | none | none |
tiffConfig | TiffConfig | false | none | none |
svgConfig | SvgConfig | false | none | none |
webpConfig | WebpConfig | false | none | none |
ContentManagementPolicy
{
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
}
Required.Default is optional The Policy JSON used by the api to configure the engine
NOTE: Due to XML being order dependent the property ordering of these classes should not be changed. Tests are in place to ensure they arent changed
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
ContentManagementFlags | ContentManagementFlags | false | none | none |
Error
{
"errorCode": 0,
"errorDescription": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
errorCode | integer(int32)¦null | false | none | The Glasswall engine error code |
errorDescription | string¦null | false | none | none |
ErrorResponse
{
"errors": [
{
"errorCode": 0,
"errorDescription": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
errors | [Error]¦null | false | none | The error text relating to the particular error |
InterchangeType
"XML"
This field can accept either a string or number representation of the enum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | This field can accept either a string or number representation of the enum |
Enumerated Values
Property | Value |
---|---|
anonymous | XML |
anonymous | SISL |
PdfContentManagement
{
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Acroform | ContentManagementFlagAction | false | none | none |
ActionsAll | ContentManagementFlagAction | false | none | none |
EmbeddedFiles | ContentManagementFlagAction | false | none | none |
EmbeddedImages | ContentManagementFlagAction | false | none | none |
ExternalHyperlinks | ContentManagementFlagAction | false | none | none |
InternalHyperlinks | ContentManagementFlagAction | false | none | none |
Javascript | ContentManagementFlagAction | false | none | none |
Metadata | ContentManagementFlagAction | false | none | none |
Watermark | string¦null | false | none | none |
DigitalSignatures | ContentManagementFlagAction | false | none | none |
ValueOutsideReasonableLimits | ContentManagementFlagAction | false | none | none |
RetainExportedStreams | ContentManagementFlagAction | false | none | none |
RebuildBase64Request
{
"base64": "string",
"contentManagementPolicyDetail": {
"ContentManagementFlags": {
"PdfContentManagement": {
"Acroform": 1,
"ActionsAll": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Javascript": 1,
"Metadata": 1,
"Watermark": "",
"DigitalSignatures": 1,
"ValueOutsideReasonableLimits": 1,
"RetainExportedStreams": 1
},
"WordContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ExcelContentManagement": {
"DynamicDataExchange": 1,
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1,
"Connections": 1
},
"PowerPointContentManagement": {
"EmbeddedFiles": 1,
"EmbeddedImages": 1,
"ExternalHyperlinks": 1,
"InternalHyperlinks": 1,
"Macros": 1,
"Metadata": 1,
"ReviewComments": 1
},
"ArchiveConfig": {
"bmp": 1,
"doc": 1,
"docx": 1,
"emf": 1,
"gif": 1,
"jpg": 1,
"wav": 1,
"elf": 1,
"pe": 1,
"mp4": 1,
"mpg": 1,
"pdf": 1,
"png": 1,
"ppt": 1,
"pptx": 1,
"tiff": 1,
"wmf": 1,
"xls": 1,
"xlsx": 1,
"mp3": 1,
"rtf": 1,
"coff": 1,
"macho": 1,
"unknown": 1
},
"tiffConfig": {
"geoTiff": 1
},
"svgConfig": {
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
},
"webpConfig": {
"Metadata": 1
}
}
},
"fileName": "Hello I am a filename example",
"password": null
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
base64 | string | true | none | none |
contentManagementPolicyDetail | ContentManagementPolicy | false | none | Required.Default is optional The Policy JSON used by the api to configure the engine NOTE: Due to XML being order dependent the property ordering of these classes should not be changed. Tests are in place to ensure they arent changed |
fileName | string | true | none | File Name |
password | string¦null | false | none | none |
ReportFormat
"XML"
This field can accept either a string or number representation of the enum
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
anonymous | string | false | none | This field can accept either a string or number representation of the enum |
Enumerated Values
Property | Value |
---|---|
anonymous | XML |
anonymous | JSON |
SvgConfig
{
"Scripts": 1,
"ForeignObjects": 1,
"Hyperlinks": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Scripts | ContentManagementFlagAction | false | none | none |
ForeignObjects | ContentManagementFlagAction | false | none | none |
Hyperlinks | ContentManagementFlagAction | false | none | none |
TiffConfig
{
"geoTiff": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
geoTiff | ContentManagementFlagAction | false | none | none |
WebpConfig
{
"Metadata": 1
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
Metadata | ContentManagementFlagAction | false | none | none |