View and delete tasks

In an agent portal, you can call APIs to list tasks that are open for an agent and provide a way to view the task details.

View a list of open tasks for the current user
To display a list of open tasks for the current user, call the following API:
GET /tasks?status=open&ownedByUser=true
View the task details
To view the details of a specific task, call the following API:
GET /tasks/systemID
View the resource associated with a task
A task resource is the container that the task is associated with. For example, when a task is associated with a customer, policy, or application, the API considers the customer, policy, or application to be a resource.
To view the resource that is associated with a task, call the following API:
  1. To view the details of a specific task, call the following API:
    GET /tasks/systemID
  2. From the API response, note the idRef and modelName values of the resource in the taskLinks section.
    {
      "taskListItems": [
        {
           ...
            "taskLinks": [
              {
                "id": "TaskLink-*********-*********",
                "idRef": "SystemID",
                "modelName": "Customer",
               ...
              }
            ],
    ...

    In this example, the idRef field specifies the systemID and the modelName is the resource or container type that the task is associated with.

  3. To view the resource, call the appropriate API. For example, to view a customer resource, call GET /customers/{systemID}
Delete a task
To change the status of a task to deleted, call the following API:
GET /tasks/systemID/deleteRequest