Create a Web Service Data Source
You can easily create a web service data source in Sigma Studio with viable and feasible configurations. Web Service data source serves as the vital cog in facilitating the process of fetching the data from the web service.
A brief overview on creating a web service data source in Sigma Studio is provided as follows:
- In Sigma Studio, click the Data Source icon on the existing web service connection.Â
- In the Create Data Source screen, provide a unique name in the Data Source Name field.Â
- Enter the relative part of the web service URL in the Relative part of the URL field.Â
- Click the Communication App ID drop-down list and select the REST GET JSON Gateway option.Â
- Click the Upload JSON option to upload the appropriate JSON file. On uploading the JSON file, the Value Select Expression, View Column ID and Data Type fields get filled automatically.Â
- Specify the appropriate hierarchical path to the element that contains the JSON array of data from the web service response in the Column Root field, e.g. $.
- Click Save to save the newly created web service data source.Â
The step-by-step procedure to create a web service data source in Sigma Studio is listed as follows:
- On the home page of Sigma Studio, click Connections on the left pane.
The connections created will be available in the Connections list on the right pane. - Click the Data Source icon on the web service connection.
The Create New Data Source screen appears. - In the Create New Data Source screen, configure the property fields in the Web Service Maintenance tab as follows:
- Connection Name: This is a non-editable field and displays the unique name provided by you for the connection. For example, WEB SERVICE CONNECTION.
- Data Source Name: Provide a unique data source name. For example, NEW WEB SERVICE DS.
Relative part of the URL: Provide the relative URL. For example,
accountservice/user/account/details?usrId=201206000013
In the case of http://localhost:9090/accountservice/user/account/details?usrId=201206000013 URL, http://localhost:9072/ is the base URL (domain name) and accountservice/user/account/details?usrId=201206000013 serves as the relative part of the URL. Here, accountservice is the Web service, which based on the parameters specified returns the account details as shown in the following screen shot:- Communication App ID: The Rest GET JSON Gateway option is auto-populated by default in the Communication App ID field. For more information on this field, refer Field Descriptions.
- Forms: If required, you can select a form from the Forms lookup field for configuring the objects as the JSON Configuration for the web service.
- In the Response Data Mapping panel, perform the following steps:
- Click the Upload JSON option and select the respective JSON file be uploaded, e.g. Web_Service_JSON.json.Â
- Provide inputs in the fields as follows:
- Column Root: Provide the hierarchical path to the element that contains the JSON array of data from the Web service response. For example, $ will be the root element for the accountservice Web service.
- Value Select Expression: For the accountservice Web service, the value select expressions are CURRENCY, ACCOUNT_TYPE, ACCOUNT_ID, IFSC_CODE, ADDRESS and USER_ID. When the JSON file gets uploaded, the value select expressions appear automatically.
View Column Id: Provide the column name for each of the value select expressions of the web service that you want to display in the app. For example, country, name, etc. can be the column names for the value select expressions.
- Same column name must be provided in the Column ID field in App Designer screen.
- If the View Column Id is changed for any Value Select Expression in the data source screen later, those columns must be re-mapped in the App Designer screen to reflect the changes.
Data Type: Select the data type from the drop-down list.Â
- In case, if you want to add more columns, click to add more columns.
Click Save.
When you try to exit the Datasource screen, before saving the configured web service data source, a warning pop-up message appears, as shown in the following screen shot:
- Click Cancel, if you do not want to exit the Datasource screen.
- Click Ok, if you want to exit the Datasource screen.
A confirmation message, indicating a successful save, appears.
Click Ok.