[Download] | [Documentation Home] | [Release Note]
Introduction
WSO2 Data Services Server provides the capability of exposing data from Google spread sheets. You can use either private or public google spread sheets as the data source.
Sample Google Spread Sheet
Following is a sample spread sheet which is hosted in https://spreadsheets.google.com/ccc?key=0Av5bU8aVtFjPdElrUVN3VmZlRkoyM1ZzVlE1MzdtbXc&hl=en
Figure 1: Sample google spread sheet
Step 1: Start by giving a name
Lets begin to create the data service by clicking on "Create" link in left menu under Services/Add/Data Service. We will name the data service as "GoogleSpreadSheet" and click on "Next" to enter the details for the data source.
Figure 2: Create data google spread sheet data service
Step 2: Enter details about your Google Spread Sheet
After giving a data source id select the data source type as Google Spread Sheet and enter the url for the sheet. If the spread sheet is Private you have to enter the user name and the password for the sheet. Click on "Save" once you done with entering the details.
Figure 3: Configure data service
Step 3: Enter google spread sheet and query details using which values will be extracted.
Click on "Add New Query" to enter a new query. Lets name the query as "getCustomers" and select the data source which we created in the previous step. Enter the worksheet details and configure how the response look like.
Figure 4: Add querry
Step 4: Configure how the response should look like.
Lets create customer Number as element and customer name and city as attributes. Click on "Mian Configuration" once you enter the output mappings and "Save" the query details.
Figure 5: Response configuration
Once you add a query, it will be listed as follows.
Figure 6: View querry
Step 6: Create an operation
Add a new operation and select the created query. Save the created operation.
Figure 6: Add operation
Existing operations will be listed as follows. Click on "Finish".
Figure 7: View operations
Step 8: Service deployed
You can find the deployed service under Deployed services list.
Figure 8: Deployed services
Step 9: Try your service
Simplest way to invoke and check your created service is using "Try It" option provided in the service list. Click on "Try It" link and invoke the service by clicking on the "getCustomers" button.
Figure 9: Invoke service using Try-it