Configuring extension connector
Extension connector set up
Use the Extension connector to deliver scanned files to the selected Extension endpoint. This allows custom postprocessing of the scanned files.
It is strongly recommended to use HTTPS only since the data (scanned document) might contain some sensitive information.
1. Extension endpoint URL – URL of the endpoint where the scanned documents should be sent (for example azure function URL )
Request
The scanned job files are sent all together in a single multipart/form-data request. The request also includes all scan parameters which are added dynamically.
Documentation of and API that Extension should implement
openapi:
3.0
.
0
info:
description: This is an API
for
uploading scan jobs
version:
"1.0.0"
title: API scan connector
paths:
/api/scan:
post:
summary: Uploads and process scan job
description: |
Upload scan job (both data and metadata),
responses:
'200'
:
description: scan job processed seccuessfuly
'400'
:
description:
'error'
requestBody:
content:
multipart/form-data:
schema:
type: object
properties:
username:
type: string
# all other connector-specified and user-defined variables goes here
# in the same way as username
# e.g:
# mailTo:
# type: string
# mailFrom:
# type: string
filename:
#
default
is application/octet-stream, need to declare the type
# e.g. application/pdf or image/jpg
type: array
items:
type: string
format: binary
encoding:
filename:
contentType: image/jpeg, image/tiff, applicaton/pdf
style: form
explode:
true
Example of request
This example shows requests with one variable userEmail and one document. The real request will contain all the scan metadata and user inputs that are available and all files. The boundary is randomly generated with each request.
POST / HTTP/1.1
Connection: keep-alive
Content-Type: multipart/form-data; boundary=---------------------------123456789
Content-Length: 554
-----------------------------123456789
Content-Disposition: form-data; name="userEmail"
-----------------------------123456789
Content-Disposition: form-data; name="file1"; filename="document.pdf"
Content-Type: text/plain
Content of document.pdf.
-----------------------------123456789
Example parameters that are added to the multipart/form-data request
billingCode: ,
userEmail: ,
deviceCostCenterID:
1694
,
deviceGroupName: ExampleDeviceGroup,
scanDate:
2021
-
02
-
17
,
userCostCenterName: Default cost center,
safeqHome: /opt,
deviceEquipmentID: ,
pdfComplianceLevelFYkBZw7CcS9zKp: None,
deviceGroupIP: tenant.dev.ysoft-dev.net,
workflowName: Scan to fax,
userFirstName: l,
scanTime:
12
-
00
-
03
-
518
,
userCostCenterID:
0
,
userUsername: ls,
userSurname: s,
deviceLocation: ,
deviceID:
265
,
deviceServiceAgreementID: ,
scanJobID: 4e19a6a0-d580-457f-ad59-fcb08584c5ba,
deviceIP: ,
deviceCostCenterName: Default cost center,
deviceName: iws,
userHome: ,
deviceContactPerson: ,
workflowID:
151
,
fileTypeFYkBZw7CcS9zKp: PDF,
deviceGroupID:
179
Other than this, also all custom input variables defined in management for example %faxNumber% will be sent in the request.