API to get Tasks based on query parameters

GET /cs-close-api/tasks

This API will be used for fetching the tasks based on the filter parameters as mentioned below. Defined parameters values will be considered as filter criteria and all parameters are non manadatory.

Query parameters

  • page integer(int32)

    The page define the current page number. It should be positive integer number and should start with minimum value 1.

    Minimum value is 1.

  • size integer(int32)

    The size define number of records on each page. It should be positive integer number between 1 to 10000.

    Minimum value is 1, maximum value is 10000.

  • sort array[string]

    The sort parameter accepts an array of strings, allowing for multiple sorting criteria. By default, sorting order is ascending.

  • name string

    The name parameter is an optional filter that allows you to narrow down the results based on specific name content.

  • entityId string

    Filter Tasks based on the entityId.

  • periodId string

    Filter Tasks based on the periodId. Period Id can be found using the api under period section which helps us to find the active periods.

  • priority string

    Filter Tasks based on the priority. If not provided, considered all priority tasks. You can pass the values from ENUM: High, Medium, Low and Unspecified.

  • critical string

    If critical set astrue, only critical tasks will be returned. Iffalse`, all tasks will be considered.

  • Filter Tasks based on the TaskTypeId. If not provided, considered all task types. You can fetch all ACTIVE Task Types using the api task-types under System Values section.

  • taskId string

    Filter Tasks based on the taskId.

  • status string

    Filter Tasks based on the status based on the enum defined.

  • inboxId string

    Filter Tasks based on the inboxId.

  • Filter Tasks based on a set of inboxId.

  • Filter Tasks based on the inboxType. Inbox Types can be U stands for User and Q stands for Queue.

  • Filter Tasks based on the actionPlanIds. We can pass mutiple actionIds.

  • Filter Tasks based on the dashboardRequest. dashboardRequest is by default false.

  • If set to true will return all assigned Tasks and If not, consider all the tasks which is assigned and not assigned.

  • Filter Tasks based on the dashboardIdList. Multiple dashboardIds are allowed.

  • Filter Tasks based on the descendantIds. Multiple descendantIds are allowed.

  • Filter Tasks based on the viewableTDIds. Multiple viewableTDIds are allowed.

  • include string

    Add include as CHILDREN for fetch tasks including the children details.

Responses

GET /cs-close-api/tasks
curl \
 --request GET 'http://close-service:8082/cs-close-api/tasks'
Response examples (200)
{
  "result": [
    {
      "id": 42,
      "logSid": 42,
      "name": "string",
      "number": "string",
      "wasCompletedLate": true,
      "currentAction": "string",
      "period": {
        "id": 42,
        "name": "string",
        "statusId": 42,
        "year": "string",
        "startDate": "2025-05-04T09:42:00Z"
      },
      "taskType": {
        "id": 42,
        "systemValueGroupId": 42,
        "name": "string",
        "shortName": "string",
        "exportValue": "string",
        "order": 42,
        "status": "ACTIVE"
      },
      "closeTaskDefinition": {
        "id": 42,
        "parentId": 42,
        "name": "string",
        "number": "string",
        "description": "string",
        "frequencyId": 42,
        "frequencyName": "string",
        "status": "ACTIVE",
        "type": "ENTITY",
        "entityId": 42,
        "entityName": "string",
        "collaboration": true,
        "critical": true,
        "closePackage": true,
        "taskTypeId": 42,
        "taskTypeName": "string",
        "attachmentRequired": true,
        "userDefinedFields": [
          {
            "id": 42,
            "udfDefinitionId": 42,
            "value": "string"
          }
        ]
      },
      "entityDefinitionId": 42,
      "entityName": "string",
      "snapshotId": 42,
      "snapshotParentId": 42,
      "status": {
        "id": "string",
        "name": "string"
      },
      "dueDate": "2025-05-04T09:42:00Z",
      "dateCompleted": "2025-05-04T09:42:00Z",
      "inboxReceiverDto": {
        "name": "string",
        "type": "string",
        "email": "string",
        "queueId": "string",
        "userName": "string"
      },
      "performer": {
        "id": 42,
        "name": "string",
        "email": "string",
        "userName": "string",
        "first": "string",
        "middle": "string",
        "last": "string"
      },
      "performerDueDate": "2025-05-04T09:42:00Z",
      "reviewer": {
        "id": 42,
        "name": "string",
        "email": "string",
        "userName": "string",
        "first": "string",
        "middle": "string",
        "last": "string"
      },
      "reviewerDueDate": "2025-05-04T09:42:00Z",
      "approver": {
        "id": 42,
        "name": "string",
        "email": "string",
        "userName": "string",
        "first": "string",
        "middle": "string",
        "last": "string"
      },
      "approverDueDate": "2025-05-04T09:42:00Z",
      "late": true
    }
  ],
  "metadata": {
    "totalElements": 42,
    "totalPages": 42,
    "first": true,
    "last": true,
    "empty": true,
    "numberOfElements": 42,
    "size": 42,
    "sorted": true
  }
}