 |
Toll Free : 888 900 9646 | |
 |
Home >> Getting Started
This section explains how Zoho Sheet APIs can be used to build a simple application, so that one can get started with the API usage.
Say you want to create a simple application/widget which gets Zoho Sheet account details from the user and lists all the workbooks created by that user. Further, you want to provide an option to download those workbooks( as xls files )
Step 1
After getting the login credentials ( Zoho Id and Password ) from the user, get a valid ticket from Zoho Sheet,for starting a new API session on behalf of that user as explained here
Step 2
As we need to list all the workbooks created by that user, the API method zohoSheet.userView.getWorkbooks should be invoked.
Here is a sample request
http://sheet.zoho.com/api/xml?apikey=<API Key>&ticket=<Ticket Id>
<methodCall>
<methodName>zohosheet.userView.getWorkbooks</methodName>
<params></params>
</methodCall>
The response xml should be parsed to get the list of workbooks.
After getting the list of workbooks, the workbook details can be rendered in the UI. We will be getting two special properties for each workbook - workbookId and updateLock - which should be used subsequently to manipulate the workbook through API methods.
Step 3
Now, if the user initiates the event for downloading a workbook, the following REST URL can be used to download the workbook from the Zoho Sheet account
http://sheet.zoho.com/open.do?docid=<workbookId>&ticket=<ticket>&export=xls
Here,
- 'workbookId' is obtained from Step 2
- 'ticket' is obtained from Step 1
More details about the above REST request can be found here