Projects API

Purpose

This API is used to get the list of projects, to add, to modify, to change project status and to delete the projects.

Get project API

This API is used to get the list of projects.

Request URL:

http://people.zoho.com/people/api/timetracker/getprojects?authtoken=<authtoken>&clientId=<clientId>&projectStatus=<projectStatus>

Request parameter:

authtokenSpecify the authentication token
clientIdSpecify the client Id
projectStatusSpecify the project status as In-progress or completed or all

Example URL:

http://people.zoho.com/api/timetracker/getprojects?authtoken=2110c57f48434f76c22c139c6ef88926&clientId=2239000000332107&projectStatus=all

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/getprojects">
<status>0</status>
<message>List of Projects fetched successfully</message>
<result>
<project>
<projectStatus>In-Progress</projectStatus>
<ownerName>Guru F Guru L</ownerName>
<projectCost>0.0</projectCost>
<ownerId>2239000000048003</ownerId>
<clientName>Google client</clientName>
<projectId>2239000000328227</projectId>
<jobIdList>[]</jobIdList>
<projectName>testproject</projectName>
<clientId>2239000000332107</clientId>
</project>
</result>
</response>

JSON response:

{ "response": { "message": "List of Projects fetched successfully", "result": [ { "projectStatus": "In-Progress", "ownerName": "Guru F Guru L", "projectCost": 0, "ownerId": "2239000000048003", "clientName": "Google client", "projectId": "2239000000328227", "jobIdList": [], "projectName": "testproject", "clientId": "2239000000332107" } ], "status": 0, "uri": "/api/timetracker/getprojects" } }

Add project API

This API is used to add the project.

Request URL:

http://people.zoho.com/people/api/timetracker/addproject?authtoken=<authtoken>&projectName=<projectName>&clientId=<clientId>&projectCost=<projectCost>&jobIds=<jobIds>

Request parameter:

authtokenSpecify the authentication token
projectNameSpecify the project name
clientIdSpecify the client Id
projectCostSpecify the project cost
jobIdsSpecify the jobIds (seperated by commas)

Example URL:

http://people.zoho.com/api/timetracker/addproject?authtoken=c0f4d58c9c922494c23b76ac919c2b48&user=2958000000067007&projectName=Google products&clientId=2958000000126297&projectCost=200000&jobIds=2958000000126497

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/addproject">
<status>0</status>
<message>Project added successfully</message>
<result>
<projectId>2958000000137009</projectId>
</result>
</response>

JSON response:

{ "response": { "message": "Project added successfully", "result": [ { "projectId": "2958000000137013" } ], "status": 0, "uri": "/api/timetracker/addproject" } }

Form based API for Add Project

This API is used whenever there are user-defined fields in the projects form.

Request URL:

https://people.zoho.com/people/api/forms/<inputType>/<formLinkName>/insertRecord?authtoken=<token>&inputData=<inputData>

Request Parameters

authtokenSpecify the authentication token
inputTypexml or json
inputDataXML input: <Request><Record><field name="Labelname">value</field><field name="LabelName1">value1</field><field name="Labelname2">value2</field></Record></Request>
JSON input: {LabelName:'value',LabelName1:'value1',LabelName2:'value2'}

Example URL:

https://people.zoho.com/people/api/forms/json/P_TimesheetJobsList/insertRecord?authtoken=a2aeec6f871980204791008133b2deb7&inputData={Project_Name:'Website Designing',ProjectCost:'45000',ClientId:'173907000000744041',Expected_End_date:'31-Jul-2015',jobIds:'173907000000276019;173907000000565035;173907000000630009',Description:'Directly handled by the CEO'}

XML response:

<?xml version=""1.0"" encoding=""UTF-8""?> <response uri=""/api/forms/xml/P_TimesheetJobsList/insertRecord""> <status> 0</status> <message> Data added successfully</message> <result> <message> Successfully Added</message> </result> </response>

JSON response:

{ "response": {
"message": "Data added successfully",
"result": {
"message": "Successfully Added"
},
"status": 0,
"uri": "/api/forms/json/P_TimesheetJobsList/insertRecord"
}
}

Note:

  • Please refer https://people.zoho.com/people/#admin/api/reference or Use the Fetch Component API to get the list of form components.
  • For edit action, mention recordId along with inputData.
  • To associate one or more jobs to the project, use 'jobIds' key. The jobIds should be separated by semicolon.

Modify project API

This API is used to modify the project.

Request URL:

http://people.zoho.com/people/api/timetracker/modifyproject?authtoken=<authtoken>&projectId=<projectId>&projectName=<projectName>&clientId=<clientId>&projectCost=<projectCost>&jobIds=<jobIds>

Request parameter:

authtokenSpecify the authentication token
projectIdSpecify the project Id
projectNameSpecify the project name
clientIdSpecify the client Id
projectCostSpecify the project cost
jobIdsSpecify the job Id

Example URL:

http://people.zoho.com/api/timetracker/modifyproject?authtoken=c0f4d58c9c922494c23b76ac919c2b48&user=2958000000067007&projectId=2958000000136077&projectName=Google products&clientId=2958000000126297&projectCost=200&jobIds=2958000000126497

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/modifyproject">
<status>0</status>
<message>Project details modified successfully</message>
<result>
<projectId>2958000000136077</projectId>
</result>
</response>

JSON response:

{ "response": { "message": "Project details modified successfully", "result": [ { "projectId": "2958000000136077" } ], "status": 0, "uri": "/api/timetracker/modifyproject" } }

Change project status API

This API is used to change the project status.

Request URL:

http://people.zoho.com/people/api/timetracker/changeprojectstatus?authtoken=<authtoken>&projectId=<projectId>&status=<status>

Request parameter:

authtokenSpecify the authentication token
projectIdSpecify the project Id
statusSpecify the status as in-progress or completed

Example URL:

http://people.zoho.com/api/timetracker/changeprojectstatus?authtoken=c0f4d58c9c922494c23b76ac919c2b48&user=2958000000067007&projectId=2958000000136077&status=completed

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/changeprojectstatus">
<status>0</status>
<message>Project status changed successfully</message>
<result>
<projectId>2958000000138001</projectId>
</result>
</response>

JSON response:

{ "response": { "message": "Project status changed successfully", "result": [ { "projectId": "2958000000138001" } ], "status": 0, "uri": "/api/timetracker/changeprojectstatus" } }

Delete project API

This API is used to delete the projects.

Request URL:

http://people.zoho.com/people/api/timetracker/deleteproject?authtoken=<authtoken>&projectId=<projectId>

Request parameter:

authtokenSpecify the authentication token
projectIdSpecify the projectIds (seperated by commas)

Example URL:

http://people.zoho.com/api/timetracker/deleteproject?authtoken=c0f4d58c9c922494c23b76ac919c2b48&projectId=2958000000136077

XML response:

<?xml version="1.0" encoding="UTF-8"?>
<response uri="/api/timetracker/deleteproject">
<status>0</status>
<message>Project deleted successfully</message>
<result>
<projectId>2958000000136077</projectId>
</result>
</response>

JSON response:

{ "response": { "message": "Project deleted successfully", "result": [ { "projectId": "2958000000136077" } ], "status": 0, "uri": "/api/timetracker/deleteproject" } }