NAV Navigation
Shell HTTP JavaScript Ruby Python PHP Java Go

Synchronous API v2.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

File Type Detection

API endpoint to detect the file type

Detect a file type and other information of a binary file

Code samples

# You can also use wget
curl -X POST /api/FileTypeDetection/file \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/FileTypeDetection/file HTTP/1.1

Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"file": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/FileTypeDetection/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/FileTypeDetection/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/FileTypeDetection/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/FileTypeDetection/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/FileTypeDetection/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/FileTypeDetection/file", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/FileTypeDetection/file

The endpoint accepts requests to detect file types of binary files. The file is sent in the request body as a field in ‘multipart/form-data’. On success, the file type is returned in the response body. The response ‘Content-Type’ is ‘application/json’

Body parameter

file: string

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
body body object false none
» file body string(binary) true none

Example responses

400 Error returned if the form file is null or contained no data

{
"Errors": [
"File cannot be null",
"File did not contain any data."
],
"Code": 4002
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine is unable to determine file type

{
"Errors": [
"Failed to detect file type"
],
"Code": 5003
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Detect a file type and other information using the Base64 encoded file representation

Code samples

# You can also use wget
curl -X POST /api/FileTypeDetection/base64 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/FileTypeDetection/base64 HTTP/1.1

Content-Type: application/json
Accept: application/json
X-Session-Id: string
const inputBody = '{
"base64": "string"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/FileTypeDetection/base64',
{
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/FileTypeDetection/base64',
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/FileTypeDetection/base64', 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/FileTypeDetection/base64', 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/FileTypeDetection/base64");
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/FileTypeDetection/base64", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/FileTypeDetection/base64

The endpoint accepts requests to detect file types of Base64 encoded files. The request body is a JSON that contains Base64 representation of the file. The request ‘Content-Type’ must be ‘application/json’. On success, the file type is returned in the response body. The response ‘Content-Type’ is ‘application/json’.

Body parameter

{
"base64": "string"
}

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
body body FileDetectBase64Request true none

Example responses

400 Error returned if the body of the request is invalid

{
"Errors": [
"The request body was invalid"
],
"Code": 4001
}

400 Error returned if base64 string is incorrect

{
"Errors": [
"Unable to parse base64 file"
],
"Code": 4003
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine is unable to determine file type

{
"Errors": [
"Failed to detect file type"
],
"Code": 5003
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Analyse

API endpoints to analyse threats from files

Analyses a binary file using Glasswall Halo and returns analysis report in the specified format

Code samples

# You can also use wget
curl -X POST /api/Analyse/file \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Analyse/file HTTP/1.1

Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"file": "string",
"contentManagementFlagJson": "{\"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}}}",
"format": "XML"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Analyse/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/Analyse/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/Analyse/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/Analyse/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/Analyse/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/Analyse/file", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Analyse/file

The endpoint accepts requests to analyse files. The file is sent in the request body as a field in ‘multipart/form-data’. On success, the Analysis Report is returned in the response body. The response’s ‘Content-Type’ is ‘application/octet-stream’

Body parameter

file: string
contentManagementFlagJson: '{"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}}}'
format: XML

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
body body object false none
» file body string(binary) true The file to be processed in binary format
» contentManagementFlagJson body object false This field contains each of the Content Management Flags for the file types that the engine supports.
» format body ReportFormat false This field can accept either a string or number representation of the enum

Detailed descriptions

» contentManagementFlagJson: 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 form file is null or contained no data

{
"Errors": [
"File cannot be null",
"File did not contain any data."
],
"Code": 4002
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine fails to generate an analysis report

{
"Errors": [
"Failed to generate analysis report"
],
"Code": 5006
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Analyses a base64 file using Glasswall Halo and returns analysis report in the specified format

Code samples

# You can also use wget
curl -X POST /api/Analyse/base64 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Analyse/base64 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,
"tif": 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": "string",
"format": "XML"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Analyse/base64',
{
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/Analyse/base64',
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/Analyse/base64', 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/Analyse/base64', 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/Analyse/base64");
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/Analyse/base64", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Analyse/base64

The endpoint accepts requests to analyse a Base64 encoded file. The request body is a JSON that contains Base64 representation of the file. The request ‘Content-Type’ must be ‘application/json’. On success, the Analysis Report is returned in the response body. The response’s ‘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,
"tif": 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": "string",
"format": "XML"
}

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
body body Base64Request true none

Example responses

400 Error returned if the body of the request is invalid

{
"Errors": [
"The request body was invalid"
],
"Code": 4001
}

400 Error returned if base64 string is incorrect

{
"Errors": [
"Unable to parse base64 file"
],
"Code": 4003
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine fails to generate an analysis report

{
"Errors": [
"Failed to generate analysis report"
],
"Code": 5006
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Rebuild

API endpoints to remove threats from files

Rebuilds a binary file

Code samples

# You can also use wget
curl -X POST /api/Rebuild/file \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Rebuild/file HTTP/1.1

Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"file": "string",
"contentManagementFlagJson": "{\"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}}}"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Rebuild/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/Rebuild/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/Rebuild/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/Rebuild/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/Rebuild/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/Rebuild/file", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Rebuild/file

The endpoint accepts requests to rebuild files. The file is sent in the request body as a field in ‘multipart/form-data’. On success, the Rebuilt file is returned in the response body. The response ‘Content-Type’ is ‘application/octet-stream’

Body parameter

file: string
contentManagementFlagJson: '{"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}}}'

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
return-executable-file query boolean false Allow the processing of software file types that are structurally fixed but not cleaned
body body object false none
» file body string(binary) true The file to be processed in binary format
» contentManagementFlagJson body object false This field contains each of the Content Management Flags for the file types that the engine supports.

Detailed descriptions

» contentManagementFlagJson: 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

Example responses

400 Error returned if the form file is null or contained no data

{
"Errors": [
"File cannot be null",
"File did not contain any data."
],
"Code": 4002
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

400 if the File is an executable file type and the allow query parameter was not set

{
"Errors": [
"File is an executable file type and not allowed by default"
],
"Code": 4010
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine fails to rebuild file

{
"Errors": [
"Failed to rebuild file"
],
"Code": 5004
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Rebuilds a Base64 encoded file

Code samples

# You can also use wget
curl -X POST /api/Rebuild/base64 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Rebuild/base64 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,
"tif": 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"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Rebuild/base64',
{
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/Rebuild/base64',
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/Rebuild/base64', 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/Rebuild/base64', 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/Rebuild/base64");
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/Rebuild/base64", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Rebuild/base64

The endpoint accepts requests to rebuild Base64 encoded files. The request body is a JSON that contains Base64 representation of the file. The request ‘Content-Type’ must be ‘application/json’. The response is a Base64 encoded rebuilt file. The response ‘Content-Type’ is ‘text/plain’.

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,
"tif": 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"
}

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
return-executable-file query boolean false Allow the processing of software file types that are structurally fixed but not cleaned
body body RebuildBase64Request true none

Example responses

400 Error returned if the body of the request is invalid

{
"Errors": [
"The request body was invalid"
],
"Code": 4001
}

400 Error returned if base64 string is incorrect

{
"Errors": [
"Unable to parse base64 file"
],
"Code": 4003
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

400 if the File is an executable file type and the allow query parameter was not set

{
"Errors": [
"File is an executable file type and not allowed by default"
],
"Code": 4010
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine fails to rebuild file

{
"Errors": [
"Failed to rebuild file"
],
"Code": 5004
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Rebuilds an archive file (zip, 7z, gz, rar and tar) using its binary data

Code samples

# You can also use wget
curl -X POST /api/Rebuild/archivefile \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Rebuild/archivefile HTTP/1.1

Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"file": "string",
"contentManagementFlagJson": "{\"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}}}"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Rebuild/archivefile',
{
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/Rebuild/archivefile',
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/Rebuild/archivefile', 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/Rebuild/archivefile', 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/Rebuild/archivefile");
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/Rebuild/archivefile", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Rebuild/archivefile

The endpoint accepts requests to rebuild binary files in an archive file (zip, 7z, gz, rar and tar). The Archive is sent in the request body as a field in ‘multipart/form-data’. On success, an archive with the rebuilt files is returned in the response body. The response ‘Content-Type’ is ‘application/octet-stream’

Body parameter

file: string
contentManagementFlagJson: '{"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}}}'

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
return-executable-file query boolean false Allow the processing of software file types that are structurally fixed but not cleaned
body body object false none
» file body string(binary) true The file to be processed in binary format
» contentManagementFlagJson body object false This field contains each of the Content Management Flags for the file types that the engine supports.

Detailed descriptions

» contentManagementFlagJson: 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

Example responses

400 Error returned if the form file is null or contained no data

{
"Errors": [
"File cannot be null",
"File did not contain any data."
],
"Code": 4002
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

400 if the File is an executable file type and the allow query parameter was not set

{
"Errors": [
"File is an executable file type and not allowed by default"
],
"Code": 4010
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine fails to rebuild file

{
"Errors": [
"Failed to rebuild file"
],
"Code": 5004
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Rebuilds a protected Zip archive file using its binary data and password

Code samples

# You can also use wget
curl -X POST /api/Rebuild/protectedZipfile \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Rebuild/protectedZipfile HTTP/1.1

Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"file": "string",
"contentManagementFlagJson": "{\"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}}}",
"password": "string"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Rebuild/protectedZipfile',
{
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/Rebuild/protectedZipfile',
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/Rebuild/protectedZipfile', 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/Rebuild/protectedZipfile', 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/Rebuild/protectedZipfile");
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/Rebuild/protectedZipfile", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Rebuild/protectedZipfile

The endpoint accepts requests to rebuild files in a protected Zip archive. The Zip archive and the password are sent in the request body as fields of ‘multipart/form-data’. On success, a Zip archive with the rebuilt files is returned in the response body. The response ‘Content-Type’ is ‘application/octet-stream’

Body parameter

file: string
contentManagementFlagJson: '{"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}}}'
password: string

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
return-executable-file query boolean false Allow the processing of software file types that are structurally fixed but not cleaned
body body object false none
» file body string(binary) true A protected Zip archive with files to be rebuilt
» contentManagementFlagJson body object false This field contains each of the Content Management Flags for the file types that the engine supports.
» password body string true Password for the protected Zip file

Detailed descriptions

» contentManagementFlagJson: 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

Example responses

400 Error returned if the form file is null or contained no data

{
"Errors": [
"File cannot be null",
"File did not contain any data."
],
"Code": 4002
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

400 Error if the password provided is invalid for the protected archive

{
"Errors": [
"Failed to Unpack Archive Due to an incorrect password"
],
"Code": 4007
}

400 Error if protected archive is an unsupported format

{
"Errors": [
"Protected Archives must be a Zip file"
],
"Code": 4007
}

400 if the File is an executable file type and the allow query parameter was not set

{
"Errors": [
"File is an executable file type and not allowed by default"
],
"Code": 4010
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if Glasswall engine fails to rebuild file

{
"Errors": [
"Failed to rebuild file"
],
"Code": 5004
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Analyse and Rebuild

Composite API endpoints to both analyse and remove threats from files, along with a malicious data report

Analyses and Rebuilds a file using its binary data and returns a zip

Code samples

# You can also use wget
curl -X POST /api/Composite/file \
-H 'Content-Type: multipart/form-data' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Composite/file HTTP/1.1

Content-Type: multipart/form-data
Accept: application/json
X-Session-Id: string
const inputBody = '{
"file": "string",
"contentManagementFlagJson": "{\"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}}}",
"format": "XML"
}';
const headers = {
'Content-Type':'multipart/form-data',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Composite/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/Composite/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/Composite/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/Composite/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/Composite/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/Composite/file", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Composite/file

The endpoint accepts requests to rebuild files. The file is sent in the request body as a field in ‘multipart/form-data’. On success, the response is a zip with the rebuilt file and either an XML or JSON report. The response ‘Content-Type’ is ‘application/octet-stream’

Body parameter

file: string
contentManagementFlagJson: '{"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}}}'
format: XML

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
return-executable-file query boolean false Allow the processing of software file types that are structurally fixed but not cleaned
body body object false none
» file body string(binary) true The file to be processed in binary format
» contentManagementFlagJson body object false This field contains each of the Content Management Flags for the file types that the engine supports.
» format body ReportFormat false This field can accept either a string or number representation of the enum

Detailed descriptions

» contentManagementFlagJson: 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 form file is null or contained no data

{
"Errors": [
"File cannot be null",
"File did not contain any data."
],
"Code": 4002
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

400 if the File is an executable file type and the allow query parameter was not set

{
"Errors": [
"File is an executable file type and not allowed by default"
],
"Code": 4010
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

500 Error if there is not enough information to build a composite response

{
"Errors": [
"Not Enough Information to build composite response"
],
"Code": 5008
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Analyses and Rebuilds a file using its Base64 encoded representation and returns a zip

Code samples

# You can also use wget
curl -X POST /api/Composite/base64 \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'X-Session-Id: string'
POST /api/Composite/base64 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,
"tif": 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": "string",
"format": "XML"
}';
const headers = {
'Content-Type':'application/json',
'Accept':'application/json',
'X-Session-Id':'string'
};

fetch('/api/Composite/base64',
{
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/Composite/base64',
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/Composite/base64', 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/Composite/base64', 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/Composite/base64");
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/Composite/base64", data)
req.Header = headers

client := &http.Client{}
resp, err := client.Do(req)
// ...
}

POST /api/Composite/base64

The endpoint accepts requests to rebuild Base64 encoded files. The request body is a JSON that contains Base64 representation of the file. The request ‘Content-Type’ must be ‘application/json’. On success, the response is a zip with the rebuilt file and either an XML or JSON report. 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,
"tif": 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": "string",
"format": "XML"
}

Parameters

Name In Type Required Description
X-Session-Id header string false A Guid that can be used to group requests in reports
return-executable-file query boolean false Allow the processing of software file types that are structurally fixed but not cleaned
body body Base64Request true none

Example responses

400 Error returned if the body of the request is invalid

{
"Errors": [
"The request body was invalid"
],
"Code": 4001
}

400 Error returned if base64 string is incorrect

{
"Errors": [
"Unable to parse base64 file"
],
"Code": 4003
}

400 Error returned if the policy is invalid

{
"Errors": [
"Invalid content management policy"
],
"Code": 4004
}

400 Error if archive processing fails during unpacking

{
"Errors": [
"Failed to Unpack Archive"
],
"Code": 4005
}

400 Error if archive is above documented allowed limits

{
"Errors": [
"The Archive exceeded allowed limits. Refer to glasswall documentation for more information"
],
"Code": 4011
}

400 Error if archive processing fails during repacking

{
"Errors": [
"Failed to Repack Archive"
],
"Code": 4006
}

400 if the File is an executable file type and the allow query parameter was not set

{
"Errors": [
"File is an executable file type and not allowed by default"
],
"Code": 4010
}

401 Response

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

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": [
"Too many requests"
],
"Code": 4029
}

500 Error if Glasswall engine timesout during processing

{
"Errors": [
"Internal server error: Server timed out processing this request."
],
"Code": 5001
}

500 Error if the original file fails to save to storage

{
"Errors": [
"Failed to upload original file"
],
"Code": 5007
}

500 Error if there is not enough information to build a composite response

{
"Errors": [
"Not Enough Information to build composite response"
],
"Code": 5008
}

Responses

Status Meaning Description Schema
200 OK Success None
400 Bad Request Bad Request ErrorResponse
401 Unauthorized Unauthorized ProblemDetails
403 Forbidden Forbidden ErrorResponse
429 Too Many Requests Too Many Requests ErrorResponse
500 Internal Server Error Server Error ErrorResponse

Schemas

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,
"unknown": 1
}

Properties

Name Type Required Restrictions Description
bmp ContentManagementFlagAction false none none
doc ContentManagementFlagAction false none none
docx ContentManagementFlagAction false none none
emf ContentManagementFlagAction false none none
gif ContentManagementFlagAction false none none
jpg ContentManagementFlagAction false none none
wav ContentManagementFlagAction false none none
elf ContentManagementFlagAction false none none
pe ContentManagementFlagAction false none none
mp4 ContentManagementFlagAction false none none
mpg ContentManagementFlagAction false none none
pdf ContentManagementFlagAction false none none
png ContentManagementFlagAction false none none
ppt ContentManagementFlagAction false none none
pptx ContentManagementFlagAction false none none
tif ContentManagementFlagAction false none none
wmf ContentManagementFlagAction false none none
xls ContentManagementFlagAction false none none
xlsx ContentManagementFlagAction false none none
mp3 ContentManagementFlagAction false none none
rtf ContentManagementFlagAction false none none
coff ContentManagementFlagAction false none none
macho ContentManagementFlagAction false none none
unknown ContentManagementFlagAction false none none

Base64Request

{
"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,
"tif": 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": "string",
"format": "XML"
}

Base 64 request for rebuild and analysis

Properties

Name Type Required Restrictions Description
base64 string true none The base64 string of the file to be analysed
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 The name of the file to be analysed
format ReportFormat false none This field can accept either a string or number representation of the enum

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,
"tif": 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,
"tif": 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

ErrorResponse

{
"errors": [
"string"
],
"code": 0
}

Properties

Name Type Required Restrictions Description
errors [string]¦null false none The error text relating to the particular error
code integer(int32)¦null false none The Glasswall error code

FileDetectBase64Request

{
"base64": "string"
}

Properties

Name Type Required Restrictions Description
base64 string true none none

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

ProblemDetails

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}

Properties

Name Type Required Restrictions Description
additionalProperties any false none none
type string¦null false none none
title string¦null false none none
status integer(int32)¦null false none none
detail string¦null false none none
instance string¦null 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,
"tif": 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"
}

Base 64 request for rebuild and analysis

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

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