Built-in function
SVF Cloud Web API calls can use built-in functions. Built-in functions are provided in the following formats to provide the same functionality as the SVF Cloud Web API.
$fn.svf.{API type}.{API name}()
The common rules for interfaces are as follows:
Function type | Asynchronous function (returns Promise) |
---|---|
Argument | Object |
Return value | Object or None |
Exception occurence | HTTP response codes and error contents can be obtained from the error object. |
$fn.svf.oauth2.token()
Authentication - Retrieve access tokens
パラメータ
name | type | require | description |
---|---|---|---|
sub | string | 〇 | User ID |
exp | number | 〇 | Expiration time |
userName | string | 〇 | User name |
timeZone | string | Time Zone | |
lang | string | Locale |
Tips
Return value
name | type | description |
---|---|---|
token | string | Access token |
expiration | number | Expiration |
Tips
Sample
[Action]
[Return value]
$fn.svf.oauth2.revoke()
Authentication - Discard access tokens
Parameter
name | type | require | description |
---|---|---|---|
token | string | 〇 | access token |
Return value
None
Sample
[Action]
$fn.svf.artifacts.print()
“Print” - Execute a print job Execute a print job
Parameter
name | type | require | description |
---|---|---|---|
token | string | 〇 | access token |
name | string | deliverable name | |
printer | string | 〇 | |
source | string | 〇 | data type |
defaultForm | string | form file path | |
data | object | 〇 | CSV data |
timeout | number | timeout time (seconds) | |
resource | object[] | resource data | |
password | string | password | |
pdfPermPass | string | authorization password | |
pdfPermPrint | string | PDF printing permission | |
pdfPermModify | string | PDF change permission | |
pdfPermCopy | boolean | PDF copy permission | |
redirect | boolean | redirect action | |
useEudc | boolean | use of EUDC | |
adjust | string | repositioning | |
defaultSvfEncode | string | default SVF encoding |
Tips
Tips
Parameter Supplemental Explanation
[data]
Type | object | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Properties |
|
||||||||||||||||
Supplementary explanation | - Either csvString/csvFileis required (csvString takes precedence if both are specified) - If multibyte characters are used for name, UTF-8 encoding is required. |
||||||||||||||||
Code Example |
data: {
|
[Resource]
Type | object[] | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Properties |
|
||||||||||||
Supplementary explanation | - Multiple resources can be specified - Limitations of "resource" parameter - Maximum file size of one image is 5 MB. - The total file size of images specified in the "resource" property is limited to 10 MB. |
||||||||||||
Code Example |
resource: [
|
Return value
name | type | description |
---|---|---|
artifactId | string | deliverable ID |
actionId | string | action ID |
ticket | string | one-time ticket |
Tips
Sample
[Action]
[Return value]
$fn.svf.artifacts.info()
“Print” - Retrieve artifact information
Parameter
name | type | require | description |
---|---|---|---|
token | string | 〇 | access token |
artifactId | string | 〇 | deliverable ID |
Tips
Return value
Returns in JavaScript object format according to “Retrieve artifact information – Response”.
Tips
Sample
[Action]
$fn.svf.artifacts.download()
“Print” - Download artifacts
Parameter
name | type | require | description |
---|---|---|---|
token | string | 〇 | access token |
artifactId | string | 〇 | deliverable ID |
actionId | string | 〇 | action ID |
ticket | string | 〇 | one-time ticket |
file | string | 〇 | output file |
timeout | number | timeout time (seconds) |
Tips
Return value
None
Sample
[Action]
$fn.svf.actions.status()
“Print status” - Retrieve the print status
Parameter
name | type | require | description |
---|---|---|---|
token | string | 〇 | access token |
actionId | string | 〇 | action id |
Tips
Return value
Return in JavaScript object format according to retrieve the print status – response
Tips
Sample
[Action]