Things you should know about REST API data upload :
REST API is only available to users who:
- have HansaWorld version STDERP_8.1-2015-06-02
- have HansaWorld Webshop licence enabled for setup period
Please note :
- Rest api connection pushes all data that is requested starting form period you want to start import from
- For HansaWorld version 8.3 or below there is a request limit size in flex.bi. If the request limit is exceeded file import will have to be used for that register or the register's period
- Combined import is available only for flex.bi versions 4.0 or newer. With combined import you can import data in one account both from Source files and Rest api
1. Setup HansaWorld for Rest api exports
You need to know the web port of your HansaWorld server (which is not the same as you normal port used for HansaWorld client). Normally it should be specified in Technics>>Program Mode.
As web port can be overridden by server startup scripts, firewall or other configurations we recommend to contact your HansaWorld partner and/or hosting partner to find out the actual port number used
- You need to know the URL or IP address of your HansaWorld server that can be used for web requests from the Internet.
- Add new row in Webshop>>Settings>>Allow functions on web>>WebDataAPI (you can restrict the usage of this by specifying allowed ip addresses)
- (Optional) Now you can test that this functionality is working with by replacing the IP and Port of this link: http://ip:port/WebDataAPI.hal?register=BaseCurBlock and entering it in your browser.
- As a result you should get a short JSON formatted result with your base currencies from first company which means connection is working and flex.bi will care of the rest
We suggest that you discuss security measures with your HansaWorld or hosting partner to ensure that data access is secured only for flex.bi
2. Setup up Rest api connection in Flex.bi
1. Add new Source Application
You can setup application in Source Data > Source Applications tab by selecting "Add new Source Application" button.
2. Select HansaWorld application
To set up Rest api connection first click on the "Add new source application" button in your Source Data -> Source Applications tab. Select "HANSAWORLD" as your source application.
3. Enter URL
In the source data URL enter the URL to your HansaWorld server. The URL should look similar to this: http://sample.url.com:1234/WebDataAPI.hal
The URL consists of the following elements
|Public Hostname||Port (HTTP)|
.hal file name
When you have entered your Source data URL, you have to agree to Terms and Conditions then press continue.
4. Select your data
In the "Company" drop-down menu you can select with company data you wish to import. If you are using Flex.bi plan BUSINESS, you can enable Finance Consolidation to import finance data for several companies.
In the "Start import from" you have to enter the date in the following format (yyyy-mm-dd). The date describes the point in time from which the data will be imported, that is to say if you enter 2016-01-01 then all data that has been created from 2016-01-01 and onward will be imported, data created before 2016-01-01 will not be imported.If you do not enter a date, data from 365 days ago will be imported by default.
The "Future days" field allows you to specify how many days into the future you want REST API to take data from.
The "Refresh period" field allows you to specify from how many days into the past you want your already imported data to be refreshed (Required when an old data entry has changed).
The "Regular import frequency" allows you to specify how often you want your data to be refreshed.
If you want to also analyse your data by Objects or classification follow the steps in this documentation page about Extra dimensions.
Once you are done with selecting everything you wish to import press the "Import" button and the import will begin. Importing with REST API does not upload any source files into the "Source files" section of flex.bi.
If you want to import Extra dimensions (Object types, Customer classes, Item classes, Location classes, Item Varieties), click on section Extra Dimensions and select, which Extra Dimensions you need.
If your file is not recognized as a HansaWorld file then:
Make sure the file contains any data at all.
Try to re-export the data from HansaWorld again and allow some time for the new file to be populated with data, because exporting big files (several megabytes) can cause the files to appear as empty while they are being populated by data
8. Import application
Go back to Source Application tab and press Import.