Add a comment to each task of the list. Each comment sets the status of its task. Thus, the comments keep the history of the status changes. The author is the current user. An entry without task, status or text is skipped. A manager of the project can comment all the tasks. A supervisor can comment the tasks of their departments. Other users can comment their assigned tasks only. The other entries are skipped.
POST
/actions/projects/{project_id}/tasks/comment-many
curl
curl -X POST "http://api.example.com/actions/projects/a24a6ea4-ce75-4665-a070-57453082c25/tasks/comment-many" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-d '[
{
"task_status_id": "c46c8gc6-eg97-6887-c292-79675204e47",
"comment": "This looks great! Ready for review.",
"person_id": "d57d9hd7-fh08-7998-d403-80786315f58",
"object_id": "e68e0ie8-gi19-8009-e514-91897426g69",
"created_at": "2023-01-01T12:00:00Z",
"checklist": {
"item1": "Check lighting",
"item2": "Verify textures"
},
"links": [
"https://example.com/reference1",
"https://example.com/reference2"
]
}
]'
import requests
url = "http://api.example.com/actions/projects/a24a6ea4-ce75-4665-a070-57453082c25/tasks/comment-many"
headers = {
"Authorization": "Bearer YOUR_API_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json"
}
params = {}
payload = [
{
"task_status_id": "c46c8gc6-eg97-6887-c292-79675204e47",
"comment": "This looks great! Ready for review.",
"person_id": "d57d9hd7-fh08-7998-d403-80786315f58",
"object_id": "e68e0ie8-gi19-8009-e514-91897426g69",
"created_at": "2023-01-01T12:00:00Z",
"checklist": {
"item1": "Check lighting",
"item2": "Verify textures"
},
"links": [
"https://example.com/reference1",
"https://example.com/reference2"
]
}
]
response = requests.post(
url,
headers=headers,
params=params,
json=payload
)
response.raise_for_status()
if response.content:
print(response.json())
Request examples
[
{
"object_id": "a24a6ea4-ce75-4665-a070-57453082c250",
"task_status_id": "b35b7fb5-df86-5776-b181-68564193d360",
"comment": "string",
"links": [
"string"
]
}
]
Response examples (201)
[
{
"id": "b35b7fb5-df86-5776-b181-68564193d360",
"task_id": "e68e02e8-0219-8009-e514-918974260690",
"person_id": "d57d91d7-f108-7998-d403-80786315f580",
"comment": "This looks great! Ready for review.",
"task_status_id": "c46c80c6-e097-6887-c292-79675204e470",
"created_at": "2023-01-01T12:00:00Z"
}
]