Task

For instructions on how to authenticate to use this endpoint, see API overview.

Endpoints

GET
POST

List all task activity

Task lifecycle rows collapse per task. Comment notifications remain separate. Results are most-recent first and restricted to tasks the requester can see.

Required API key scopes

task:read

Query parameters

  • before
    string
  • before_id
    string
  • limit
    integer
    Default: 100

Response


Example request

GET /api/projects/:project_id/task_activity
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl \
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/task_activity/

Example response

Status 200 Tasks, most-recent activity first
RESPONSE
{
"results": [
{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"task_id": "736fde4d-9029-4915-8189-01353d6982cb",
"task_title": "string",
"channel_id": "bbe8aa76-a4bb-46f6-a785-df8e831cc459",
"channel_name": "string",
"activity_at": "2019-08-24T14:15:22Z",
"activity_kind": "awaiting_input",
"snippet": "string",
"latest_author": {
"id": 0,
"uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",
"distinct_id": "string",
"first_name": "string",
"last_name": "string",
"email": "string",
"is_email_verified": true,
"hedgehog_config": {},
"role_at_organization": "string"
},
"latest_message_id": "1a19b239-4006-479e-9c76-8fa1f28ff7ee",
"latest_comment_id": "4e80f9ea-a4e9-4722-8023-f684b72467a8",
"latest_comment_scope": "string",
"latest_comment_item_id": "string",
"is_unread": true
}
],
"unread_count": 0,
"next_before": "2019-08-24T14:15:22Z",
"next_before_id": "0ce7fc60-5733-4ae4-967b-4beb905a3fd7"
}

Create task activity mark read

Clear collapsed task activity through task timestamps and individual comment activity through activity IDs.

Required API key scopes

task:write

Request parameters

  • activities
    Click to open
    array

Response


Example request

POST /api/projects/:project_id/task_activity/mark_read
export POSTHOG_PERSONAL_API_KEY=[your personal api key]
curl
-H 'Content-Type: application/json'\
-H "Authorization: Bearer $POSTHOG_PERSONAL_API_KEY" \
<ph_app_host>/api/projects/:project_id/task_activity/mark_read/\
-d activities="array"

Example response

Status 200 Remaining unread total
RESPONSE
{
"marked_read": 0,
"unread_count": 0
}