> 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/release-orchestration/api-reference/tasks-beta.md).

# Tasks \[Beta]

## List pending manual activity tasks in a scope

> Returns manual activity tasks that are in a pending state (activity status RUNNING, ON\_HOLD, or OUTPUT\_WAITING) within the given scope. When myTasks is true, only tasks assigned to the calling user (via user\_reference\_id or user\_groups membership) are returned.

```json
{"openapi":"3.0.0","info":{"title":"rms","version":"1.0"},"tags":[{"name":"Tasks"}],"servers":[{"url":"/api"}],"paths":{"/tasks/pending":{"get":{"description":"Returns manual activity tasks that are in a pending state (activity status RUNNING, ON_HOLD, or OUTPUT_WAITING) within the given scope. When myTasks is true, only tasks assigned to the calling user (via user_reference_id or user_groups membership) are returned.","operationId":"ListPendingTasks","parameters":[{"$ref":"#/components/parameters/AccountParam"},{"$ref":"#/components/parameters/OrgParam"},{"$ref":"#/components/parameters/ProjectParam"},{"description":"When true, returns only tasks for activities triggered by the calling user. Equivalent to requestedBy=<callerId>.","in":"query","name":"myTasks","schema":{"default":false,"type":"boolean"}},{"description":"When true, returns only tasks assigned to the calling user (by user_reference_id or user_groups).","in":"query","name":"pendingOnMe","schema":{"default":false,"type":"boolean"}},{"description":"When set, returns only tasks for activities triggered by this user identifier.","in":"query","name":"requestedBy","schema":{"type":"string"}},{"description":"When set, returns only tasks assigned to this specific user identifier (by user_reference_id or user_groups membership). Distinct from pendingOnMe, which resolves to the calling user. When absent, all tasks are returned regardless of assignee.","in":"query","name":"pendingOnUserId","schema":{"type":"string"}},{"description":"When true, returns only tasks that are NOT pending on the specified user (pendingOnUserId) or, if pendingOnUserId is absent, NOT pending on the calling user.","in":"query","name":"pendingOnOthers","schema":{"default":false,"type":"boolean"}},{"description":"Opaque forward cursor returned by the previous page's nextCursor field. Omit for the first page.","in":"query","name":"nextCursor","schema":{"type":"string"}},{"description":"Opaque backward cursor returned by the previous page's prevCursor field. Pass to navigate backward.","in":"query","name":"previousCursor","schema":{"type":"string"}},{"description":"Sort criteria: FIELD,DIRECTION — e.g. CREATED_AT,ASC or CREATED_AT,DESC. Valid fields: CREATED_AT. Valid directions: ASC, DESC. Defaults to CREATED_AT,ASC when absent.","in":"query","name":"sort","schema":{"type":"string"}},{"description":"Maximum number of tasks to return per page","in":"query","name":"size","schema":{"default":20,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingTaskList"}}},"description":"Pending manual activity tasks in the given scope"},"400":{"$ref":"#/components/responses/ErrorResponse"},"403":{"$ref":"#/components/responses/ErrorResponse"},"500":{"$ref":"#/components/responses/ErrorResponse"}},"summary":"List pending manual activity tasks in a scope","tags":["Tasks"]}}},"components":{"parameters":{"AccountParam":{"description":"Account Identifier","in":"header","name":"Harness-Account","required":true,"schema":{"type":"string"}},"OrgParam":{"description":"Organisation Identifier","in":"query","name":"orgIdentifier","schema":{"type":"string"}},"ProjectParam":{"description":"Project Identifier","in":"query","name":"projectIdentifier","schema":{"type":"string"}}},"schemas":{"PendingTaskList":{"description":"Cursor-paginated list of pending manual activity tasks","properties":{"content":{"items":{"$ref":"#/components/schemas/PendingTask"},"type":"array"},"currentSize":{"description":"Number of items in this page","type":"integer"},"hasMore":{"description":"Whether additional pages are available","type":"boolean"},"nextCursor":{"description":"Opaque forward cursor. Pass as nextCursor on the next request. Absent when hasMore is false.","type":"string"},"prevCursor":{"description":"Opaque backward cursor. Pass as previousCursor on the next request to navigate backward. Absent when this is the first page.","type":"string"}},"type":"object"},"PendingTask":{"properties":{"actualDuration":{"description":"Actual duration taken for the task (e.g., \"7h\")","type":"string"},"createdAt":{"format":"int64","type":"integer"},"description":{"type":"string"},"executionContext":{"$ref":"#/components/schemas/PendingTaskExecutionContext"},"expectedDuration":{"description":"Expected duration in milliseconds","format":"int64","type":"integer"},"failureInfo":{"$ref":"#/components/schemas/FailureInfo"},"identifier":{"type":"string"},"lastUpdatedAt":{"format":"int64","type":"integer"},"name":{"type":"string"},"required":{"$ref":"#/components/schemas/StringOrBool"},"status":{"$ref":"#/components/schemas/ExecutionTaskStatus"},"taskExecutionId":{"description":"UUID of the task execution record","type":"string"},"triggeredBy":{"$ref":"#/components/schemas/TriggeredByDTO"},"userGroups":{"$ref":"#/components/schemas/StringOrStringArray"},"userReferenceId":{"description":"Identifier of the user directly assigned to this task","type":"string"}},"required":["identifier","name","status","required","userGroups","expectedDuration","executionContext"],"type":"object"},"PendingTaskExecutionContext":{"properties":{"activityExecutionId":{"type":"string"},"activityId":{"description":"Identifier (slug) of the activity definition","type":"string"},"activityName":{"description":"Name of the activity the task belongs to","type":"string"},"orgId":{"type":"string"},"phaseExecutionId":{"type":"string"},"phaseId":{"description":"Identifier (slug) of the phase definition","type":"string"},"phaseName":{"description":"Name of the phase","type":"string"},"processExecutionId":{"type":"string"},"processId":{"description":"Present when the task belongs to a directly-triggered process (no release)","type":"string"},"processName":{"description":"Name of the process definition","type":"string"},"projectId":{"type":"string"},"releaseId":{"description":"Present when the task belongs to a release","type":"string"},"releaseName":{"description":"Human-readable name of the release","type":"string"},"releaseVersion":{"description":"Version label of the release","type":"string"}},"required":["processExecutionId","phaseExecutionId","activityExecutionId"],"type":"object"},"FailureInfo":{"description":"Information about a failure that occurred","properties":{"code":{"description":"The failure code indicating the type of failure","type":"string"},"msg":{"description":"The failure message describing what went wrong","type":"string"}},"required":["msg"],"type":"object"},"StringOrBool":{"description":"Flexible type that accepts either a boolean or a string","oneOf":[{"description":"Boolean value","type":"boolean"},{"description":"String value","type":"string"}]},"ExecutionTaskStatus":{"description":"Current status of the execution task","enum":["TODO","IN_PROGRESS","SUCCEEDED","FAILED","BLOCKED"],"type":"string"},"TriggeredByDTO":{"description":"Details of the user who triggered the activity.","properties":{"avatar":{"description":"Avatar URL of the person.","type":"string"},"email":{"description":"Email of the person who triggered the activity.","type":"string"},"id":{"description":"Identifier of the person who triggered the activity.","type":"string"},"name":{"description":"Name of the person who triggered the activity.","type":"string"},"triggerType":{"$ref":"#/components/schemas/TriggerType"}},"type":"object"},"TriggerType":{"description":"Unit of time used for repeating releases.","enum":["MANUAL","WEBHOOK","WEBHOOK_CUSTOM","ARTIFACT","MANIFEST","SCHEDULER_CRON"],"type":"string"},"StringOrStringArray":{"description":"Flexible type that accepts either a single string or an array of strings for user references","oneOf":[{"description":"Reference as a string","type":"string"},{"description":"Array of references as strings","items":{"type":"string"},"type":"array"}]},"Error":{"description":"Error Response","properties":{"code":{"description":"canonical error code name","enum":["BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","INTERNAL_SERVER_ERROR"],"type":"string"},"explanation":{"description":"additional context about why the error occurred","type":"string"},"governanceMetadata":{"$ref":"#/components/schemas/GovernanceMetadata"},"message":{"description":"error message detail","type":"string"},"probable_fixes":{"description":"suggested actions to resolve the error","items":{"type":"string"},"type":"array"}},"required":["message"],"title":"Error Response","type":"object"},"GovernanceMetadata":{"properties":{"accountId":{"type":"string"},"action":{"type":"string"},"created":{"type":"string"},"deny":{"type":"boolean"},"details":{"items":{"$ref":"#/components/schemas/PolicySetMetadata"},"type":"array"},"entity":{"type":"string"},"id":{"type":"string"},"message":{"type":"string"},"orgId":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"string"},"type":{"type":"string"}},"type":"object"},"PolicySetMetadata":{"properties":{"accountId":{"type":"string"},"created":{"type":"string"},"deny":{"type":"boolean"},"description":{"type":"string"},"identifier":{"type":"string"},"orgId":{"type":"string"},"policyMetadata":{"items":{"$ref":"#/components/schemas/PolicyMetadata"},"type":"array"},"policySetId":{"type":"string"},"policySetName":{"type":"string"},"projectId":{"type":"string"},"status":{"type":"string"}},"type":"object"},"PolicyMetadata":{"properties":{"accountId":{"type":"string"},"created":{"type":"string"},"denyMessages":{"items":{"type":"string"},"type":"array"},"error":{"type":"string"},"identifier":{"type":"string"},"orgId":{"type":"string"},"policyId":{"type":"string"},"policyName":{"type":"string"},"projectId":{"type":"string"},"severity":{"type":"string"},"status":{"type":"string"},"updated":{"type":"string"}},"type":"object"}},"responses":{"ErrorResponse":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Error Response body"}}}}
```
