How to Create and Update Outputs using the StrategyBlocks Web Services API
If you are already familiar with Web Services, then you can download a copy of the StrategyBlocks WSDL file and get straight into creating Outputs in StrategyBlocks, you can find the WSDL file here.
The StrategyBlocks Web Service currently supports 2 operations, they are:
Create/update a single Output.
Create/update a list of Outputs.
In the tutorial below, you will learn how to create a list of Outputs in an ETL tool called Talend using the StrategyBlocks Web Services API. We are using Talend because it is a free tool that everyone could use, you can use any ETL you prefer to create Outputs into StrategyBlocks, as long as it supports UsernameToken authentication.
Create/update a list of Outputs using Talend
Drag then drop a tEsbConsumer component from the Palette into the Job Designer
Double-click on the tEsbConsumer component
In the WSDL field of pop-up set the value to “https://app.strategyblocks.com/web-services/strategyblocks.wsdl”
Select updateKpis in the list of operations
Check the Populate schema to repository on Finish check-box option
Click on Ok
Go to the Component tab
Double-click on the tEsbConsumer component
Check the Use Authentication check-box option
Select the Username Token in the drop-down list and fill in your login credential fields
If you don’t have a StrategyBlocks login, then you can use the following credentials
Username: wsdl.user@strategyblocks.com
Password: secret
Download the xml file containing a list of test Outputs at http://docs.strategyblocks.com/lib/exe/fetch.php/userguide/user/kpis.zip
Find File XML in the Repository Tab
Right-click on it and select Create File XML in the menu
Give it a name and click Next
Select the Input XML option and click Next
Locate the xml file containing the test Outputs and click Next
Drag and drop the kpi node from the Source Schema into the Xpath loop expression field
Drag and drop all the fields of the kpi node from the Source Schema into the Fields to extract
Click on the Refresh Preview button to preview the content of the xml file
Click Finish to create the metadata