Create new Task
POST {{url}}/{{tenantName}}/{{instanceName}}/tasks
Example overview
A new task is created with the name Patient Review
with the description New Patient Profile Review
and the priority URGENT
and comment Lorem ipsum...
. The task assigned to user with id 20eb246e-8099-4c7c-854c-5e0f9a366ddb
. The task visible for users specified in the fields author
, assignee
, watchers
(in our example, this is the same user). The task must be completed by May 20, 2021
.
HTTP Request
Method: POST
Endpoint: {url}/{tenantName}/{instanceName}/tasks
in our example it would be: https://api.live.welkincloud.io/gh/sb-demo/tasks
Parameters
Name | Located in | Description | Required | Type |
---|---|---|---|---|
tenantName | path | Name of tenant | Yes | string |
instanceName | path | Name of instance | Yes | string |
name | body | Short name of the task | Yes | string |
description | body | Detailed text description of the task | No | string |
priority | body | task priority | Yes | LOW , MEDIUM , HIGH , URGENT |
status | body | task status | Yes | TODO , IN_PROGRESS , COMPLETED , CANCELED |
dueDate | body | deadline for the task | No | Datetime in ISO-8601 format |
assignee | body | user responsible for the task | Yes | {"id": ""} |
patient | body | task-related patient | No | {"id": ""} |
watchers | body | users subscribed to task notifications | No | [{"id": ""} ] |
comments | body | simple text comments to task | No | [{"text": ""} ] |
Responses
Code | Description |
---|---|
201 | Created |
401 | Unauthorized |
403 | Forbidden |
404 | Not Found |
Request Body
{"name"=>"New task", "description"=>"Create new patient profile", "dueDate"=>"2021-12-01T12:16:38.514Z", "status"=>"TODO", "priority"=>"URGENT", "assignee"=>{"id"=>"20eb246e-8099-4c7c-854c-5e0f9a366ddb"}, "templateName"=>"templateName"}