Rebuild API

Rebuild File Endpoint

The Endpoint

This Endpoint takes a file in its request and rebuilds it with the Glasswall Engine. The binary content of the rebuilt file is returned. The Accept Header controls the format of the body.

You can also specify a Glasswall Content Management Policy to change the individual content handling the engine takes for supported file types.

When the file conforms to specification, the rebuilt file will be returned in the response.

Endpoint
POST /api/rebuild/file

Request Body

The request Content-Type is multipart/form-data.

Two arguments are specified in the form, 'file' and a fully optional 'contentManagementPolicyJson'.

The 'file' argument contains the raw content and the file name.

The 'contentManagementPolicyJSON' argument is a JSON representation of the content management policy model (See section).

Multipart Body Example:
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="contentManagementFlagJson"
{
"PdfContentManagement": {
"Metadata": 0
}
}
-----------------------------9051914041544843365972754266
Content-Disposition: form-data; name="file"; filename="test.doc"
Content-Type: application/octet-stream
Some data found inside the doc.
-----------------------------9051914041544843365972754266--

Request Headers

This endpoint has the following headers that can be set.

  • Accept - This can be set to 'application/octet-stream'. If not set, a base64 representation of the rebuilt file will be returned instead of the binary content of the rebuilt file.
  • Authorization - This is the JWT Token that you purchased. This must be sent in the request.
  • Content-Type - This should be set to 'multipart/form-data', most languages will provide mechanisms to automatically populate this.

Rebuild Base64 Endpoint

The Endpoint

This Endpoint takes the base64 representation of a file. It then rebuilds it with the Glasswall Engine. A base64 encoded version of the rebuilt file is returned.

You can also specify a Glasswall Content Management Policy to change the individual content handling the engine takes for supported file types.

When the file conforms to specification, the rebuilt file will be returned in the response base64 encoded.

Endpoint
POST /api/rebuild/base64

Request Body

The request Content-Type is application/json.

Two arguments are specified in the JSON, 'Base64' and a fully optional 'ContentManagementFlags'.

The 'Base64' argument contains the Base64 encoded contents of the input file.

The 'ContentManagementFlags' field in the JSON is the content management policy model (See section).

Multipart Body Example:
{
"Base64": "The base 64 encoded representation of the file",
"ContentManagementFlags": {
"PdfContentManagement": {
"Metadata": 0
}
}
}

Request Headers

This endpoint has the following headers that can be set.

  • Authorization - This is the JWT Token that you purchased. This must be sent in the request.
  • Content-Type - This should be set to 'application/json', most languages will provide mechanisms to automatically populate this.

Rebuild Url to Url Endpoint

The Endpoint

This endpoint downloads a file located in the InputGetUrl parameter. It then rebuilds it with the Glasswall Engine. The rebuilt file is uploaded to a location specified by the OutputPutUrl parameter.

You can also specify a Glasswall Content Management Policy to change the individual content handling the engine takes for supported file types.

When the file conforms to specification, the rebuilt file will be returned in the response base64 encoded.

Endpoint
POST /api/rebuild

Request Body

The request Content-Type is application/json

Three arguments are specified in the JSON, 'InputGetUrl', 'OutputPutUrl' and a fully optional 'contentManagementPolicyJson'.

The 'file' argument contains the raw content and the file name.

The 'ContentManagementFlags' field in the JSON is the Content Management Policy model (See section).

JSON Body Example:
{
"InputGetUrl": "A link to the file to rebuild",
"OutputPutUrl": "A link to the place to put the rebuilt file",
"ContentManagementFlags": {
"PdfContentManagement": {
"Metadata": 0
}
}
}

Request Headers

This endpoint has the following headers that can be set.

  • Authorization - This is the JWT Token that you purchased. This must be sent in the request.
  • Content-Type - This should be set to 'application/json', most languages will provide mechanisms to automatically populate this.

API Resources

  • Multipart/Form-Content - File in Http Payload
  • Secure Url (S3)