Skip to content

Update a task

Request

Beta
OAuth 2.0 scope:
  • okta.accessRequests.tasks.manage
Admin roles:
  • ACCESS_REQUESTS_ADMIN

Updates a task by performing actions such as assigning the task to a new set of task assignees.

When you reassign a task, all previous task assignees are replaced with the new set of assignees.

Path
taskIdstring, (task-id), = 24 characters(task-id)^[0-9a-f]{24}$required

The id of the task

Example:68b0a1576dd8db837f5ee55d
Bodyapplication/jsonrequired
assigneesArray of objects, non-empty(task-assignees)

List of task assignees to perform actions on the task. A maximum of 10 assignees can be assigned to a task.

PATCH
/governance/api/v2/tasks/{taskId}
curl -i -X PATCH \
  https://okta-subdomain.pixtulate.com/governance/api/v2/tasks/68b0a1576dd8db837f5ee55d \
  -H 'Content-Type: application/json' \
  -d '{
    "assignees": [
      {
        "externalId": "00u1a2b3c4d5e6f7g8h9",
        "type": "OKTA_USER"
      }
    ]
  }'

Responses

A successful update task response

Headers
X-Rate-Limit-Limitinteger, >= 1required

The rate-limit ceiling for the current request

Example:60
X-Rate-Limit-Remaininginteger, >= 0required

The number of requests left for the current rate-limit window

Example:60
X-Rate-Limit-Resetinteger, >= 0required

The time when the rate limit resets, specified in UTC epoch time (in seconds)

Example:1609459200
Bodyapplication/json
idstring, (task-id), = 24 characters(task-id)^[0-9a-f]{24}$required

The unique identifier for the task

Example:"68b0a1576dd8db837f5ee55d"
assigneesArray of objects(task-assignees)required

List of task assignees that perform actions on the task

statusstring(task-status)required

The status of the task

Enum:"OPEN""COMPLETED""ASSIGNING""LOCKED"
labelstring, non-emptyrequired

Human readable label for the task

requestIdstring, = 20 characters(task-request-id)required

The request ID associated with the task

createdAtstring, (date-time)(task-created-at)read-onlyrequired

The ISO 8601 formatted date and time when the object was created

updatedAtstring, (date-time)(task-updated-at)read-onlyrequired

The ISO 8601 formatted date and time when the object was last updated

typestring(task-type)required

The type of the task

Enum:"QUESTION""APPROVAL""TODO"
valuestring or null

The value of the task completion that's determined by the assignee

isEscalatedboolean(task-is-escalated)

Indicates whether a task is escalated to another user. See Escalate Tasks in the product documentation.

isDelegatedboolean(task-is-delegated)

Indicates whether a task is delegated to another user. See Governance delegates in the product documentation.

originalAssigneeIdstring or null, (okta-user-id), >= 20 characters

ID of the original assignee before delegation or escalation

completedByobject(task-completed-by)

The assignee who fulfilled the task

Response
Task assignees were successfully updated. The response includes the updated task assignee details
{ "id": "68b0ed9802df442e8b601807", "assignees": [ {}, {} ], "status": "OPEN", "label": "This is an approval task", "requestId": "req42kjDgk1EubTwo0g4", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "type": "APPROVAL" }