Analyse and Rebuild
API endpoints to remove threats from files
/api/v3/cdr-file
Analyses and rebuilds a binary 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.
query Parameters
policyNameSpecifies 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-contentDefines 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 receive both the analysis and rebuilt file along with the file type in the header (Composite Mode), this is the default behaviour.
generate-hash-typesFor 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.
formatThe format of the analysis report to be returned if an analysis report is requested. NITF and NSIF files report in JSON only; asking for XML returns a 400 with error code 4033
This field can accept either a string or number representation of the enum
return-executable-fileAllow 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.
pdf-conform
Specify whether or not to run non-conforming PDF files through Glasswall Conform. Not compatible when 'response-content' is set to noRebuiltFile
Headers
X-Session-IdA string that can be used to group requests in reports
passwordIf processing an encrypted ZIP archive file the password can be passed in as a base 64 encoded string in the header
/api/v3/cdr-file › Request Body
fileThe file to be processed in binary format
ContentManagementPolicyThis 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.
Maximum label length for '.ContentManagementFlags.PdfSettings.headerLabel' is 256 characters. Characters are limited to those on standard US and Latin keyboards.
/api/v3/cdr-file › Responses
Created
Response headers
| Header | Description |
|---|---|
x-processing-id | UUID representing the transaction/processing id of a request |
x-processing-status | Processing outcome of the file after processing by the Glasswall Embedded Engine. Rebuilt, Failed, Error, Allowed. Allowed values: Rebuilt, Failed, Error, Allowed |
x-hash-{algo}-input | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm |
x-hash-{algo}-output | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm |
x-file-size | The size in bytes of the original input file |
x-applied-policy | Identifies the policy applied during Glasswall Halo processing. Allowed values: (name), default, service-dynamic, glasswall-fallback) |
x-content-type-option | The HTTP X-Content-Type-Options response header indicates that the MIME types advertised in the Content-Type headers should be respected and not changed. |
x-frame-options | The HTTP X-Frame-Options response header is used to indicate whether a browser should be allowed to render a page in a frame, iframe, embed or object. |
x-filereputation-responsecode | Response code returned from the file reputation service |
x-filereputation-status | Response status from the file reputation service. Allowed values: Known, Unknown, Malicious, Suspicious) |
x-filereputation-threatname | Malware family name if file is detected as Malicious or Suspicious |
x-filereputation-threatlevel | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value |
x-filereputation-trustlevel | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. |
x-pdf-conformboolean | Indicates whether or not the file was run through Glasswall Conform |
x-pdf-conform-mode | Indicates which pdf conform mode was used |
/api/v3/cdr
Analyses and rebuilds a Base64 encoded file
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.
query Parameters
policyNameSpecifies 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-contentDefines 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 receive both the analysis and rebuilt file along with the file type in the header (Composite Mode).
generate-hash-typesFor 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.
formatThe format of the analysis report to be returned if an analysis report is requested. NITF and NSIF files report in JSON only; asking for XML returns a 400 with error code 4033
This field can accept either a string or number representation of the enum
return-executable-fileAllow 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.
pdf-conform
Specify whether or not to run non-conforming PDF files through Glasswall Conform. Not compatible when 'response-content' is set to noRebuiltFile
Headers
X-Session-IdA string that can be used to group requests in reports
/api/v3/cdr › Request Body
base64fileNameFile Name
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
password/api/v3/cdr › Responses
Created
Response headers
| Header | Description |
|---|---|
x-processing-id | UUID representing the transaction/processing id of a request |
x-processing-status | Processing outcome of the file after processing by the Glasswall Embedded Engine. Rebuilt, Failed, Error, Allowed. Allowed values: Rebuilt, Failed, Error, Allowed |
x-hash-{algo}-input | Value of the input file hash. {algo} is replaced with the chosen hashing algorithm |
x-hash-{algo}-output | Value of the output file hash. {algo} is replaced with the chosen hashing algorithm |
x-file-size | The size in bytes of the original input file |
x-applied-policy | Identifies the policy applied during Glasswall Halo processing. Allowed values: (name), default, service-dynamic, glasswall-fallback) |
x-content-type-option | The HTTP X-Content-Type-Options response header indicates that the MIME types advertised in the Content-Type headers should be respected and not changed. |
x-frame-options | The HTTP X-Frame-Options response header is used to indicate whether a browser should be allowed to render a page in a frame, iframe, embed or object. |
x-filereputation-responsecode | Response code returned from the file reputation service |
x-filereputation-status | Response status from the file reputation service. Allowed values: Known, Unknown, Malicious, Suspicious) |
x-filereputation-threatname | Malware family name if file is detected as Malicious or Suspicious |
x-filereputation-threatlevel | Threat level for the file hash. 0 indicates no threat; 1 is the lowest threat severity; 5 is the highest threat value |
x-filereputation-trustlevel | Trust factor value for the file hashes detection results. 0 is the most trusted, 5 is the least trusted. |
x-pdf-conformboolean | Indicates whether or not the file was run through Glasswall Conform |
x-pdf-conform-mode | Indicates which pdf conform mode was used |
errorReasonprocessingIdprocessingStatusfileType