Doc Content APIs


Document Content APIs

These apis are used to get content of a particular document, spreadsheet or a presentation associated with a Zoho account. It also includes shared and public documents.

Request URI:

Developers can send the request in the following URI format :

Zoho Writer (Documents) :
https://writer.zoho.com/api/<access>/<format>/content/[documentid]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI
Zoho Sheet (Spreadsheets) :
https://sheet.zoho.com/api/<access>/<format>/content/[bookid]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI
Zoho Show (Presentations) :
https://show.zoho.com/api/<access>/<format>/content/[presentationid]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI
Access : private or public

Format : xml, json

HTTPs Method : GET

Request Parameters Reference

Parameter Value
Description
version
scalar
Optional. Get content of the document for a particular version. If no version is mentioned the last updated version content is displayed

Document Content Methods :

Method Name URI Request
Description
Content of an "owned" document
Writer: https://writer.zoho.com/api/private/xml/content/[documentid]?apikey=[APIKey]&authtoken=[AuthToken]&scope=DataAPI

Sheet: https://sheet.zoho.com/api/private/xml/content/[bookid]?apikey=[APIKey]&authtoken=[AuthToken]&scope=DataAPI

Show: https://show.zoho.com/api/private/xml/content/[presentationid]?apikey=[APIKey]&authtoken=[AuthToken]&scope=DataAPI
Get entire content of a particular document, spreadsheets or a presentation associated with a user's Zoho Account.
Content of a "shared" document
Writer: https://writer.zoho.com/api/private/xml/content/[shareddocumentid]?apikey=[APIKey]&authtoken=[AuthToken]&scope=DataAPI 

Show: https://show.zoho.com/api/private/xml/sharedcontent/[presentationId]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI&sharedby=[usr] 
Get entire content of a shared document, spreadsheet or a presentation associated with a user's Zoho Account.

Note : For Zoho Show, it is mandatory to pass "sharedby" parameter.
Content of a "public" document Writer: https://writer.zoho.com/api/public/xml/content/[publicdocumentid]?apikey=[APIKey]

Sheet:
https://sheet.zoho.com/api/public/xml/content/[bookid]?apikey=[APIKey]

Show:
https://show.zoho.com/api/public/xml/content/[presentationid]?apikey=[APIKey]
Get entire content of a public document, spreadsheet or a presentation.



Response Parameters Reference

Documents :

Parameter Value
Description
content

Displays the content of a document in HTML format.

Spreadsheets :

Parameter Value
Description
sheetContent

Gets the entire content of a workbook. Multiple sheets are identified with their index parameter. Other parameters include name, rows and cols.
row
string
Identifies a particular row with the index number and subsequent cell values in that row.
cell
string
Gets content of each cell specific to each cell index. Other parameters may include dataType, value, formula etc.

Presentation :

Parameter Value
Description
presentationId
integer
Unique ID associated with each presentation.
presentationName
string
Name of the presentation whose content is being listed.
presentationNameUrl string
UrlName associated with the particular presentation
ownerName string
Displays the Email ID/Zoho ID of the presentation owner, i.e., the account from which the presentation is created.
createdTime
string
Displays the created date of the presentation
lastModifiedBy
string
Specifies the name of the user who has last edited the presentation.
lastModifiedTimeDisplayString string
Displays the last modified time of the presentation as string. E.g. - 15 seconds ago
lastModifiedTime Long Value
Displays the last modified time of the presentation as long integer.
slideTransitionTime integer
The time interval in seconds between two slides in a presentation
isPublic
boolean
Specifies the access privileges of the presentation. If "true" then presentation is available to public
lockedBy
boolean
Name of the user who has exclusively locked the shared presentation for editing.
presentationURL
string
Allows to view your presentation as a slide show.

Sample Response :

The following is a response (both in XML & JSON) for getting the content of a presentation from a Zoho account.

