Arbitrary Integration Request Content Support

Glyue supports building integration web service APIs that receive any arbitrary binary content (e.g. documents, bulk CSV data files, audio/video streams, archives)

Integration execution endpoints can be passed body content that isn't a single JSON or XML payload. When this occurs, the request's body is converted into one or multiple GlyueFileHandle objects and then passed into Glyue's integration engine for processing.

The term "file upload integration" is used to reference integrations that accept input data that isn't represented as JSON or XML.

Execution requests to file upload integrations are subject to the following rules:

By default, integration endpoints only accept POST requests. Web Service Endpoints must be created to enable integration execution via other HTTP methods as documented in the Build a RESTful CRUD Web Service how-to guide and the Web Service Endpoints reference page.

Content-Type Handling

Glyue parses integration web service HTTP(S) bodies in accordance with the request's Content-Type header value. The following behavior is enforced:

It is possible to submit a single file in a multipart/form-data request.

Multipart / Form-Data Content Requirements

Glyue assumes that the name of the field in the form data is the name of the file in that field.

Non-file form data will appear in input.payload while the files will appear in input.files as shown below.

{
    ...
    "headers": {...},
    "payload": {
        "loan": "FISCHER-20230531",
        "note": "Documents received from applicant today"
    },
    "files": {
        "driver_license.tiff": <GlyueFileHandle ... >,
        "bank_statement_01.pdf": <GlyueFileHandle ... >,
    },
    ...
}

Single Binary / File Upload Requirements

Content type for these requests will vary depending on the file being sent. Some common content types that apply are application/zip, application/pdf, image/png, audio/mpeg, video/mp4, application/octet-stream.

Content-Disposition Header

In order for Glyue to be aware of the file's name, the request must include it within the Content-Disposition in a standards-compliant manner like the following:

The above header would result in an input object with the following files content:

"payload": {},
"files": {
    "name_goes_here.docx": <GlyueFileHandle id=1 name=name_goes_here.docx>
}

Without the header, the default filename file (with no extension) would instead be used:

"files": {
    "file": <GlyueFileHandle id=1 name=file>
}

Last updated