> For the complete documentation index, see [llms.txt](https://developer.harness.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.harness.io/ai-sre/api-reference/timeline.md).

# Timeline

## GET /api/v1/mc/activities/{activityId}/timeline

> Get an activity's timeline

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/activities/{activityId}/timeline":{"get":{"tags":["Timeline"],"summary":"Get an activity's timeline","operationId":"get_activity_timeline","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"activityId","in":"path","description":"Activity ID, e.g. INC-123 or ALERT-456","required":true,"schema":{"type":"string"}},{"name":"eventGroups","in":"query","description":"Event groups to include (repeatable); omit to include every group","schema":{"type":"array","items":{"type":"string","description":"Named group of timeline event types","enum":["USER_MESSAGES","LIFECYCLE","PAGING","RUNBOOKS","AI","TASKS","KEY_EVENTS","STATUS_UPDATES"]}}},{"name":"cursor","in":"query","description":"Paging cursor value from the previous response.","schema":{"type":"string"}},{"name":"pageSize","in":"query","description":"Page size requested","schema":{"type":"integer","format":"int32"}},{"name":"sortDirection","in":"query","description":"Sort direction; defaults to DESC (newest first)","schema":{"type":"string","description":"Sort direction","enum":["ASC","DESC"]}}],"responses":{"200":{"description":"Timeline events","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CursorPaginatedResultStringTimelineEventResponse"}}}},"404":{"description":"Activity not found"}}}}},"components":{"schemas":{"CursorPaginatedResultStringTimelineEventResponse":{"type":"object","properties":{"nextPageCursor":{"type":"string"},"hasMoreResults":{"type":"boolean"},"results":{"type":"array","items":{"$ref":"#/components/schemas/TimelineEventResponse"}},"totalCount":{"type":"integer","format":"int64"},"totalCountApproximate":{"type":"integer","format":"int64"}}},"TimelineEventResponse":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique identifier for this timeline event"},"eventType":{"type":"string","description":"The type of event, e.g. ONCALL_PAGED"},"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"actor":{"type":"string","description":"Display name of whoever or whatever produced the event, when known"},"message":{"type":"string","description":"The event's content, rendered as markdown"}},"description":"An event in an activity's timeline"}}}}
```

## Post a markdown note to an activity's timeline

> Adds a markdown note to the activity's timeline. A newly posted note may take a moment to appear in a subsequent GET of the same timeline. The \`message\` returned here is the markdown exactly as submitted; GET returns it rendered with the author's name.

```json
{"openapi":"3.0.1","info":{"title":"Harness AI SRE API","version":"v1"},"servers":[{"url":"https://app.harness.io/gateway/ir/tp"}],"security":[{}],"paths":{"/api/v1/mc/activities/{activityId}/timeline":{"post":{"tags":["Timeline"],"summary":"Post a markdown note to an activity's timeline","description":"Adds a markdown note to the activity's timeline. A newly posted note may take a moment to appear in a subsequent GET of the same timeline. The `message` returned here is the markdown exactly as submitted; GET returns it rendered with the author's name.","operationId":"post_activity_timeline_message","parameters":[{"name":"accountId","in":"query","description":"Harness account identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"orgId","in":"query","description":"Harness organization identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"projectId","in":"query","description":"Harness project identifier.","required":true,"schema":{"minLength":1,"type":"string"}},{"name":"activityId","in":"path","description":"Activity ID, e.g. INC-123 or ALERT-456","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostTimelineMessageRequest"}}}},"responses":{"201":{"description":"Timeline message created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimelineEventResponse"}}}},"400":{"description":"Invalid request"},"404":{"description":"Activity not found"}}}}},"components":{"schemas":{"PostTimelineMessageRequest":{"required":["message"],"type":"object","properties":{"message":{"type":"string","description":"Markdown note to post to the timeline"}},"description":"Request body for posting a markdown note to an activity's timeline"},"TimelineEventResponse":{"type":"object","properties":{"eventId":{"type":"string","description":"Unique identifier for this timeline event"},"eventType":{"type":"string","description":"The type of event, e.g. ONCALL_PAGED"},"timestamp":{"type":"integer","description":"Epoch milliseconds when the event occurred","format":"int64"},"actor":{"type":"string","description":"Display name of whoever or whatever produced the event, when known"},"message":{"type":"string","description":"The event's content, rendered as markdown"}},"description":"An event in an activity's timeline"}}}}
```
