todo/complete

Description

This operation marks the todo as completed. If the todo is unassigned, it is assigned to the user before completion. This operation is idempotent. If the todo is assigned to several users, the todo is completed when all assigned users have completed the todo.

URI

PUT completes the todo
http://ws.planzone.com/v1/rest/todo/guid/complete

Formats

xml, json

Requires Authentication (about authentication):

yes

Requires Authorization (about authorization):

The application must have the 'write' permission granted from the Planzone.

The user must be assigned to the todo, or, the todo must be unassigned or the user must have the Project Manager role in the project.

API rate limited (about rate limiting):

false

Parameters

None

Request Example

The following request:

PUT /v1/rest/todo/BYiI8zbUouo3/complete

completes the todo BYiI8zbUouo3.

Response

The response contains a todo XML element which describes the todo after the completion.

<todo id="BYiI8zbUouo3" priority="normal" status="open" date="2009-02-01"> <url>https://example.planzone.com/pz/project/1/todo?todo=117084500</url> <title>A first todo</title> <description>test</description> <assign id="AYiI8zbsosM4" status="active"> <name>John Walker</name> <email>John.Walker@example.com</email> </assign> </todo>

HTTP Status Codes

200 OK Operation succeeded
403 FORBIDDEN The todo cannot be completed (user is not assigned to the todo or application does not have the 'write' grant.
404 NOT FOUND The todo cannot be found

See also

planzones
todos
todo/uncomplete
todo XML element