Custom API Files
This API is used for file management. It allows you to save a file to a disk, to make a file stored in the device available to be used by an application, and to select a file to be encoded in base64 or hexadecimal format and save the result in a register configured for this purpose.
Note
The integration described in this article may not be implemented in your environment or enabled for all your clients. Contact your admin for assistance.
Technical Details
API ID | 561 |
API Code | Custom (FILES) |
Call API version | 3 |
App Version | lib_files |
Objective | File management |
Classification | File management |
Available for | iOS, Android |
Use the Custom API Files Integration in Studio
The following functions are available for use in your legacy processes, and you can also use them as blocks in Lambda processes. Click each function to see more details.
Save a file to a disk, taking as input the URL where the file can be found, or the string in hexadecimal or base64 format of the file. | |
Make a file saved in the device available to be used by an application that the Operating System considers appropriate. | |
Select a file to be encoded and saved in a register configured for this purpose. |
Save File Data to Disk
This function is used to save a file to a disk, taking as input the URL where the file can be found, or the string in hexadecimal or base64 format of the file.
Parameter Configuration
This function requires you to complete the input register values with the buffer format type, the name of the file to be created, and the information of the file to be saved.
Function ID
Register | Value |
---|---|
110 | 1 |
Input Registers
Register | Description | Mandatory | Value |
---|---|---|---|
390 | Buffer format type | X | HEX_TYPE, BASE64_TYPE, URL_TYPE |
391 | Name of the file to be created | X | STRING |
392 | Information of the file to be saved to the disk | X | STRING |
Output Registers
Register | Description | Value | ||||||
---|---|---|---|---|---|---|---|---|
112 | Call Result |
| ||||||
290 | File name | STRING | ||||||
291 | File extension | STRING | ||||||
292 | File location | STRING |
Open Stored File
This function is used to make a file saved in the device available to be used by an application that the Operating System considers appropriate.
Parameter Configuration
This function requires you to complete the input register value with the path to the file's location in the device.
Function ID
Register | Value |
---|---|
110 | 2 |
Input Registers
Register | Description | Mandatory | Value |
---|---|---|---|
300 | Path to the file's location in the device (For example: /root/sdcard/Pictures). | X | STRING |
Output Registers
Register | Description | Value | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
112 | Call Result |
|
Save File Data to Register
This function is used to select a file with the file selector of the device's OS to be encoded in base64 or hexadecimal format and saved in a register previously configured for this purpose.
Parameter Configuration
This function doesn't require the configuration of any parameters.
Function ID
Register | Value |
---|---|
110 | 3 |
Input Registers
Register | Description | Mandatory | Value |
---|---|---|---|
390 | Codification Type. Type of encoding to be used with the file. | X | HEX_TYPE, BASE64_TYPE |
391 | Register Target. Number of the record where the file's encoded data will be stored. | X | Record number. Records 800,000 to 819,999 are excluded as they are used for other purposes. |
392 | File picker timeout. Numeric value that represents the seconds that the file selector will be active. After that time passes, the selector closes automatically and returns to the application showing an error code. The default value is 30 seconds. | N/A | INT |
Output Registers
Register | Description | Value | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
112 | Call Result |
|