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)
Last updated
Glyue supports building integration web service APIs that receive any arbitrary binary content (e.g. documents, bulk CSV data files, audio/video streams, archives)
Last updated
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:
HTTP Method | HTTP Request with Single File | HTTP Request with Multiple Files |
---|---|---|
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.
Glyue parses integration web service HTTP(S) bodies in accordance with the request's Content-Type
header value. The following behavior is enforced:
HTTP Request Content-Type(s) | Body Parsing Behavior |
---|---|
It is possible to submit a single file in a multipart/form-data
request.
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.
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
.
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:
Without the header, the default filename file
(with no extension) would instead be used:
POST
supported
supported
PUT
supported
rejected (415 unsupported media type)
PATCH
supported
rejected (415 unsupported media type)
GET
accepted but body is ignored
accepted but body is ignored
DELETE
accepted but body is ignored
accepted but body is ignored
application/json
Parsed as JSON into Pythonic data structure
application/xml
or text/xml
Parsed as XML into Pythonic data structure
multipart/form-data
Parsed into one or more GlyueFileHandle
objects in accordance to multipart/form-data
standards
*/*
or any other value
Parsed into one GlyueFileHandle
object
loan
FISCHER-20230531
note
Documents received from applicant today
driver_license.tiff
(file data)
bank_statement_01.pdf
(file data)
Content-Disposition
attachment; filename=name_goes_here.docx