Asynchronous Analyse and Rebuild
Endpoints supporting the inspection and rebuilding of documents through Glasswall Halo asynchronously.
/api/v1/cdr-async
Processes the supplied document in base64 format using Glasswall Halo asynchronously.
When submitting a document to Glasswall Halo, the required policy settings can optionally be provided, either in the form of specifying a 'named policy' or providing a 'dynamic policy'.
A 'named policy' can be specified by setting the policyName query parameter. If the specified policy does not exist, then a 404 error will be returned.
A 'dynamic policy' can be specified in the body of the request by setting the ContentManagementPolicyDetail property. The schema defining the format for the policy settings can be retrieved from the cdr-policy/spec endpoint. If an invalid policy is submitted a 400 error will be returned.
As this API processes the given file through Glasswall Halo asynchronously, it will return the "transactionId" for reference.
query Parameters
policyNameSpecifies the named policy to be applied during Glasswall Halo processing. Alternatively a 'dynamic policy' can be provided in the message body. If no policy is specified then the default policy is applied.
Identifies the policy. The name should consist of only alphanumeric characters [A-Za-z0-9].
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.
formatControls the format of the analysis report. NITF and NSIF files report in JSON only; submitting one of those file types with format=xml (the default) is rejected with a 400 and error code 4033
return-executable-fileAllow the processing of software file types that are structurally fixed but not cleaned. If set to false then rebuilt executable files are not returned (even if they are found to contain no issues)
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 Guid that can be used to group requests in reports.
/api/v1/cdr-async › Request Body
base64The content of the document being submitted, base64 encoded.
fileNameSpecifies content filename.
passwordSpecifies the password to be applied when attempting to open the supplied content (Only applies to Archive files).
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
/api/v1/cdr-async › Responses
The asynchronous Glasswall Halo request is accepted.
Response headers
| Header | Description |
|---|---|
x-applied-policy | Identifies the policy applied during Glasswall Halo processing. Allowed values: (name), default, service-dynamic, service-fallback)Example: service-dynamic |
Cache-Control | Prevent sensitive information from being cached. Example: no-store |
Content-Security-Policy | To protect against drag-and-drop style clickjacking attacks. Example: frame-ancestors 'none' |
Content-Type | Indicates the response content type Example: application/json |
Strict-Transport-Security | Uses a week long max-age to prevent any communications from being sent to this domain over HTTPExample: max-age=31536000 |
X-Content-Type-Options | To prevent browsers from performing MIME sniffing, and inappropriately interpreting responses as HTML. Example: nosniff |
X-Frame-Options | To protect against drag-and-drop style clickjacking attacks. Example: DENY |
transactionIdTransactionID that corresponds to the asynchronous request
/api/v1/cdr-async/{transactionId}
Retrieves the result of the request that was made asynchronously
Retrieves the result of the request that was made asynchronously
path Parameters
transactionIdTransactionID that corresponds to an asynchronous request
TransactionID that corresponds to the asynchronous request
/api/v1/cdr-async/{transactionId} › Responses
The asynchronous Glasswall Halo request is completed with the status of "rebuilt". Rebuilt file and Analysis report are returned.
Response headers
| Header | Description |
|---|---|
Cache-Control | Prevent sensitive information from being cached. Example: no-store |
Content-Security-Policy | To protect against drag-and-drop style clickjacking attacks. Example: frame-ancestors 'none' |
Content-Type | Indicates the response content type Example: application/json |
Strict-Transport-Security | Uses a week long max-age to prevent any communications from being sent to this domain over HTTPExample: max-age=31536000 |
X-Content-Type-Options | To prevent browsers from performing MIME sniffing, and inappropriately interpreting responses as HTML. Example: nosniff |
X-Frame-Options | To protect against drag-and-drop style clickjacking attacks. Example: DENY |
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 |
transactionIdTransactionID that corresponds to the asynchronous request
processingIdTransactionID that corresponds to the asynchronous request
fileIdIdentifier of the file the result describes
processingStatusfileType/api/v1/cdr-file-async
Processes the uploaded file in binary format using the Glasswall Halo asynchronously.
The endpoint accepts requests to rebuild files asynchronously. The file is sent in the request body as a field in 'multipart/form-data'.
When submitting a document to Glasswall Halo, the required policy settings can optionally be provided, either in the form of specifying a 'named policy' or providing a 'dynamic policy'.
A 'named policy' can be specified by setting the policyName query parameter. If the specified policy does not exist, then a 404 error will be returned.
A 'dynamic policy' can be specified in the body of the request by setting the ContentManagementPolicy property. The schema defining the format for the policy settings can be retrieved from the cdr-policy/spec endpoint. If an invalid policy is submitted a 400 error will be returned.
As this API processes the given file through Glasswall Halo asynchronously, it will return the "transactionId" for reference.
query Parameters
policyNameSpecifies the named policy to be applied during Glasswall Halo processing. Alternatively a 'dynamic policy' can be provided in the message body. If no policy is specified then the default policy is applied.
Identifies the policy. The name should consist of only alphanumeric characters [A-Za-z0-9].
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.
formatControls the format of the analysis report. NITF and NSIF files report in JSON only; submitting one of those file types with format=xml (the default) is rejected with a 400 and error code 4033
return-executable-fileAllow the processing of software file types that are structurally fixed but not cleaned. If set to false then rebuilt executable files are not returned (even if they are found to contain no issues)
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 base64 encoded string in the header.
Specifies the password to be applied when attempting to open the supplied content (Only applies to Archive files).
/api/v1/cdr-file-async › Request Body
fileContentManagementPolicyThis 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
/api/v1/cdr-file-async › Responses
The asynchronous Glasswall Halo request is accepted.
Response headers
| Header | Description |
|---|---|
x-applied-policy | Identifies the policy applied during Glasswall Halo processing. Allowed values: (name), default, service-dynamic, service-fallback)Example: service-dynamic |
Cache-Control | Prevent sensitive information from being cached. Example: no-store |
Content-Security-Policy | To protect against drag-and-drop style clickjacking attacks. Example: frame-ancestors 'none' |
Content-Type | Indicates the response content type Example: application/json |
Strict-Transport-Security | Uses a week long max-age to prevent any communications from being sent to this domain over HTTPExample: max-age=31536000 |
X-Content-Type-Options | To prevent browsers from performing MIME sniffing, and inappropriately interpreting responses as HTML. Example: nosniff |
X-Frame-Options | To protect against drag-and-drop style clickjacking attacks. Example: DENY |
transactionIdTransactionID that corresponds to the asynchronous request
/api/v1/cdr-file-async/{transactionId}
Retrieves the result of the request that was made asynchronously in binary format
Retrieves the result of the request that was made asynchronously in binary format
path Parameters
transactionIdTransactionID that corresponds to an asynchronous request
TransactionID that corresponds to the asynchronous request
/api/v1/cdr-file-async/{transactionId} › Responses
CDR OK.
The content returned in the response is dependant on the setting of the responseContent query parameter during the submission of an asynchronous request.
| Response Content | Response Body | Response Header content-type |
|---|---|---|
| null | Rebuilt File and Analysis Report in .zip file | application/zip |
noAnalysisReport | Rebuilt File | application/octet-stream |
noRebuiltFile | Analysis Report | application/xml or application/json depending on format query parameter setting during the submission of asynchronous request. |
noAnalysisReport,noRebuiltFile | no content | not set |
When processing an archive file the same return content is used, with the exception of when noRebuiltFile is selected.
| Response Content | Response Body | Response Header content-type |
|---|---|---|
noRebuiltFile | Analysis Report archive | application/zip |
Response headers
| Header | Description |
|---|---|
x-filetype | Filetype of the submitted file, identified using Glasswall Halo |
x-transaction-idstring (uuid) | TransactionID that corresponds to the asynchronous request |
x-processing-status | Describes the processing outcome Allowed values: rebuilt |
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 |
Cache-Control | Prevent sensitive information from being cached. Example: no-store |
Content-Security-Policy | To protect against drag-and-drop style clickjacking attacks. Example: frame-ancestors 'none' |
Content-Type | Indicates the response content type Example: application/json |
Strict-Transport-Security | Uses a week long max-age to prevent any communications from being sent to this domain over HTTPExample: max-age=31536000 |
X-Content-Type-Options | To prevent browsers from performing MIME sniffing, and inappropriately interpreting responses as HTML. Example: nosniff |
X-Frame-Options | To protect against drag-and-drop style clickjacking attacks. Example: DENY |
An archive file containing both the rebuilt file and associated analysis report.