POJO
POJO
of Contents
Overview 3
Authentication 3
1.Initial setup 3
2.Generate Grant Token 8
3.Get Access and Refresh token 8
4.Regenarate Access token 9
Team 10
1.Fetch all teams of the user 10
2.Get Team Info 10
3.Get Current User of Team 10
Team Folder 10
1.Fetch Team Folders from Team 10
2.Create Team Folder 10
3.Rename Team Folder 11
4.Delete Team Folder 12
5.Add Members to Team Folder 12
6.Update Member Role in Team Folder 12
7.Delete Memeber from Team Folder 13
8.Get Users of Team Folder 13
My Folder APIs 13
1.Get My FolderId of Team 13
2.Get files & folders from My Folder 14
Files & Folders 14
1.Create Folder 14
2.Rename Folder 15
3.Copy Folder 15
4.Delete Folder 16
5.Create File 16
6.Upload File 16
7.Download File 17
8.Rename File 18
9.Copy File 18
10.Move File 19
11.Delete File 21
12.Get list of files and folders 21
13.Get file/folder Info 21
14.Share File/Folder 22
15.Get Shared users of File/Folder 23
16.Update Share 23
17.Remove Share 23
18.Trash folder/file 24
19.Search File 24
External Sharing 25
1.Create Share Link 25
2.Update Shared Link 27
3.Remove Shared Link 27
4.Get List of Shared Links 28
Organization 28
1.Fetch all organization of the user 28
2.Get Organization Info 28
3.Get Current User of Organization 28
Data Templates and Custom Fields 28
1.Create Data Template 28
2.Update Data Template 29
3.Delete Data Template 30
4.Create Custom Field 30
5.Update Custom Field 32
6.Delete Custom Field 33
7.Create Custom meta data (Associate API) 33
8.Update Custom meta data 35
9.Delete Custom meta data 36
10.Get List of Data Templates of team 36
11.Get List of Custom Fields of Data Template 36
12.Get List of Data Templates Associated with File/Folder 36
13.Data Templates and Custom Fields search 36
Overview
Zoho WorkDrive's API is REST based and it uses the Oauth 2.0 protocol for
authentication. This document helps you to fetch and modify data in WorkDrive with our API.
It uses HTTP response codes to indicate API errors. These APIs facilitate integration with
other Zoho applications and third-party tools with ease. The responses are JSON based.
Important Notes :
Non-US customers, use your respective product URLs. e.g., For EU -
accounts.zoho.eu
In this document, <id> refers to the model-id of the each model. e.g., permissions/<id>
is refers to the id attribute of permissions model.
Always refer to the relationships data and its links to call the consecutive APIs.
Json APIs should call with "Accept" header as "application/vnd.api+json" .
Oauthtoken should be passed as header named "Authorization" value as
"Zoho-oauthtoken <generatedtoken in Authentication>"
e.g., "Zoho-oauthtoken 1****.f**************************a.6****************************3'"
Please prepend the below domain while calling api,
US - https://workdrive.zoho.com
EU - https://workdrive.zoho.eu
CN - https://workdrive.zoho.com.cn
IN - https://workdrive.zoho.in
Authentication
1.Initial setup
Before you get started, you'll have to register with us and set the application up.
Note:
Client ID: A unique identifier you receive when you register your application with Zoho.
Client Secret: A unique key generated when you register your application with Zoho.
This must be kept confidential.
Authorized redirect URI: The URI endpoint to which Zoho Accounts has to redirect the
user-agent with the access token after authorizing the client.
2.Go to https://accounts.zoho.com/developerconsole
4.Enter your application's name, domain, authorized redirect URIs, and click Create .
5.You will receive the Client ID and Client Secret like the following:
6.You will have to construct a URL to generate a grant token. Click here to learn about
the parameters required to construct the URL.
10.Get an access token and a refresh token by exchanging the code along with the
client's ID and secret.
2.Generate Grant Token
Method : POST
API : https://accounts.zoho.com/oauth/v2/auth
Query parameters:
PARAMETERS DESCRIPTION
scope The specific module in the product for which the access has to be
(mandatory) granted.
client_id The client ID received during registration. It is used to identify the
(mandatory) application that raises the request.
state A string used by the client to ensure authenticity between the
request and callback. It is a recommended parameter that’s used
to prevent cross-site request forgery.
response_type code
(mandatory)
redirect_uri The Redirect URI provided during registration.
(mandatory)
access_type Set value as offline
For state param - is optional , An opaque string that is round-tripped in the protocol; ie., whatever
value given to this will be passed back to you. e.g., testing
e.g., "WorkDrive.workspace.READ,WorkDrive.files.CREATE" else if you require all the defined
scopes use "WorkDrive.team.ALL,WorkDrive.workspace.ALL,WorkDrive.files.ALL".
3.Get Access and Refresh token
Method:POST
API: https://accounts.zoho.com/oauth/v2/token
Query parameters:
PARAMETERS DESCRIPTION
code The code that you are exchanging for an access token.
(mandatory)
client_id The Client ID received during registration. It is used to identify
(mandatory) the application that raises the request.
client_secret The Client Secret received during registration.
(mandatory)
redirect_uri The Redirect URI provided during registration.
(mandatory)
grant_type authorization_code
(mandatory)
4.Regenarate Access token
Method:POST
API: https://accounts.zoho.com/oauth/v2/token
Query parameters:
PARAMETERS DESCRIPTION
refresh_token The refresh token obtained in this step.
(mandatory)
client_id The Client ID received during registration. It is used to identify
(mandatory) the application that raises the request.
client_secret The Client Secret received during registration.
(mandatory)
redirect_uri The Redirect URI provided during registration.
(mandatory)
grant_type refresh_token
(mandatory)
Team
1.Fetch all teams of the user
Method : GET
API : api/v1/users/<zuid>/teams
Scope : WorkDrive.team.READ
sample response
2.Get Team Info
Method : GET
API : /api/v1/teams/<id>
Scope : WorkDrive.team.READ
sample response
3.Get Current User of Team
Method : GET
API : /api/v1/teams/<id>/currentuser
Scope : WorkDrive.team.READ
Team Folder
1.Fetch Team Folders from Team
Method : GET
API : /api/v1/teams/<id>/workspaces
Scope : WorkDrive.workspace.READ
sample response
2.Create Team Folder
Method : POST
API :/api/v1/workspaces
Scope : WorkDrive.workspace.CREATE
Attributes :
{
"data": {
"attributes": {
"name": "New Team Folder",
"parent_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"is_public_within_team": "false",
"description": "add description"
},
"type": "workspaces"
}
}
3.Rename Team Folder
Method : PATCH
API :/api/v1/workspaces/<id>
Scope : WorkDrive.workspace.UPDATE
Attributes :
{
"data": {
"attributes": {
"name": "Rename Workspace"
},
"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "workspaces"
}
}
sample response
4.Delete Team Folder
Method : DELETE
API :/api/v1/workspaces/<id>
Scope : WorkDrive.workspace.DELETE
5.Add Members to Team Folder
Method : POST
API : /api/v1/permissions
Scope : WorkDrive.workspace.UPDATE
Note: role_id - { 1- Admin, 2 - Organizer, 5 - Editor , 6 - Viewer }
Attributes :
{
"data": {
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"shared_type": "workspace",
"email_id": "[email protected]",
"role_id": "5"
},
"type": "permissions"
}
}
sample response
6.Update Member Role in Team Folder
Method : PATCH
API : /api/v1/permissions/<id>
Scope : WorkDrive.files.UPDATE
Note: role_id - { 1- Admin, 2 - Organizer , 5 - Editor , 6 - Viewer }
Attributes :
{
"data": {
"attributes": {
"role_id": "6"
},
"id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-yyyyyyyy",
"type": "permissions"
}
}
sample response
7.Delete Memeber from Team Folder
Method : DELETE
API : /api/v1/permissions/<id>
Scope : WorkDrive.files.UPDATE
8.Get Users of Team Folder
Method : GET
API :/api/v1/workspaces/<id>/permissions
Scope : WorkDrive.workspace.READ
sample response
My Folder APIs
1.Get My FolderId of Team
Method : GET
API : /api/v1/users/<id>/privatespace
Scope : WorkDrive.files.READ
Note : <id> - {teamid-memberid}
sample response
2.Get files & folders from My Folder
Method : GET
API : /api/v1/privatespace/<id>/files
Scope : WorkDrive.files.READ
Note: <id> - Resonse id of get My Folder Id
sample response
Files & Folders
1.Create Folder
Method : POST
API :/api/v1/files
Scope : WorkDrive.files.CREATE
Attributes :
{
"data": {
"attributes": {
"name": "Expenses2018",
"parent_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"type": "files"
}
}
Note : Here parent_id attribute refers to Team-Folder-ID or Parent-Folder-ID
sample response
2.Rename Folder
Method : PATCH
API : /api/v1/files/<id>
Scope : WorkDrive.files.UPDATE
Attributes :
{
"data": {
"attributes": {
"name": "ExpensesAndIncome2018"
},
"type": "files"
}
}
sample response
3.Copy Folder
Method : POST
API :/api/v1/files/<id>/copy
Scope : WorkDrive.files.CREATE
Attributes :
{
"data": {
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"type": "files"
}
}
4.Delete Folder
Method : DELETE
API : /api/v1/files/<id>
Scope : WorkDrive.files.DELETE
Note: We can delete trashed folders only(cannot delete active folders directly)
5.Create File
Method : POST
API :/api/v1/files
Scope : WorkDrive.files.CREATE
Note: service_type will be zw - writer native, zohosheet - sheet native, zohoshow - show
native
Attributes :
{
"data": {
"attributes": {
"name": "Untitled Spreadsheet",
"service_type": "zohosheet",
"parent_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"type": "files"
}
}
sample response
6.Upload File
Method : POST
API : /api/v1/upload
Scope : WorkDrive.files.CREATE
Note: For revision upload , we can pass "override-name-exist" parameter as true.
Attributes :
Status Code :
409 SAME NAME EXIST Same file name already in this Parent folder. File
won't upload.
400 BAD_REQUEST Unable to process this request by the server.
sample response
sample code snippet
7.Download File
Method : GET
API : /api/v1/download/<id>
Scope : WorkDrive.files.READ
Note: <id> will be resource(files only)id to be downloaded. Folder download is not
possible.
8.Rename File
Method : PATCH
API : /api/v1/files/<id>
Scope : WorkDrive.files.UPDATE
Attributes :
{
"data": {
"attributes": {
"name": "ExpensesAndIncome2018"
},
"type": "files"
}
}
sample response
9.Copy File
Method : POST
API :/api/v1/files/<id>/copy
Scope : WorkDrive.files.CREATE
Note: <id> - path value refers to destination folder id and we can pass n(no of files to be
copied) number of array in below data attributes.
Attributes :
Sample of single file copy:
{
"data":[
{
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"type": "files"
}
]
}
Sample of two files copy:
{
"data": [
{
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"type": "files"
},
{
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"type": "files"
}
]
}
10.Move File
Method : PATCH
API :/api/v1/files
Scope : WorkDrive.files.UPDATE
Note: We can pass n(no of files to be moved) number of array in below data attributes.
Attributes :
Sample of single file move:
{
"data": [
{
"attributes": {
"parent_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "files"
}
]
}
Sample of two files move:
{
"data": [
{
"attributes": {
"parent_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "files"
},
{
"attributes": {
"parent_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
},
"id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "files"
}
]
}
11.Delete File
Method : PATCH
API : /api/v1/files
Scope : WorkDrive.files.UPDATE
Note: We can delete trashed files only(cannot delete active files directly)
Attributes :
{
"data":[
{
"attributes": {
"status": "61"
},
"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "files"
}
]
}
12.Get list of files and folders
Method : GET
API : /api/v1/files/<id>/files
Scope : WorkDrive.files.READ
Note: For pagination - We can pass below query parameters with encoded url.
page[offset]=0,50,100...
page[limit]=50
filter[type]=all
sample response
13.Get file/folder Info
Method : GET
API : /api/v1/files/<id>
Scope : WorkDrive.files.READ
sample response
14.Share File/Folder
Method : POST
API : /api/v1/permissions
Scope : WorkDrive.workspace.UPDATE
Note:
shared_type - { personal | workspacemembers | teammembers | everyone | publish |
groupmembers | organisation | workspace }
file - role_id - { 34 - View, 5 - Edit , 4 - Share , 6 - View and comment , 33 - View and fill}
folder - role_id - { 6 - View , 5 - Edit , 3 - Organize , 7 - Upload }
*View and fill - for Native writer Only.
Anyone in Internet and Embed code share :
● Shared_types everyone and publish are used to create Anyone in Internet share
and Embed Code respectively.
● Anyone in Internet share and Embed Code can be created only with view role.
● Also for these share_types attributes like email_id and send_notification_mail
are not required.
Attributes :
{
"data": {
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"shared_type": "personal",
"email_id": "[email protected]",
"role_id": "5",
"send_notification_mail": "true"
},
"type": "permissions"
}
}
sample response
15.Get Shared users of File/Folder
Method : GET
API : /api/v1/files/<id>/permissions
Scope : WorkDrive.files.READ
sample response
16.Update Share
Method : PATCH
API : /api/v1/permissions/<id>
Scope : WorkDrive.files.UPDATE
Note:
file - role_id - { 34 - View, 5 - Edit , 4 - Share , 6 - View and comment , 33 - View and fill}
folder - role_id - { 6 - View , 5 - Edit , 3 - Organize , 7 - Upload }
*View and fill - for Native writer Only.
Attributes :
{
"data": {
"attributes": {
"role_id": "5"
},
"id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-yyyyyyy",
"type": "permissions"
}
}
sample response
17.Remove Share
Method : DELETE
API : /api/v1/permissions/<id>
Scope : WorkDrive.files.UPDATE
Response: 204 No Content
18.Trash folder/file
Method : PATCH
API : /api/v1/files
Scope : WorkDrive.files.UPDATE
Note: We cannot trash draft files(only can delete drafts for ever)
Attributes :
{
"data":[
{
"attributes": {
"status": "51"
},
"id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"type": "files"
}
]
}
19.Search File
Method : GET
API : /api/v1/teams/<id>/records
Scope : WorkDrive.files.READ,WorkDrive.team.READ,ZohoSearch.securesearch.READ
Note: Query param - search%5Ball%5D=<search_query>
Additional filters :
filter%5Btype%5D=<resource_type> where <resource_type> can have documents /
spreadsheets / presentations / pdf / audio / video / images / folder
filter%5Bdate%5D=<predefined_date> where <predefined_date> can have today /
yesterday / last_week / last_month
Custom date filter :
filter%5BfromDate%5D=1583778600000&filter%5BtoDate%5D=1585247400000 {Date in
milliseconds}
External Sharing
1.Create Share Link
External share can be created of two types :
i). Custom share link
Method : POST
API :/api/v1/links
Scope : WorkDrive.files.CREATE
Note: role_id - { 6 - External share for folder with View access, 7 - External share for folder with
Upload access}. No need to pass "input_fields", if "request_user_data" set as false.
Attributes :
{
"data": {
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"link_name": "samplelink",
"input_fields":[
{
"field_name":"Name",
"field_type":"TEXT",
"is_name_field" : true
},
{
"field_name":"Phone",
"field_type":"PHONE"
},
{
"field_name":"Email",
"field_type":"EMAIL_ID"
}
]
"request_user_data": false,
"allow_download": true,
"password_text": "password1",
"expiration_date": "2020-09-26",
"role_id":"6"
},
"type": "links"
}
}
sample response
Attributes :
{
"data": {
"attributes": {
"resource_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"link_name": "samplelink",
"link_type" : "download",
"request_user_data": false,
"allow_download": true,
"expiration_date": "2020-09-26",
"download_link" : {
"download_limit" : "5"
}
},
"type": "links"
}
}
Response of Download share link is same as that of Custom share link. only change is link-type
value will be download.
2.Update Shared Link
Method : PATCH
API :/api/v1/links/<id>
Scope : WorkDrive.files.UPDATE
Attributes :
{
"data": {
"attributes": {
"allow_download": false,
"password_text": "updatepassword1",
"is_password_protected":true,
"expiration_date": "2020-09-30"
},
"id": "6OlsssdsmQwro-JokQF",
"type": "links"
}
}
sample response
3.Remove Shared Link
Method : DELETE
API :/api/v1/links/<id>
Scope : WorkDrive.files.DELETE
Response: 204 No Content
4.Get List of Shared Links
Method : GET
API : /api/v1/files/<id>/links
Scope : WorkDrive.files.READ
sample response
Organization
1.Fetch all organization of the user
Method : GET
API : /api/v1/users/<zuid>/organization
Scope : WorkDrive.organization.READ
2.Get Organization Info
Method : GET
API : /api/v1/organization/<id>
Scope : WorkDrive.organization.READ
3.Get Current User of Organization
Method : GET
API : /api/v1/organization/<id>/currentuser
Scope : WorkDrive.files.READ
Data Templates and Custom Fields
1.Create Data Template
Method : POST
API : /api/v1/datatemplates
Scope : WorkDrive.team.CREATE
Attributes :
{
"data": {
"attributes": {
"team_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"status": true,
"name": "Recruitment - 2020",
"description": "Associate files and folders of all candidates"
},
"type": "datatemplates"
}
}
sample response
2.Update Data Template
Method : PATCH
API : /api/v1/datatemplates/<id>
Scope : WorkDrive.team.UPDATE
Attributes :
or
sample response
3.Delete Data Template
Method : DELETE
API : /api/v1/datatemplates/<id>
Scope : WorkDrive.team.DELETE
Response: 204 No Content
4.Create Custom Field
Method : POST
API : /api/v1/customfields
Scope : WorkDrive.team.CREATE
Attributes :
{
"data": {
"attributes": {
"data_template_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"display_name": "Candidate Name",
"index": 0,
"type": "text",
"field_properties":{
"description":"Name of the candidate",
"default_value":"",
"max_char_length":"30",
"is_mandatory":true
}
},
"type": "customfields"
}
}
sample response
Note : index attribute represents position of Custom Field inside Data Template.
Other Custom Field types with supported field properties:
1. text
field_properties:
1. description
2. default_value
3. max_char_length
4. is_mandatory
2. multiline_text
field_properties:
1. description
2. is_mandatory
3. number
field_properties:
1. description
2. default_value
3. min_value
4. max_value
5. is_mandatory
4. datetime
field_properties:
1. description
2. default_value - (in milli seconds)
3. is_mandatory
5. date
field_properties:
1. description
2. default_value - (in milli seconds)
3. is_mandatory
6. yes_or_no
field_properties:
1. description
2. default_value - (in boolean)
3. is_mandatory
8. email
field_properties:
1. description
2. is_mandatory
5.Update Custom Field
Method : PATCH
API : /api/v1/customfields/<id>
Scope : WorkDrive.team.UPDATE
Attributes :
{
"data": {
"attributes": {
"display_name": "Name"
"field_properties":{
"description":"Name of the candidate",
"max_char_length":"25",
"is_mandatory":false
}
},
"type": "customfields"
}
}
sample response
6.Delete Custom Field
Method : DELETE
API : /api/v1/customfields/<id>
Scope : WorkDrive.team.DELETE
Response: 204 No Content
7.Create Custom meta data (Associate API)
Method : POST
API : /api/v1/custommetadata
Scope : WorkDrive.files.CREATE
Attributes :
{
"data": {
"attributes": {
"resource_id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"data_template_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"custom_data":[
{
"custom_field_id":"xxxxxxxxxxxxxxxxxx",
"value":"John"
},
{
"custom_field_id":"xxxxxxxxxxxxxxxxxx",
"value":"26"
}
]
},
"type": "custommetadata"
}
}
For Batch :
{
"data":[ {
"attributes": {
"resource_id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"data_template_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"custom_data":[
{
"custom_field_id":"xxxxxxxxxxxxxxxxxx",
"value":"John"
}
]
},
"type": "custommetadata"
},
{
"attributes": {
"resource_id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1",
"data_template_id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"custom_data":[
{
"custom_field_id":"xxxxxxxxxxxxxxxxxx",
"value":"Alex"
}
]
},
"type": "custommetadata"
}]
}
sample response
8.Update Custom meta data
Method : PATCH
API : /api/v1/custommetadata/<id>
Scope : WorkDrive.files.UPDATE
Attributes :
Sample format to update a particular value of Custom field:
{
"data": {
"attributes": {
"custom_data":[
{
"custom_field_id":"xxxxxxxxxxxxxxxxxx",
"value":"John"
}
]
},
"type": "custommetadata"
}
}
sample response
9.Delete Custom meta data
Method : DELETE
API : /api/v1/custommetadata/<id>
Scope : WorkDrive.files.DELETE
Response: 204 No Content
10.Get List of Data Templates of team
Method : GET
API : /api/v1/teams/<team_id>/datatemplates
Scope : WorkDrive.team.READ
11.Get List of Custom Fields of Data Template
Method : GET
API : /api/v1/datatemplates/<data_template_id>/customfields
Scope : WorkDrive.team.READ
12.Get List of Data Templates Associated with File/Folder
Method : GET
API : /api/v1/files/<id>/custommetadata
Scope : WorkDrive.files.READ
13.Data Templates and Custom Fields search
Method : GET
API : /api/v1/teams/<id>/records
Scope : WorkDrive.files.READ,WorkDrive.team.READ,ZohoSearch.securesearch.READ
Note: Query param - search[all]. example., filename search - search[all]="filename"
filter[datatemplate]. example., filter[datatemplate]=162530000002083025
Note: id = id present after "-" in id of data template response
filter[<column_name>]. example., filter[CF1]="john"
Note: column_name = column_name attribute from custom fields response
filter[logicalExpression]. example., filter[logicalExpression]=(1 AND 2)
Team Response:
"data":{
"id":"7rigyd432239268ce475c9b46b84777a6d1f6",
"type":"teams",
"attributes":{
"modified_time_i18":"Jul 6, 4:36 PM",
"plan_type":0,
"link_start_characters":"JokQF",
"color":"#B5CC18",
"description":"",
"storage_info":{
"size":"18.25 MB",
"storage_used":"26.17 MB",
"files_count":68,
"folders_count":19,
"size_in_bytes":19136529,
"storage_used_in_bytes":27437679
},
"is_discoverable":true,
"is_current_user_admin":true,
"created_time_i18":"Jul 6, 4:36 PM",
"unread_count":0,
"modified_time_in_millisecond":1530875201954,
"modified_time":"Jul 6, 4:36 PM",
"is_preferred":true,
"role_id":32,
"member_status":1,
"logo":{
},
"shared_status":"ACTIVE",
"created_time_in_millisecond":1530875201954,
"superadmin_contact":"[email protected]",
"created_time":"Jul 6, 4:36 PM",
"capabilities":{
"can_read":true,
"can_delete":true,
"can_edit":true,
"can_add_member":true,
"can_create_workspace":true,
"can_create_public_workspace":true
},
"is_directory_enabled":false,
"invited_by":"Ryan West",
"notification_count":0,
"is_partof":true,
"license_status":0,
"user_count":8,
"parent_id":"-1",
"is_unread":false,
"name":"Zylker",
"is_new_notification":false,
"is_current_user_super_admin":true
},
"relationships":{
"currentuser":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/currentuser",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/currentuser"
}
},
"settings":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/settings",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/settings"
}
},
"license":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/license",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/license"
}
},
"records":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/records",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/records"
}
},
"recordsuggestions":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/recordsuggestions",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/recordsuggestions"
}
},
"groups":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/groups",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/groups"
}
},
"timeline":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/timeline",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/timeline"
}
},
"workspaces":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/workspaces",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/workspaces"
}
},
"events":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/events",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/events"
}
},
"users":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/users",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/users"
}
},
"accesschartdata":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6/relationships/accesschartdata",
"related":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223
9268ce475c9b46b84777a6d1f6/accesschartdata"
}
}
},
"links":{
"self":"https://workdrive.zoho.com/api/v1/teams/7rigyd43223926
8ce475c9b46b84777a6d1f6"
}
}
}
Team Folder Response:
"data":{
"id":"7rigyb57ec54fb4a3464d8f537bbea0899da8",
"type":"workspaces",
"attributes":{
"is_public_within_team":false,
"groups_count":0,
"created_time_in_milliseconds":1530879166802,
"description":"",
"is_built_in":false,
"storage_info":{
"size":"19.0 KB",
"storage_used":"19.0 KB",
"files_count":9,
"folders_count":1,
"size_in_bytes":19975,
"storage_used_in_bytes":19975
},
"last_accessed_time_in_milliseconds":1530879166802,
"is_current_user_admin":true,
"files_view_pref":{
"sort_by":"last_modified",
"sort_order":"desc",
"filtered_by":"all",
"layout":"list"
},
"unread_count":0,
"role_id":1,
"shared_view_pref":{
"sort_by":"last_modified",
"sort_order":"desc",
"filtered_by":"all",
"layout":"list"
},
"last_accessed_time":"Jul 6, 5:42 PM",
"is_share_allowed":true,
"created_time":"Jul 6, 5:42 PM",
"collaborators_count":6,
"capabilities":{
"can_read":true,
"can_share":true,
"can_delete":true,
"can_edit":true,
"can_manage":true,
"can_create_files":true,
"can_upload_files":true,
"can_trash_files":true,
"can_leave":true,
"can_add_members":true,
"can_join":false
},
"unread_view_pref":{
"sort_by":"last_modified",
"sort_order":"desc",
"filtered_by":"all",
"layout":"list"
},
"incomingfiles_view_pref":{
"sort_by":"shared_time",
"sort_order":"desc",
"filtered_by":"all",
"layout":"list"
},
"is_partof":true,
"is_default":false,
"created_by":"Ryan West",
"created_by_zuid":"631830848",
"last_accessed_by":"Ryan West",
"is_unread":false,
"name":"Design",
"status":1
},
"relationships":{
"settings":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/settings",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/settings"
}
},
"folders":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/folders",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/folders"
}
},
"incomingfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/incomingfiles",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/incomingfiles"
}
},
"trashedfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/trashedfiles",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/trashedfiles"
}
},
"mydrafts":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/mydrafts",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/mydrafts"
}
},
"deletedfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/deletedfiles",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/deletedfiles"
}
},
"permissions":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/permissions",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/permissions"
}
},
"files":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/files",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/files"
}
},
"timeline":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/timeline",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/timeline"
}
},
"incomingfolders":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/incomingfolders",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/incomingfolders"
}
},
"copy":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/copy",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/copy"
}
},
"unreadfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/unreadfiles",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/unreadfiles"
}
},
"outgoingfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8/relationships/outgoingfiles",
"related":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb
57ec54fb4a3464d8f537bbea0899da8/outgoingfiles"
}
}
},
"links":{
"self":"https://workdrive.zoho.com/api/v1/workspaces/7rigyb57e
c54fb4a3464d8f537bbea0899da8"
}
}
}
Permissions Response:
"data":{
"id":"7rigyb57ec54fb4a3464d8f537bbea0899da8-631830848",
"type":"permissions",
"attributes":{
"email_id":"[email protected]",
"owner":"670735137",
"shared_type":"workspace",
"shared_by":"Ryan West",
"expiry_in_millis":0,
"delete_from_propagated_space":false,
"relation_type":0,
"expiration_date":"",
"display_name":"Ryan West",
"share_to":"631830848",
"avatar_url":"https://contacts.zoho.com/file?t=user&ID=63183084
8&fs=thumb&nps=404",
"role_id":1,
"is_password_protected":false,
"resource_id":"7rigyb57ec54fb4a3464d8f537bbea0899da8",
"shared_status":"ACTIVE",
"shared_by_zuid":"631830848",
"can_link_to_docs":true
},
"links":{
"self":"https://workdrive.zoho.com/api/v1/permissions/7rigyb57
ec54fb4a3464d8f537bbea0899da8-631830848"
}
}
Get My FolderId Response:
"data":[
{
"id":"7rigyde5f165c4c6e4a28a5b60f00f7d8a6ff",
"type":"privatespace",
"attributes":{
"trashedfiles_view_pref":{
"sort_by":"last_modified",
"sort_order":"desc",
"filtered_by":"all",
"layout":"list"
},
"outgoingfiles_view_pref":{
"sort_by":"last_modified",
"sort_order":"desc",
"filtered_by":"all",
"layout":"list"
},
"incomingfiles_view_pref":{
"sort_by":"name",
"sort_order":"asc",
"filtered_by":"all"
},
"is_unread_myspace":false,
"unread_count_myspace":0,
"files_view_pref":{
"sort_by":"name",
"filtered_by":"all"
}
},
"relationships":{
"folders":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/folders",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/folders"
}
},
"deletedfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/deletedfiles",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/deletedfiles"
}
},
"incomingfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/incomingfiles",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/incomingfiles"
}
},
"files":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/files",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/files"
}
},
"trashedfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/trashedfiles",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/trashedfiles"
}
},
"incomingfolders":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/incomingfolders",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/incomingfolders"
}
},
"copy":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/copy",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/copy"
}
},
"outgoingfiles":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff/relationships/outgoingfiles",
"related":"https://workdrive.zoho.com/api/v1/privatespace/7rig
yde5f165c4c6e4a28a5b60f00f7d8a6ff/outgoingfiles"
}
}
},
"links":{
"self":"https://workdrive.zoho.com/api/v1/privatespace/7rigyde
5f165c4c6e4a28a5b60f00f7d8a6ff"
}
}
]
Files/Folders Response:
"data":{
"id":"a2edg454d800657be42c2ab416199ba4020a6",
"type":"files",
"attributes":{
"modified_time_i18":"Sep 19, 10:54 AM",
"opened_time_i18":"Sep 19, 10:53 AM",
"is_locked":false,
"extn":"",
"description":"",
"type":"writer",
"thumbnail_url":"https://download1.zoho.com/workdrive/thumbnai
l/a2edg454d800657be42c2ab416199ba4020a6",
"created_time_i18":"Sep 19, 10:53 AM",
"modified_time":"Sep 19, 10:54 AM",
"modified_time_in_millisecond":1537334656627,
"library_id":"7rigyb57ec54fb4a3464d8f537bbea0899da8",
"opened_time":"Sep 19, 10:53 AM",
"download_url":"https://download-accl.zoho.com/v1/workdrive/do
wnload/a2edg454d800657be42c2ab416199ba4020a6",
"comment_badge_count":0,
"icon_class":"writer",
"created_time_in_millisecond":1537334600826,
"owner":"670735137",
"created_time":"Sep 19, 10:53 AM",
"lock_status":2,
"capabilities":{
"can_read":true,
"can_share":true,
"can_remove_share":false,
"can_delete":false,
"can_edit":true,
"can_upload_files":true,
"can_trash":true,
"can_rename":true,
"can_restore":false,
"can_copy":true,
"can_move":true,
"can_zip":true,
"can_download":true,
"can_emailattach":true,
"can_publish":true,
"can_checkout":true,
"can_cancel_checkout":false,
"can_discard_checkout":false,
"can_checkin":false,
"can_read_comment":true,
"can_create_comment":true,
"can_trash_files":true
},
"is_folder":false,
"opened_time_in_millisecond":1537334600826,
"display_attr_name":"Untitled Document",
"share_data":[
],
"edit_badge_count":0,
"created_by":"Ryan West",
"display_html_name":"Untitled Document",
"has_folders":false,
"service_type":"zw",
"display_url_name":"Untitled+Document",
"parent_id":"7rigyb57ec54fb4a3464d8f537bbea0899da8",
"is_unread":false,
"name":"Untitled Document",
"modified_by":"Ryan West",
"permalink":"https://workdrive.zoho.com/file/a2edg454d800657be4
2c2ab416199ba4020a6",
"is_part_of_joined_workspace":false,
"favorite":false,
"new_badge_count":0,
"status":1
},
"relationships":{
"folders":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/folders",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/folders"
}
},
"comments":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/comments",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/comments"
}
},
"previewinfo":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/previewinfo",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/previewinfo"
}
},
"unzip":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/unzip",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/unzip"
}
},
"publiclink":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/publiclink",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/publiclink"
}
},
"accesschartdata":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/accesschartdata",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/accesschartdata"
}
},
"resourceproperty":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/resourceproperty",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/resourceproperty"
}
},
"parentfolders":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/parentfolders",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/parentfolders"
}
},
"importfile":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/importfile",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/importfile"
}
},
"versions":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/versions",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/versions"
}
},
"permissions":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/permissions",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/permissions"
}
},
"files":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/files",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/files"
}
},
"timeline":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/timeline",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/timeline"
}
},
"links":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/links",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/links"
}
},
"copy":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/copy",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/copy"
}
},
"accessdata":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/accessdata",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/accessdata"
}
},
"previewzip":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/previewzip",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/previewzip"
}
},
"breadcrumbs":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/breadcrumbs",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/breadcrumbs"
}
},
"statistics":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6/relationships/statistics",
"related":"https://workdrive.zoho.com/api/v1/files/a2edg454d800
657be42c2ab416199ba4020a6/statistics"
}
}
},
"links":{
"self":"https://workdrive.zoho.com/api/v1/files/a2edg454d800657
be42c2ab416199ba4020a6"
}
}
Upload File Response
data:{
"type":"files",
attributes:{
"filename":"13221567.png",
"resource_id":"1g07tae4a27e95eb448b1a3936effd567f00c",
"parent_id":"1g07t16aa59a432e84dda94925a4b58e8bfdf",
"":{
"version_info":{
"status_code":"D201",
"resource_id":"1g07tae4a27e95eb448b1a3936effd567f00c",
"version_number":"3.0",
"updated_by":"UPLOAD"
}
}
}
}
}
Link Response
"data":
{
"id":"6OlfqBmQwro-JokQF",
"type":"links",
"attributes":{
"request_user_data":false,
"link_type":"custom",
"allow_download":false,
"role_id":6,
"link":"https://tdrive.li/JokQF_te",
"is_password_protected":false,
"resource_id":"aov8b564480e16a314ee28e08bac06bf63c44",
"input_fields":[
],
"link_name":"te",
"created_by":"Ryan West",
"status":1
},
"relationships":{
"password":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/links/6OlfqBmQwro-Jo
kQF/relationships/password",
"related":"https://workdrive.zoho.com/api/v1/links/6OlfqBmQwro
-JokQF/password"
}
},
"register":{
"links":{
"self":"https://workdrive.zoho.com/api/v1/links/6OlfqBmQwro-Jo
kQF/relationships/register",
"related":"https://workdrive.zoho.com/api/v1/links/6OlfqBmQwro
-JokQF/register"
}
}
},
"links":{
"self":"https://workdrive.zoho.com/api/v1/links/6OlfqBmQwro-Jo
kQF"
}
}
}
Data Template Response
{
"data": {
"id":
"4fv34c66f6999f0fb43f182eabf70e5947b6f-162530000001976004",
"type": "datatemplates",
"attributes": {
"created_time_i18": "Mar 20, 11:43 AM",
"name": "Recruitment - 2020",
"modified_by": "55904703",
"description": "Associate files and folders of all
candidates",
"modified_by_user": "John",
"team_id":
"4fv34c66f6999f0fb43f182eabf70e5947b6f",
"custom_fields_count": 0,
"created_time_in_millisecond": 1584684812062,
"created_by": "55904703",
"created_by_user": "John",
"status": true
},
"relationships": {
"customfields": {
"links": {
"self":
"https://workdrive.localzoho.com/api/v1/datatemplates/4fv34c66
f6999f0fb43f182eabf70e5947b6f-162530000001976004/relationships
/customfields",
"related":
"https://workdrive.localzoho.com/api/v1/datatemplates/4fv34c66
f6999f0fb43f182eabf70e5947b6f-162530000001976004/customfields"
}
}
},
"links": {
"self":
"https://workdrive.localzoho.com/api/v1/datatemplates/4fv34c66
f6999f0fb43f182eabf70e5947b6f-162530000001976004"
}
}
}
Custom Field Response
{
"data": {
"id":
"4fv34c66f6999f0fb43f182eabf70e5947b6f-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAxNg",
"type": "customfields",
"attributes": {
"data_template_id":
"4fv34c66f6999f0fb43f182eabf70e5947b6f-162530000001976004",
"column_name": "CF201",
"index": 0,
"display_name": "Candidate Name",
"type": "text",
"field_properties": {
"description": "Name of the candidate",
"is_mandatory": true,
"max_char_length": "30"
}
},
"links": {
"self":
"https://workdrive.localzoho.com/api/v1/customfields/4fv34c66f6
999f0fb43f182eabf70e5947b6f-MTYyNTMwMDAwMDAxOTc2MDA0LTE2MjUzMD
AwMDAwMTk3NjAxNg"
}
}
}
Custom meta data Response
{
"data": {
"id":
"sgf9l6eabe48100754f6c8e659054ba825e80-162530000001976004",
"type": "custommetadata",
"attributes": {
"name": "Recruitment - 2020",
"resource_id":
"sgf9l6eabe48100754f6c8e659054ba825e80",
"description": "Associate files and folders of all
candidates",
"custom_data": [
{
"custom_field_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAxNw",
"index": 0,
"display_name": "Name",
"type": "text",
"field_properties": {
"description": "Name of the
candidate",
"is_mandatory": true,
"max_char_length": "30"
},
"value": "John"
},
{
"custom_field_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAxOA",
"index": 1,
"display_name": "Age",
"type": "number",
"field_properties": {
"description": "Age of the candidate",
"is_mandatory": true,
"max_value": "35",
"min_value": "25"
},
"value": "26"
},
{
"custom_field_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAyNQ",
"index": 2,
"display_name": "Data of Birth",
"type": "date",
"field_properties": {
"is_mandatory": true
},
"value": "734812200000"
},
{
"custom_field_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAyNg",
"index": 3,
"display_name": "Fresher",
"type": "yes_or_no",
"field_properties": {
"is_mandatory": true
},
"value": "true"
},
{
"customfield_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAyNw",
"options": [
"BE",
"ME",
"MBA",
"BSC",
"MSC"
],
"index": 4,
"display_name": "Qualification",
"type": "dropdown",
"field_properties": {
"is_mandatory": true
},
"value": "BE"
},
{
"custom_field_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAyOA",
"options": [
"Male",
"Female"
],
"index": 5,
"display_name": "Gender",
"type": "radio",
"field_properties": {
"is_mandatory": true
},
"value": "Male"
},
{
"custom_field_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAyOQ",
"index": 6,
"display_name": "Address",
"type": "multiline_text",
"field_properties": {
"is_mandatory": true
},
"value": "CHENNAI"
},
{
"custom_field_id":
"sgf9l6eabe48100754f6c8e659054ba825e80-MTYyNTMwMDAwMDAxOTc2MDA
0LTE2MjUzMDAwMDAwMTk3NjAzMA",
"index": 7,
"display_name": "Email",
"type": "email",
"field_properties": {
"is_mandatory": true
},
"value": "[email protected]"
}
],
"data_template_id":
"4fv34c66f6999f0fb43f182eabf70e5947b6f-162530000001976004"
},
"links": {
"self":
"https://workdrive.localzoho.com/api/v1/custommetadata/sgf9l6e
abe48100754f6c8e659054ba825e80-162530000001976004"
}
}
}
Upload File Sample Code Snippet
import java.io.IOException;
import java.io.InputStream;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.methods.*;
import org.apache.http.entity.ContentType;
import org.apache.http.entity.mime.MultipartEntityBuilder;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClients;
public class UploadUnitTest {
public static void main(String[] args){
String oAuthToken = "Zoho-oauthtoken " +
"1000.e264b4983d3710cb8b86abfafddf17ad.b2009a8b05bcad19792d2f6
b25e14fa9";
String parentId = "t4lev06ceefea837b4e8b8bca892b5b8a013e";
CloseableHttpClient httpClient = HttpClients.createDefault();
HttpGet downloadFile = new
HttpGet("https://workdrive.zoho.com/api/v1/download/t4leva5281
2cfa06e4dcfbc111a27efa3e47f");
downloadFile.addHeader("Authorization", oAuthToken);
HttpResponse response = null;
HttpEntity entity = null;
try {
response = httpClient.execute(downloadFile);
entity = response.getEntity();
System.out.println("entity :: "+entity.toString());
if (entity != null) {
long len = entity.getContentLength();
InputStream file = entity.getContent();
System.out.println("file :: " + file);
String params =
"filename=test.csv&override-name-exist=true&parent_id=" +
parentId;
HttpPost uploadFile = new
HttpPost("https://workdrive.zoho.com/api/v1/upload?" +
params);
uploadFile.addHeader("Authorization", oAuthToken);
MultipartEntityBuilder builder =
MultipartEntityBuilder.create();
builder.addBinaryBody("content", file,
ContentType.APPLICATION_OCTET_STREAM, "Test.csv");
HttpEntity multipart = builder.build();
uploadFile.setEntity(multipart);
response = httpClient.execute(uploadFile);
System.out.println("response :: "+response);
}
} catch (ClientProtocolException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
}
Packages Used :
httpclient-4.3.3.jar
httpmime-4.3.3.jar
httpcore-4.3.3.jar
JAR Download URL