Use WebWork API to simply get all the tasks in the portal for the logged in user, edit or delete them, and create new ones. You can get all the tasks in the given project, update and delete them and also get all the details for the specific task. There is not any limitation in our API, all actions available in WebWork are possible to do through the API.
You can get all the tasks in your account with the following URL request
Copy code GET https://www.webwork-tracker.com/rest-api/tasks
It is also possible to get all the tasks of the specific project by giving
project_id
parameter to the URL, as shown in the example.
Copy code GET https://www.webwork-tracker.com/rest-api/tasks?project_id={project_id}
The response should return in a json format. An example of response structure find below.
Copy code [ { "id": "{task_id}" "creator_id": "{creator_id}" "owner_id": "{owner_id}" "project_id": "{project_id}" "title": "{title}" "description": "{description}" "status": "{status}" "priority": "{priority}" "completed_at": "{completed_at}" "start_date": "{start_date}" "end_date": "{end_date}" "has_details": "{has_details}" "created_at": "{created_at}" "updated_at": "{updated_at}" "deleted_at": "{deleted_at}" }, {...} ]
If you need to get information regarding a specific task, you need to add the {task_id} at the end of the URL
Copy code GET https://www.webwork-tracker.com/rest-api/tasks/{task_id}
The response returns in a json format. Below you can see an example of response structure.
Copy code { "id": "{task_id}" "creator_id": "{creator_id}" "owner_id": "{owner_id}" "project_id": "{project_id}" "title": "{title}" "description": "{description}" "status": "{status}" "priority": "{priority}" "completed_at": "{completed_at}" "start_date": "{start_date}" "end_date": "{end_date}" "has_details": "{has_details}" "created_at": "{created_at}" "updated_at": "{updated_at}" "deleted_at": "{deleted_at}" }
Update a task by sending a
The URL must include task_id
Copy code PUT https://www.webwork-tracker.com/rest-api/tasks/{task_id}
You should put the following header in your request
Copy code Content-Type: application/x-www-form-urlencoded
Using
Property name | Type | Is required |
---|---|---|
title | string | YES |
description | string | NO |
status | integer | NO |
start_date | date | NO |
end_date | date | NO |
priority | integer | NO |
The list of available values you can see below
Property name | Value | Explanation |
---|---|---|
status | 10 | To do |
status | 20 | Doing |
status | 30 | Done |
priority | 10 | Urgent |
priority | 20 | High |
priority | 30 | Normal |
The returned response contains a success
property with your request success value.
Copy code { "success": "{success_of_the_request}" }
You can create a new task using
Copy code POST https://www.webwork-tracker.com/rest-api/tasks
Below you can see all parameters that you can pass to request body
Property name | Type | Is required |
---|---|---|
title | string | YES |
project_id | integer | YES |
priority | integer | NO |
The list of available values you can see below
Property name | Value | Explanation |
---|---|---|
priority | 10 | Urgent |
priority | 20 | High |
priority | 30 | Normal |
The returned response includes a success
property which contains your request
success value, and task
property which is an array of the created task options.
Copy code { "success": "{success_of_the_request}" "task": "{task_array}" }
In case of failure the response will include only success
property.
In order to delete a task you should send a request to the same URL using
Copy code DELETE https://www.webwork-tracker.com/rest-api/tasks/{task_id}
The returned response includes a success
property which contains your request
success value.
Copy code { "success": "{success_of_the_request}" }
Through task API you can also simply assign a task to a specific user by sending a
Please, note that the user should already have contacts in the project in order you can assign tasks.
Copy code GET https://www.webwork-tracker.com/rest-api/tasks/assign/{task_id}/{user_id}
The returned response includes a success
property which contains your request
success value.
Copy code { "success": "{success_of_the_request}" "assignee": "{assignee_info}" }
Unassign users can be done the same way as assigning them, just use URL mentioned below and add appreciate parameters.
Copy code GET https://www.webwork-tracker.com/rest-api/tasks/unassign/{task_id}/{user_id}
The returned response includes a success
property which contains your request
success value.
Copy code { "success": "{success_of_the_request}" }