dwt
Version:
Dynamic Web TWAIN is a TWAIN/ICA/SANE-based scanning SDK software specifically designed for web applications running on Windows/macOS/Linux. With just a few lines of code, you can develop robust applications to scan documents from TWAIN/ICA/SANE-compatibl
1,432 lines (1,430 loc) • 159 kB
YAML
openapi: 3.0.1
info:
title: DWT
description: ''
version: 1.0.0
tags:
- name: Server Control
- name: Scanner Control
- name: Document Management
- name: Document Processing
paths:
/server:
get:
summary: Get the server settings.
deprecated: false
description: |
Get the server settings. Some settings can only be retrieved by the admin.
operationId: getServerSettings
tags:
- Server Control
parameters: []
responses:
'200':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ServerSettings'
example:
logLevel: 1
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: &ref_0
$ref: '#/components/schemas/Error'
example:
code: -2112
message: This endpoint only supports GET and PATCH.
statusCode: 405
headers: {}
security: []
patch:
summary: Update only specified server settings.
deprecated: false
description: >
Update only specified server settings. Some settings can only be updated
by the admin.
operationId: patchServerSettings
tags:
- Server Control
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ServerSettingsInput'
example: ''
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
logLevel:
type: integer
format: int32
default: 0
description: server log level.
example:
logLevel: 1
headers: {}
'400':
description: Bad request. e.g. parameter is invalid.
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET and PATCH.
statusCode: 405
headers: {}
security: []
/server/version:
get:
summary: Get the server API version.
deprecated: false
description: In the future, the client can pass the API version to call different API versions.
operationId: getServerVersion
tags:
- Server Control
parameters: []
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
version:
type: string
description: server API version.
examples:
- '20240719'
compatible:
type: boolean
description: server is compatible with the client.
examples:
- true
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET.
statusCode: 405
headers: {}
security: []
/device/scanners:
get:
summary: Retrieve a list scanners
deprecated: false
description: ''
operationId: getScanners
tags:
- Scanner Control
parameters:
- name: type
in: query
description: >
Device type. It can be one type or a combination. The default uses
TWAIN/TWAIN64/WIA/ICA/SANE.
required: false
schema: &ref_2
$ref: '#/components/schemas/ScannerType'
description: one value of ScannerType
examples:
- 16
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
items: &ref_3
$ref: '#/components/schemas/Scanner'
example:
- name: TWAIN2 FreeImage Software Scanner
type: 16
device: >-
{"deviceInfo":{"Manufacturer":"VFdBSU4gV29ya2luZyBHcm91cA==","ProductFamily":"U29mdHdhcmUgU2Nhbg==","ProductName":"VFdBSU4yIEZyZWVJbWFnZSBTb2Z0d2FyZSBTY2FubmVy","ProtocolMajor":2,"ProtocolMinor":1,"SupportedGroups":0,"Version":{"Country":1,"Info":"Mi4xLjMgc2FtcGxlIHJlbGVhc2UgMzJiaXQ=","Language":2,"MajorNum":2,"MinorNum":1}},"deviceType":16,"isSystemDefaultPrinter":false,"name":"VFdBSU4yIEZyZWVJbWFnZSBTb2Z0d2FyZSBTY2FubmVy"}
headers: {}
'400':
description: Bad request. e.g. parameter is invalid.
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET.
statusCode: 405
headers: {}
security: []
/device/scanners/jobs:
post:
summary: Create a scan job
deprecated: false
description: >
You can scan with the specified scanner. If the scanner is not specified, the last used scanner or the defalut scanner will be used. You
can set capabilities of the scanner. You can show the scanner ui if you are
operating on the machine running Dynamic Web TWAIN Service. You can get scanned image with the job uid, or save to the
specified document. You can create a pending job with the specified
scanner. One scanner can only have one pending job. If the scanner is
shared, it is recommended to create a pending job for the specified scanner.
Default other requests for the job will only allow the domain when job
created.
Once the job was created, you have to delete the job manually unless you
set a jobTimeout and it times out.
operationId: createScanJob
tags:
- Scanner Control
parameters:
- name: X-DICS-LICENSE-KEY
in: header
description: Product key
required: true
example: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateScanJobOptions'
example: ''
responses:
'201':
description: Successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/ScannerJob'
headers: {}
'400':
description: Bad request. e.g. parameter is invalid.
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'403':
description: The license is invalid.
content:
application/json:
schema: *ref_0
example:
code: -2800
message: >-
The current product key is empty or invalid. Please contact
the site administrator.
statusCode: 403
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports POST.
statusCode: 405
headers: {}
'423':
description: The scanner is currently in use.
content:
application/json:
schema: *ref_0
example:
code: -1004
message: >-
The source is connected to the maximum supported number of
applications.
statusCode: 423
headers: {}
security: []
/device/scanners/jobs/{jobuid}:
get:
summary: Retrieve the scan job status.
deprecated: false
description: |
You can get the job status.
operationId: getScanJobStatus
tags:
- Scanner Control
parameters:
- name: jobuid
in: path
description: ''
required: true
example: ''
schema:
type: string
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
required:
- status
- code
- message
properties:
status:
type: string
enum:
- pending
- running
- completed
- faulted
- canceled
description: scanner job status
code:
type: number
description: error code
default: '0'
message:
type: string
description: error message
default: Successful
description: Scanner Job Information
headers: {}
'404':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -1034
message: This provided job UID is invalid.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET, PATCH and DELETE.
statusCode: 405
headers: {}
'410':
description: >-
The job was deleted. If the service restarted and all the jobs
were lost, it will return 404.
content:
application/json:
schema: *ref_0
example:
code: -1034
message: Invalid Value.
statusCode: 410
headers: {}
security: []
patch:
summary: Update the scan job status.
deprecated: false
description: >
When the job status is pending, you can update the status of the job.
Otherwise, it will be ignored.
operationId: updateScanJob
tags:
- Scanner Control
parameters:
- name: jobuid
in: path
description: ''
required: true
example: ''
schema:
type: string
requestBody:
content:
application/json:
schema:
type: object
properties:
status:
type: string
default: running
enum:
- running
- canceled
description: >
Update the job status. If the job is running, it only accepts
Canceled to cancel the job. If the job is pending, it only accepts
Running to start the job.
required:
- status
example: ''
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
status:
type: string
enum:
- running
- canceled
default: running
description: scanner job status.
required:
- status
headers: {}
'400':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1034
message: This provided job UID is invalid.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET, PATCH and DELETE.
statusCode: 405
headers: {}
'409':
description: >-
When you try to cancel a not pending or running job, update a not
pending job to running.
content:
application/json:
schema: *ref_0
example:
code: -1011
message: Operation out of expected sequence.
statusCode: 409
headers: {}
'410':
description: The job was deleted.
content:
application/json:
schema: *ref_0
example:
code: -1034
message: Invalid Value.
statusCode: 410
headers: {}
security: []
delete:
summary: Delete the scan job
deprecated: false
description: >
If the job is running, the job will be canceled first, and then be
deleted, including all scanned documents.
operationId: deleteScanJob
tags:
- Scanner Control
parameters:
- name: jobuid
in: path
description: ''
required: true
example: ''
schema:
type: string
responses:
'204':
description: Successful operation
headers: {}
'404':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -1034
message: This provided job UID is invalid.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET, PATCH and DELETE.
statusCode: 405
headers: {}
'410':
description: The job was deleted.
content:
application/json:
schema: *ref_0
example:
code: -1034
message: Invalid Value.
statusCode: 410
headers: {}
security: []
/device/scanners/jobs/{jobuid}/scanner/capabilities:
get:
summary: Retrieve the capabilities of the scanner specified in the scan job.
deprecated: false
description: >
You can get the capabilities of scanner specified in the job, but it is only valid
when the job is pending.
operationId: getCurrentScannerCapabilities
tags:
- Scanner Control
parameters:
- name: jobuid
in: path
description: ''
required: true
example: ''
schema:
type: string
- name: caps
in: query
description: ''
required: false
schema:
type: string
description: >
capability id. multiple values seperated by commas. e.g.
caps=5,2,1. If no pages specified, return all capabilities.
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info/api/Dynamsoft_Enum.html#dynamsoftDWTenumDWT_cap
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: array
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info/api/Interfaces.html#capabilitydetails
properties: {}
items:
type: object
properties: {}
headers: {}
'400':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1034
message: This provided job UID is invalid.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET.
statusCode: 405
headers: {}
'409':
description: Support only when the scan job is pending.
content:
application/json:
schema: *ref_0
example:
code: -1011
message: Operation out of expected sequence.
statusCode: 409
headers: {}
'410':
description: The job was deleted.
content:
application/json:
schema: *ref_0
example:
code: -1034
message: Invalid Value.
statusCode: 410
headers: {}
security: []
/device/scanners/jobs/{jobuid}/scanner/settings:
get:
summary: Retrieve the settings of the scanner specified in the scan job.
deprecated: false
description: >
You can get the scanner settings. It only supports TWAIN scanners, and
it is only valid when the job is pending. We will call EnableSourceUI to get
the settings.
operationId: getCurrentScannerSettings
tags:
- Scanner Control
parameters:
- name: jobuid
in: path
description: ''
required: true
example: ''
schema:
type: string
- name: showui
in: query
description: ''
required: false
schema:
type: boolean
default: true
description: >
If true, will show the UI for the user to set the scanner settings. If
false, will not show the UI.
responses:
'200':
description: Successful operation
content:
application/json:
schema:
type: object
properties:
settings:
type: string
description: base64 encoded
example:
settings: >-
Rfj6pIMTNkCu3BfDloGItBAAAAACEAAABgAFAAEAAAAQAAAAExAAAAYABQAAAAAAEAAAAAcQAAAGAAUAAQAAABAAAAArEQAABAAFABgAAAAQAAAAHBEAAAQABQAAAAAAEAAAAAABAAAEAAUAAAAAABwAAAAUEQAACAAFAPgqAAAAAAAANCEAAAAAAAAQAAAADBEAAAQABQACAAAAEAAAAB8RAAAEAAUAAAAAABAAAAABAQAABAAFAAIAAAAQAAAAIBEAAAQABQAAAAAAEAAAACIRAAAEAAUAAwAAABAAAAAQEQAABAAFAAAAAAAQAAAAAgEAAAQABQAAAAAAEAAAABgRAAAHAAUAAABIQxAAAAAZEQAABwAFAAAASEMQAAAAIxEAAAcABQAAAABDEAAAAAMRAAAHAAUAAAAAABAAAAABEQAABwAFAAAAAAAQAAAACBEAAAcABQAAAIA/EAAAAAGAAAAGAAUAAAAAAA==
headers: {}
'400':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1034
message: This provided job UID is invalid.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET.
statusCode: 405
headers: {}
'409':
description: The job is not in pending.
content:
application/json:
schema: *ref_0
example:
code: -1011
message: Operation out of expected sequence.
statusCode: 409
headers: {}
'410':
description: The job was deleted.
content:
application/json:
schema: *ref_0
example:
code: -1034
message: Invalid Value.
statusCode: 410
headers: {}
security: []
/device/scanners/jobs/{jobuid}/next-page-info:
get:
summary: Get the next page information for a specific job.
deprecated: false
description: >
Get the next scanned page info. If the scanned page is not ready, it will not
return until the page is ready. If the response code is 200, we can try to get
the next until the reponse code is 204.
operationId: getNextScannedPageInfo
tags:
- Scanner Control
parameters:
- name: jobuid
in: path
description: ''
required: true
example: ''
schema:
type: string
responses:
'200':
description: >-
Successful operation. We will also return the image url; if scan to
a document, also return document uid and page uid.
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ScanDocumentInfo'
headers: {}
'204':
description: No more pages. scan done.
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1034
message: This provided job UID is invalid.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET.
statusCode: 405
headers: {}
'410':
description: The job was deleted.
content:
application/json:
schema:
type: object
properties: {}
example:
code: -1034
message: Invalid Value.
statusCode: 410
headers: {}
security: []
/device/scanners/jobs/{jobuid}/next-page:
get:
summary: Get the next page for a specific job.
deprecated: false
description: >
Get the next scanned page content. If the scanned page is not ready, it will not
return until the page is ready. If the response code is 200, we can try to get
the next until the reponse code is 204.
operationId: getNextScannedPage
tags:
- Scanner Control
parameters:
- name: jobuid
in: path
description: ''
required: true
example: ''
schema:
type: string
- name: type
in: query
description: ''
required: false
schema:
type: string
enum:
- image/jpeg
- image/png
default: image/png
description: mime type
responses:
'200':
description: Successful operation. return image/png or image/jpeg stream.
content:
image/jpeg:
schema:
type: object
properties: {}
example: "ÿØÿà \x10JFIF \x01\x01\x01 ` ` ÿá ZExif MM * \b \x05\x03\x01 \x05 \x01 J\x03\x03 \x01 \x01 Q\x10 \x01 \x01\x01 Q\x11 \x04 \x01 \x0EÃQ\x12 \x04 \x01 \x0Eà \x01†\_ ±\x8FÿÛ C \x02\x01\x01\x02\x01\x01\x02\x02\x02\x02\x02\x02\x02\x02\x03\x05\x03\x03\x03\x03\x03\x06\x04\x04\x03\x05\a\x06\a\a\a\x06\a\a\b\t\v\t\b\b\r\n\b\a\a\r\n\r\n\r\n\v\f\f\f\f\a\t\x0E\x0F\r\n\f\x0E\v\f\f\fÿÛ C\x01\x02\x02\x02\x03\x03\x03\x06\x03\x03\x06\f\b\a\b\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\fÿÀ \x11\b \x01 \x01\x03\x01\" \x02\x11\x01\x03\x11\x01ÿÄ \x1F \x01\x05\x01\x01\x01\x01\x01\x01 \x01\x02\x03\x04\x05\x06\a\b\t\r\n\vÿÄ µ\x10 \x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04 \x01}\x01\x02\x03 \x04\x11\x05\x12!1A\x06\x13Qa\a\"q\x142\x81‘¡\b#B±Á\x15RÑð$3br‚\t\r\n\x16\x17\x18\x19\x1A%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ \x1F\x01 \x03\x01\x01\x01\x01\x01\x01\x01\x01\x01 \x01\x02\x03\x04\x05\x06\a\b\t\r\n\vÿÄ µ\x11 \x02\x01\x02\x04\x04\x03\x04\a\x05\x04\x04 \x01\x02w \x01\x02\x03\x11\x04\x05!1\x06\x12AQ\aaq\x13\"2\x81\b\x14B‘¡±Á\t#3Rð\x15brÑ\r\n\x16$4á%ñ\x17\x18\x19\x1A&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ \f\x03\x01 \x02\x11\x03\x11 ? ýü¢Š(\x03ÿÙ"
headers: {}
'204':
description: No more pages. scan done.
headers: {}
'400':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1034
message: This provided job UID is invalid.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET.
statusCode: 405
headers: {}
'410':
description: The job was deleted.
content:
application/json:
schema: *ref_0
example:
code: -1034
message: Invalid Value.
statusCode: 410
headers: {}
x-200-2:
description: ''
content:
image/png:
schema:
type: object
properties: {}
example: "‰PNG\r\n\x1A\r\n \r\nIHDR \x01 \x01\b\x02 \x90wSÞ \x01sRGB ®Î\x1Cé \x04gAMA ±\x8F\vüa\x05 \tpHYs \x0Eà \x0EÃ\x01Ço¨d \fIDAT\x18Wcøÿÿ? \x05þ\x02þ§5\x81„ IEND®B`‚"
headers: {}
security: []
/storage/documents:
post:
summary: Create a new document.
deprecated: false
description: >-
The document will be stored in the Dynamic Web TWAIN Service working
folder and all the contents will be encrypted.
operationId: createDocument
tags:
- Document Management
parameters: []
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDocumentOptions'
description: password for the document
example: ''
responses:
'201':
description: Successful operation
content:
application/json:
schema: &ref_1
description: document info
$ref: '#/components/schemas/DocumentInfo'
example:
uid: 190807444d76
pages: []
headers: {}
'400':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports POST.
statusCode: 405
headers: {}
security: []
/storage/documents/{documentuid}:
get:
summary: Retrieve document info
deprecated: false
description: Retrieve the document info, including pages info.
operationId: getDocumentInfo
tags:
- Document Management
parameters:
- name: documentuid
in: path
description: UID of document
required: true
example: ''
schema:
type: string
- name: X-DICS-DOC-PASSWORD
in: header
description: the password of document in storage
required: false
example: ''
schema:
type: string
maxLength: 32
description: cannot exceed 32 chars.
responses:
'200':
description: Successful operation
content:
application/json:
schema: *ref_1
example:
uid: 190807444d76
pages:
- uid: 190817548d70
- uid: '190817648270'
headers: {}
'400':
description: Bad request.
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'403':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1043
message: Password invalid.
statusCode: 403
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1040
message: The uid does not exist.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET and DELETE.
statusCode: 405
headers: {}
security: []
delete:
summary: Delete the document.
deprecated: false
description: All the data will be deleted.
operationId: deleteDocument
tags:
- Document Management
parameters:
- name: documentuid
in: path
description: UID of document
required: true
example: ''
schema:
type: string
- name: X-DICS-DOC-PASSWORD
in: header
description: the password of document in storage
required: false
example: ''
schema:
type: string
maxLength: 32
description: cannot exceed 32 chars.
responses:
'204':
description: Successful operation
headers: {}
'400':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'403':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1043
message: Password invalid.
statusCode: 403
headers: {}
'404':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -1040
message: The uid does not exist.
statusCode: 404
headers: {}
'405':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET and DELETE.
statusCode: 405
headers: {}
security: []
/storage/documents/{documentuid}/content:
get:
summary: Retrieve the document content with specified format.
deprecated: false
description: >
Can specify one or more pages with page index or uid, otherwise, the whole
document. Also can specify pdf info, and encryption.
operationId: getDocContent
tags:
- Document Management
parameters:
- name: documentuid
in: path
description: UID of document
required: true
example: ''
schema:
type: string
- name: type
in: query
description: output mime type
required: false
schema:
type: string
enum:
- image/jpeg
- image/png
- image/tiff
- application/pdf
default: application/pdf
description: |
Specified the output format.
- name: quality
in: query
description: ''
required: false
schema:
type: integer
format: int32
minimum: 1
maximum: 100
default: 80
description: >-
range is 0 to 100. only valid for jpeg/jpeg2000
compression.
- name: pages
in: query
description: ''
required: false
schema:
type: string
default: ''
description: >
page indices or uids. multiple values seperated by commas. e.g.
pages=5,2,1. If no pages specified, for image/png, image/jpeg,
only return first page; for image/tiff, application/pdf, return
all pages.
- name: author
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: compression
in: query
description: >-
for tiff, please refer to
https://www.dynamsoft.com/web-twain/docs/info/api/Dynamsoft_Enum.html#dynamsoftDWTenumDWT_tiffcompressiontype
for pdf, please refer to
https://www.dynamsoft.com/web-twain/docs/info/api/Dynamsoft_Enum.html#dynamsoftDWTenumDWT_pdfcompressiontype
required: false
schema:
type: integer
format: int32
default: 0
description: auto, BW use JBIG2, GrayScale & Color use Jpeg
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: pageType
in: query
description: ''
required: false
schema:
type: integer
format: int32
default: 0
description: page size
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: creator
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: creationDate
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: keyWords
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: modifiedDate
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: producer
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: subject
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: title
in: query
description: ''
required: false
schema:
type: string
default: ''
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: version
in: query
description: ''
required: false
schema:
type: string
default: '1.5'
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: password
in: query
description: ''
required: false
schema:
type: string
maxLength: 32
default: ''
description: password to encrypt pdf.
externalDocs:
url: >-
https://www.dynamsoft.com/web-twain/docs/info//api/interfaces.html#pdfwsettings
- name: X-DICS-DOC-PASSWORD
in: header
description: the password of document in storage
required: false
example: ''
schema:
type: string
maxLength: 32
description: cannot exceed 32 chars.
responses:
'200':
description: Successful operation
content:
image/jpeg:
schema:
type: object
properties: {}
example: "ÿØÿà \x10JFIF \x01\x01\x01 ` ` ÿá ZExif MM * \b \x05\x03\x01 \x05 \x01 J\x03\x03 \x01 \x01 Q\x10 \x01 \x01\x01 Q\x11 \x04 \x01 \x0EÃQ\x12 \x04 \x01 \x0Eà \x01† ±\x8FÿÛ C \x02\x01\x01\x02\x01\x01\x02\x02\x02\x02\x02\x02\x02\x02\x03\x05\x03\x03\x03\x03\x03\x06\x04\x04\x03\x05\a\x06\a\a\a\x06\a\a\b\t\v\t\b\b\r\n\b\a\a\r\n\r\n\r\n\v\f\f\f\f\a\t\x0E\x0F\r\n\f\x0E\v\f\f\fÿÛ C\x01\x02\x02\x02\x03\x03\x03\x06\x03\x03\x06\f\b\a\b\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\f\fÿÀ \x11\b \x01 \x01\x03\x01\" \x02\x11\x01\x03\x11\x01ÿÄ \x1F \x01\x05\x01\x01\x01\x01\x01\x01 \x01\x02\x03\x04\x05\x06\a\b\t\r\n\vÿÄ µ\x10 \x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04 \x01}\x01\x02\x03 \x04\x11\x05\x12!1A\x06\x13Qa\a\"q\x142\x81‘¡\b#B±Á\x15RÑð$3br‚\t\r\n\x16\x17\x18\x19\x1A%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ \x1F\x01 \x03\x01\x01\x01\x01\x01\x01\x01\x01\x01 \x01\x02\x03\x04\x05\x06\a\b\t\r\n\vÿÄ µ\x11 \x02\x01\x02\x04\x04\x03\x04\a\x05\x04\x04 \x01\x02w \x01\x02\x03\x11\x04\x05!1\x06\x12AQ\aaq\x13\"2\x81\b\x14B‘¡±Á\t#3Rð\x15brÑ\r\n\x16$4á%ñ\x17\x18\x19\x1A&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ \f\x03\x01 \x02\x11\x03\x11 ? ýü¢Š(\x03ÿÙ"
headers: {}
'400':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'403':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1043
message: Password invalid.
statusCode: 403
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1040
message: The uid does not exist.
statusCode: 404
headers: {}
'405':
description: Method not allowed
content:
application/json:
schema: *ref_0
example:
code: -2112
message: This endpoint only supports GET.
statusCode: 405
headers: {}
x-200-2:
description: Error resonpse
content:
application/pdf:
schema: *ref_0
example: "%PDF-1.5\r\n%¡³Å×\r\n1 0 obj\r\n<</Pages 2 0 R /Type/Catalog>>\r\nendobj\r\n2 0 obj\r\n<</Count 1/Kids[ 4 0 R ]/Type/Pages>>\r\nendobj\r\n3 0 obj\r\n<<>>\r\nendobj\r\n4 0 obj\r\n<</Contents 7 0 R /CropBox[ 0 -0.25 1 0.75]/MediaBox[ 0 0 0.75 0.75]/Parent 2 0 R /Resources<</ExtGState<</FXE1 5 0 R >>/XObject<</FXX1 6 0 R >>>>/Rotate 0/Type/Page>>\r\nendobj\r\n5 0 obj\r\n<</BM/Normal/CA 1/ca 1>>\r\nendobj\r\n6 0 obj\r\n<</BitsPerComponent 8/ColorSpace/DeviceRGB/Filter/DCTDecode/Height 1/Length 631/Subtype/Image/Type/XObject/Width 1>>stream\r\nÿØÿà \x10JFIF \x01\x01\x01 ` ` ÿÛ C \x06\x04\x05\x06\x05\x04\x06\x06\x05\x06\a\a\x06\b\r\n\x10\r\n\r\n\t\t\r\n\x14\x0E\x0F\f\x10\x17\x14\x18\x18\x17\x14\x16\x16\x1A\x1D%\x1F\x1A\e#\x1C\x16\x16 , #&')*)\x19\x1F-0-(0%()(ÿÛ C\x01\a\a\a\r\n\b\r\n\x13\r\n\r\n\x13(\x1A\x16\x1A((((((((((((((((((((((((((((((((((((((((((((((((((ÿÀ \x11\b \x01 \x01\x03\x01\" \x02\x11\x01\x03\x11\x01ÿÄ \x1F \x01\x05\x01\x01\x01\x01\x01\x01 \x01\x02\x03\x04\x05\x06\a\b\t\r\n\vÿÄ µ\x10 \x02\x01\x03\x03\x02\x04\x03\x05\x05\x04\x04 \x01}\x01\x02\x03 \x04\x11\x05\x12!1A\x06\x13Qa\a\"q\x142\x81‘¡\b#B±Á\x15RÑð$3br‚\t\r\n\x16\x17\x18\x19\x1A%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ \x1F\x01 \x03\x01\x01\x01\x01\x01\x01\x01\x01\x01 \x01\x02\x03\x04\x05\x06\a\b\t\r\n\vÿÄ µ\x11 \x02\x01\x02\x04\x04\x03\x04\a\x05\x04\x04 \x01\x02w \x01\x02\x03\x11\x04\x05!1\x06\x12AQ\aaq\x13\"2\x81\b\x14B‘¡±Á\t#3Rð\x15brÑ\r\n\x16$4á%ñ\x17\x18\x19\x1A&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖ×ØÙÚâãäåæçèéêòóôõö÷øùúÿÚ \f\x03\x01 \x02\x11\x03\x11 ? ú¦Š(\_\x0FÿÙ\r\nendstream\r\nendobj\r\n7 0 obj\r\n<</Filter/FlateDecode/Length 39>>stream\r\nxœ+ä2Ð37U0 A\x18#9—\vÌW(JçÒw‹ˆ0TpÉW\bä\x02 ¹þ\bá\r\nendstream\r\nendobj\r\nxref\r\n0 8\r\n0000000000 65535 f\r\n0000000017 00000 n\r\n0000000066 00000 n\r\n0000000122 00000 n\r\n0000000145 00000 n\r\n0000000331 00000 n\r\n0000000374 00000 n\r\n0000001159 00000 n\r\ntrailer\r\n<<\r\n/Root 1 0 R\r\n/Info 3 0 R\r\n/Size 8\r\n/Tag /Dynamsoft\r\n>>\r\nstartxref\r\n1269\r\n%%EOF\r\n"
headers: {}
x-200-3:
description: ''
content:
image/png:
schema:
type: object
properties: {}
example: "‰PNG\r\n\x1A\r\n \r\nIHDR \x01 \x01\b\x02 \x90wSÞ \x01sRGB ®Î\x1Cé \x04gAMA ±\x8F\vüa\x05 \tpHYs \x0Eà \x0EÃ\x01Ço¨d \fIDAT\x18Wcøÿÿ? \x05þ\x02þ§5\x81„ IEND®B`‚"
headers: {}
x-200-4:
description: ''
content:
image/tiff:
schema:
type: object
properties: {}
example: "II* \x0E €?àP\x10 \x0F þ \x04 \x01 \x01\x04 \x01 \x01 \x01\x01\x04 \x01 \x01 \x02\x01\x03 \x03 È \x03\x01\x03 \x01 \x05 \x06\x01\x03 \x01 \x02 \x11\x01\x04 \x01 \b \x15\x01\x03 \x01 \x03 \x16\x01\x04 \x01 \x01 \x17\x01\x04 \x01 \x05 \x1A\x01\x05 \x01 Î \e\x01\x05 \x01 Ö \x1C\x01\x03 \x01 \x01 (\x01\x03 \x01 \x02 =\x01\x03 \x01 \x02 \b \b \b w\x01 è\x03 w\x01 è\x03 "
headers: {}
security: []
/storage/documents/{documentuid}/pages:
post:
summary: Insert new page(s) into an existing document.
deprecated: false
description: >
By default, it will append the pages to the end of document. for multiple tiff, we
will split it into multiple images. And for multiple pdf, we will also
split it into multiple pages and save raw content.
operationId: insertDocPage
tags:
- Document Management
parameters:
- name: documentuid
in: path
description: UID of document
required: true
example: ''
schema:
type: string
- name: X-DICS-DOC-PASSWORD
in: header
description: the password of document in storage
required: false
example: ''
schema:
type: string
maxLength: 32
description: cannot exceed 32 chars.
requestBody:
content:
application/json:
schema:
type: object
required:
- source
properties:
insertPos:
type: number
description: >
Positive integer. The new page will be inserted before this
index. If not set or out of the maximum range, the blank
page will be added after the last page.
source:
oneOf:
- type: string
examples:
- >-
https://127.0.0.1:18623/api/device/scanners/jobs/dd40716d-48d1-4d32-89f7-1d53f9665d91/next-page?page=19522d0c5282
description: >-
Currently only support image url from scan job. eg.
"https://127.0.0.1:18623/api/device/scanners/jobs/dd40716d-48d1-4d32-89f7-1d53f9665d91/next-page?page=19522d0c5282"
example: ''
responses:
'200':
description: Page inserted successfully
content:
application/json:
schema: *ref_1
example:
uid: 190807444d76
pages:
- uid: 190817548d70
- uid: 190818458d85
headers: {}
'400':
description: Error resonpse
content:
application/json:
schema: *ref_0
example:
code: -2113
message: The parameter is not valid.
statusCode: 400
headers: {}
'403':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1043
message: Password invalid.
statusCode: 403
headers: {}
'404':
description: ''
content:
application/json:
schema: *ref_0
example:
code: -1040
message: The uid does not exist.
status