XML
<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/content/3000000005001">
<result>
<presentation>
<presentationId>3000000005001</presentationId>
<presentationName>ajax</presentationName>
<presentationNameUrl>ajax</presentationNameUrl>
<ownerName>Gary</ownerName>
<createdTime>Tue 03/27/07</createdTime>
<isPublic>false</isPublic>
<lastModifiedBy>Gary</lastModifiedBy>
<lastModifiedTimeDisplayString>15 hours ago</lastModifiedTimeDisplayString>
<lastModifiedTime>1787560980018</lastModifiedTime>
<slideTransitionTime>0</slideTransitionTime>
<lockedBy>none</lockeBy>
<presentationUrl>https://show.zoho.com/View.do?P_ID=[presentationId]&
authtoken=[AuthToken]&scope=DataAPI&THEME=blue_waves
</presentationUrl>
</presentation>
</result>
</response>
JSON
{
"response":
{
"uri": "/api/private/json/content/3000000005001",
"result":
{
"presentation":
[
{
"presentationId":"3000000005001",
"presentationName":"ajax",
"presentationNameUrl":"ajax",
"ownerName":"Gary",
"createdTime":"Tue 03/27/07",
"isPublic":"false",
"lastModifiedBy":"Gary",
"lastModifiedTimeDisplayString":"15 hours ago",
"lastModifiedTime":"1787560980018",
"slideTransitionTime":"0",
"lockedBy":"none",
"presentationUrl": "https://show.zoho.com/View.do?
P_ID=[presentationId]&authtoken=[AuthToken]&scope=DataAPI&THEME=blue_waves"
}
]
}
}
}
Specific Content APIs for Zoho Sheet

There are certain sheet-related APIs that allow users to get the content of a particular sheet of a workbook as well as get data of a specific cell range. Details are below :

Get Content Methods

URI Request
Description
 Sheet: https://sheet.zoho.com/api/private/xml/content/[bookid]/[sheetindex]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI
Get content of a specific sheet in a workbook by its sheet index.
Sheet: https://sheet.zoho.com/api/private/xml/content/[bookid]/sheet-name:[name]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI 
Get content of a specific sheet in a workbook by its sheet name. 
Sheet: https://sheet.zoho.com/api/private/xml/content/[bookid]/[sheetindex]/[range]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI 
Get content of a range of specific sheet in a workbook by its sheet index.
 
Sheet: https://sheet.zoho.com/api/private/xml/content/[bookid]/sheet-name:[name]/[range]?apikey=[API Key]&authtoken=[AuthToken]&scope=DataAPI Get content of a range of specific sheet in a workbook by its sheet name.

Similarly, to get content of specific sheets of a public workbook in Zoho Sheet, just replace the access value from "private" to "public" in the request URI.


Response Parameter Reference :

Parameter Value
Description
sheetContent

Gets the content of a sheet by its name or index. Other parameters include name, rows and cols.
range

Gets the content of a particular range with the specified sheet name or index . [range] can be A1:C10(a cell range) , A1(a cell), A(an entire column), 1(an entire row), A:C(columns A through C), 2:5(rows 2 to 5).
row
string
Identifies a particular row with the index number and subsequent cell values in that row.
cell
string
Gets content of each cell specific to each cell index. Other parameters may include dataType, value, formula etc.

Sample Response :

The following is a response (both in XML & JSON) for getting the
content of a range of specific sheet by its sheet index.

XML
<?xml version="1.0" encoding="UTF-8" ?>
<response uri="/api/private/xml/content/15265000000006057/2/6:9">
<result>

<range rows="4" cols="5">
<row index="1">
<cell index="2" dataType="string">Color Converter - RGB to Hex</cell>
</row>
<row index="3">
<cell index="3" dataType="string">Number</cell>
<cell index="4" dataType="string">Float</cell>
<cell index="5" dataType="string">Hexadecimal</cell>
</row>
<row index="4">
<cell index="2" dataType="string">Red</cell>
<cell index="3" dataType="float" value="235">235</cell>
<cell index="4" formula="=C9/255" dataType="float" value="0.92156862">0.92</cell>
<cell index="5" formula="=DEC2HEX(C9)" dataType="string">EB</cell>
</row>
</range>

</result>
</response>
JSON
{
"response":
{
"uri": "/api/private/json/content/15265000000006057/2/6:9",
"result":
{
"range":
[
{
"rows":"4",
"cols":"5",

"row":

[
{"index":"1",
"cell":
[{"index":"2","dataType":"string","_content":"Color Converter - RGB to Hex"}]
},

{"index":"3",
"cell":
[
{"index":"3","dataType":"string","_content":"Number"},
{"index":"4","dataType":"string","_content":"Float"},
{"index":"5","dataType":"string","_content":"Hexadecimal"}
]
},

{"index":"4",
"cell":
[
{"index":"2","dataType":"string","_content":"Red"},
{"index":"3","dataType":"float",value="235", "_content":"235"},
{"index":"4","formula":"=C9/255","dataType":"float",value="0.92", "_content":"0.92"},
{"index":"5","formula":"=DEC2HEX(C9)","dataType":"string", "_content":"EB"}
]
}
]
}
]
}
}
}




    Post a comment

    Your Name or E-mail ID (mandatory)

    Note: Your comment will be published after approval of the owner.




     RSS of this page