WORKFORCEOS

FRONTEND GUIDE FOR AI CODING AGENTS - PART 10 - TaskManagement Service

This document is a part of a REST API guide for the workforceos project. It is designed for AI agents that will generate frontend code to consume the project’s backend.

This document provides extensive instruction for the usage of taskManagement

Service Access

TaskManagement service management is handled through service specific base urls.

TaskManagement service may be deployed to the preview server, staging server, or production server. Therefore,it has 3 access URLs. The frontend application must support all deployment environments during development, and the user should be able to select the target API server on the login page (already handled in first part.).

For the taskManagement service, the base URLs are:

Tenant URL Prefix and Header Forwarding

Tenant context is resolved by frontend routing strategy:

Then backend API calls must always claim target tenant with header:

headers["mbx-company-codename"] = tenantCodenameFromUrl;

URL prefix/subdomain is frontend-only tenant selection. Use header forwarding for all tenant-scoped calls to taskManagement service.

Scope

TaskManagement Service Description

Handles creation, assignment, update, and tracking of tasks tied to employees, shifts, or departments. Supports admins/managers assigning tasks; employees viewing and completing tasks; accountability tracking. Exposes APIs for creating, updating, deleting, and listing tasks with data enrichment. Data is .company-tenant-scoped…

TaskManagement service provides apis and business logic for following data objects in workforceos application. Each data object may be either a central domain of the application data structure or a related helper data object for a central concept. Note that data object concept is equal to table concept in the database, in the service database each data object is represented as a db table scheme and the object instances as table rows.

taskAssignment Data Object: Main task assignment created by admins/managers. Defines the task template and target recipients (users/departments). Individual tasks are auto-generated for each employee from this assignment.

individualTask Data Object: Individual task record assigned to a single employee. Created automatically when a taskAssignment is created. Each employee works on their own copy and can mark it complete independently.

TaskManagement Service Frontend Description By The Backend Architect

taskManagement Service Communication

API Structure

Object Structure of a Successful Response

When the service processes requests successfully, it wraps the requested resource(s) within a JSON envelope. This envelope includes the data and essential metadata such as configuration details and pagination information, providing context to the client.

HTTP Status Codes:

Success Response Format:

For successful operations, the response includes a "status": "OK" property, signaling that the request executed successfully. The structure of a successful response is outlined below:

{
  "status":"OK",
  "statusCode": 200,   
  "elapsedMs":126,
  "ssoTime":120,
  "source": "db",
  "cacheKey": "hexCode",
  "userId": "ID",
  "sessionId": "ID",
  "requestId": "ID",
  "dataName":"products",
  "method":"GET",
  "action":"list",
  "appVersion":"Version",
  "rowCount":3,
  "products":[{},{},{}],
  "paging": {
    "pageNumber":1, 
    "pageRowCount":25, 
    "totalRowCount":3,
    "pageCount":1
  },
  "filters": [],
  "uiPermissions": []
}

Additional Data

Each API may include additional data besides the main data object, depending on the business logic of the API. These will be provided in each API’s response signature.

Error Response

If a request encounters an issue—whether due to a logical fault or a technical problem—the service responds with a standardized JSON error structure. The HTTP status code indicates the nature of the error, using commonly recognized codes for clarity:

Each error response is structured to provide meaningful insight into the problem, assisting in efficient diagnosis and resolution.

{
  "result": "ERR",
  "status": 400,
  "message": "errMsg_organizationIdisNotAValidID",
  "errCode": 400,
  "date": "2024-03-19T12:13:54.124Z",
  "detail": "String"
}

TaskAssignment Data Object

Main task assignment created by admins/managers. Defines the task template and target recipients (users/departments). Individual tasks are auto-generated for each employee from this assignment.

TaskAssignment Data Object Properties

TaskAssignment data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
title String false Yes No Task title visible to all assignees
description Text false No No Detailed task description
dueTime Date false No No Deadline for task completion
status Enum false Yes No Assignment status: active (distributing to employees) or cancelled (admin cancelled the whole assignment)
assignerId ID false Yes No User who created this task assignment
assigneeUserIds ID true No No Direct user assignments - these users will receive individual tasks
assignedDepartmentIds ID true No No Department assignments - all users in these departments will receive individual tasks
shiftId ID false No No Optional shift link for the task
companyId ID false Yes No An ID value to represent the tenant id of the company

Array Properties

assigneeUserIds assignedDepartmentIds

Array properties can hold multiple values. Array properties should be respected according to their multiple structure in the frontend in any user input for them. Please use multiple input components for the array proeprties when needed.

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

Relation Properties

assignerId assigneeUserIds assignedDepartmentIds shiftId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a sibling object, meaning that the relation is a many-to-one or one-to-one relationship from this object to the target.

Required: Yes

The target object is a sibling object, meaning that the relation is a many-to-one or one-to-one relationship from this object to the target.

Required: No

The target object is a sibling object, meaning that the relation is a many-to-one or one-to-one relationship from this object to the target.

Required: No

The target object is a sibling object, meaning that the relation is a many-to-one or one-to-one relationship from this object to the target.

Required: No

Filter Properties

title dueTime status assignerId assigneeUserIds assignedDepartmentIds shiftId companyId

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

IndividualTask Data Object

Individual task record assigned to a single employee. Created automatically when a taskAssignment is created. Each employee works on their own copy and can mark it complete independently.

IndividualTask Data Object Properties

IndividualTask data object has got following properties that are represented as table fields in the database scheme. These properties don’t stand just for data storage, but each may have different settings to manage the business logic.

Property Type IsArray Required Secret Description
taskAssignmentId ID false Yes No Reference to the parent task assignment
assigneeUserId ID false Yes No The employee who receives this individual task
title String false Yes No Task title (copied from parent assignment)
description Text false No No Task description (copied from parent assignment)
status Enum false Yes No Individual task status: pending, completed, or cancelled
completedTime Date false No No When this employee completed their task
dueTime Date false No No Deadline for completion (copied from parent)
companyId ID false Yes No An ID value to represent the tenant id of the company

Enum Properties

Enum properties are defined with a set of allowed values, ensuring that only valid options can be assigned to them. The enum options value will be stored as strings in the database, but when a data object is created an additional property with the same name plus an idx suffix will be created, which will hold the index of the selected enum option. You can use the {fieldName_idx} property to sort by the enum value or when your enum options represent a hiyerarchy of values. In the frontend input components, enum type properties should only accept values from an option component that lists the enum options.

Relation Properties

assigneeUserId

Mindbricks supports relations between data objects, allowing you to define how objects are linked together. The relations may reference to a data object either in this service or in another service. Id the reference is remote, backend handles the relations through service communication or elastic search. These relations should be respected in the frontend so that instaead of showing the related objects id, the frontend should list human readable values from other data objects. If the relation points to another service, frontend should use the referenced service api in case it needs related data. The relation logic is montly handled in backend so the api responses feeds the frontend about the relational data. In mmost cases the api response will provide the relational data as well as the main one.

In frontend, please ensure that,

1- instaead of these relational ids you show the main human readable field of the related target data (like name), 2- if this data object needs a user input of these relational ids, you should provide a combobox with the list of possible records or (a searchbox) to select with the realted target data object main human readable field.

The target object is a sibling object, meaning that the relation is a many-to-one or one-to-one relationship from this object to the target.

Required: Yes

Filter Properties

taskAssignmentId assigneeUserId status dueTime companyId

Filter properties are used to define parameters that can be used in query filters, allowing for dynamic data retrieval based on user input or predefined criteria. These properties are automatically mapped as API parameters in the listing API’s.

Default CRUD APIs

For each data object, the backend architect may designate default APIs for standard operations (create, update, delete, get, list). These are the APIs that frontend CRUD forms and AI agents should use for basic record management. If no default is explicitly set (isDefaultApi), the frontend generator auto-discovers the most general API for each operation.

TaskAssignment Default APIs

Operation API Name Route Explicitly Set
Create createTaskAssignment /v1/taskassignments Auto
Update updateTaskAssignment /v1/taskassignments/:taskAssignmentId Auto
Delete deleteTaskAssignment /v1/taskassignments/:taskAssignmentId Auto
Get getTaskAssignmentWithProgress /v1/taskassignmentwithprogress/:taskAssignmentId Auto
List listTaskAssignments /v1/taskassignments Auto

IndividualTask Default APIs

Operation API Name Route Explicitly Set
Create createIndividualTask /v1/individualtasks Auto
Update updateIndividualTask /v1/individualtasks/:individualTaskId Auto
Delete deleteIndividualTask /v1/individualtasks/:individualTaskId Auto
Get getMyIndividualTask /v1/myindividualtask/:individualTaskId Auto
List listMyIndividualTasks /v1/myindividualtasks Auto

When building CRUD forms for a data object, use the default create/update APIs listed above. The form fields should correspond to the API’s body parameters. For relation fields, render a dropdown loaded from the related object’s list API using the display label property.

API Reference

Create Taskassignment API

Admin/Manager creates a task assignment. System automatically creates individual task records for all assigned users (direct + from departments) with deduplication.

Rest Route

The createTaskAssignment API REST controller can be triggered via the following route:

/v1/taskassignments

Rest Request Parameters

The createTaskAssignment api has got 7 regular request parameters

Parameter Type Required Population
title String true request.body?.[“title”]
description Text false request.body?.[“description”]
dueTime Date false request.body?.[“dueTime”]
status Enum true request.body?.[“status”]
assigneeUserIds ID false request.body?.[“assigneeUserIds”]
assignedDepartmentIds ID false request.body?.[“assignedDepartmentIds”]
shiftId ID false request.body?.[“shiftId”]
title : Task title visible to all assignees
description : Detailed task description
dueTime : Deadline for task completion
status : Assignment status: active (distributing to employees) or cancelled (admin cancelled the whole assignment)
assigneeUserIds : Direct user assignments - these users will receive individual tasks
assignedDepartmentIds : Department assignments - all users in these departments will receive individual tasks
shiftId : Optional shift link for the task

REST Request To access the api you can use the REST controller with the path POST /v1/taskassignments

  axios({
    method: 'POST',
    url: '/v1/taskassignments',
    data: {
            title:"String",  
            description:"Text",  
            dueTime:"Date",  
            status:"Enum",  
            assigneeUserIds:"ID",  
            assignedDepartmentIds:"ID",  
            shiftId:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "taskAssignment",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"taskAssignment": {
		"id": "ID",
		"title": "String",
		"description": "Text",
		"dueTime": "Date",
		"status": "Enum",
		"status_idx": "Integer",
		"assignerId": "ID",
		"assigneeUserIds": "ID",
		"assignedDepartmentIds": "ID",
		"shiftId": "ID",
		"companyId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Myindividualtasks API

Employee lists their own individual tasks. Returns tasks assigned to the current user with optional filtering by status.

Rest Route

The listMyIndividualTasks API REST controller can be triggered via the following route:

/v1/myindividualtasks

Rest Request Parameters

Filter Parameters

The listMyIndividualTasks api supports 4 optional filter parameters for filtering list results:

taskAssignmentId (ID): Reference to the parent task assignment

assigneeUserId (ID): The employee who receives this individual task

status (Enum): Individual task status: pending, completed, or cancelled

dueTime (Date): Deadline for completion (copied from parent)

REST Request To access the api you can use the REST controller with the path GET /v1/myindividualtasks

  axios({
    method: 'GET',
    url: '/v1/myindividualtasks',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // taskAssignmentId: '<value>' // Filter by taskAssignmentId
        // assigneeUserId: '<value>' // Filter by assigneeUserId
        // status: '<value>' // Filter by status
        // dueTime: '<value>' // Filter by dueTime
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "individualTasks",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"individualTasks": [
		{
			"id": "ID",
			"taskAssignmentId": "ID",
			"assigneeUserId": "ID",
			"title": "String",
			"description": "Text",
			"status": "Enum",
			"status_idx": "Integer",
			"completedTime": "Date",
			"dueTime": "Date",
			"companyId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID",
			"taskAssignment": {
				"title": "String",
				"description": "Text",
				"dueTime": "Date",
				"status": "Enum",
				"status_idx": "Integer",
				"assignerId": "ID",
				"assigneeUserIds": "ID",
				"assignedDepartmentIds": "ID",
				"shiftId": "ID",
				"isActive": true,
				"createdAt": "Date",
				"updatedAt": "Date"
			}
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Get Taskassignmentwithprogress API

Admin/Manager views a task assignment with completion progress. Returns the assignment details along with aggregated stats and list of individual tasks with their completion status.

Rest Route

The getTaskAssignmentWithProgress API REST controller can be triggered via the following route:

/v1/taskassignmentwithprogress/:taskAssignmentId

Rest Request Parameters

The getTaskAssignmentWithProgress api has got 1 regular request parameter

Parameter Type Required Population
taskAssignmentId ID true request.params?.[“taskAssignmentId”]
taskAssignmentId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/taskassignmentwithprogress/:taskAssignmentId

  axios({
    method: 'GET',
    url: `/v1/taskassignmentwithprogress/${taskAssignmentId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "taskAssignment",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"taskAssignment": {
		"id": "ID",
		"title": "String",
		"description": "Text",
		"dueTime": "Date",
		"status": "Enum",
		"status_idx": "Integer",
		"assignerId": "ID",
		"assigneeUserIds": "ID",
		"assignedDepartmentIds": "ID",
		"shiftId": "ID",
		"companyId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Get Myindividualtask API

Employee views a single individual task. Only returns the task if it belongs to the current user.

Rest Route

The getMyIndividualTask API REST controller can be triggered via the following route:

/v1/myindividualtask/:individualTaskId

Rest Request Parameters

The getMyIndividualTask api has got 1 regular request parameter

Parameter Type Required Population
individualTaskId ID true request.params?.[“individualTaskId”]
individualTaskId : This id paremeter is used to query the required data object.

REST Request To access the api you can use the REST controller with the path GET /v1/myindividualtask/:individualTaskId

  axios({
    method: 'GET',
    url: `/v1/myindividualtask/${individualTaskId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "individualTask",
	"method": "GET",
	"action": "get",
	"appVersion": "Version",
	"rowCount": 1,
	"individualTask": {
		"id": "ID",
		"taskAssignmentId": "ID",
		"assigneeUserId": "ID",
		"title": "String",
		"description": "Text",
		"status": "Enum",
		"status_idx": "Integer",
		"completedTime": "Date",
		"dueTime": "Date",
		"companyId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

List Taskassignments API

Admin/Manager lists all task assignments in the company. Supports filtering by status, assigner, and due date.

Rest Route

The listTaskAssignments API REST controller can be triggered via the following route:

/v1/taskassignments

Rest Request Parameters

Filter Parameters

The listTaskAssignments api supports 9 optional filter parameters for filtering list results:

title (String): Task title visible to all assignees

dueTime (Date): Deadline for task completion

status (Enum): Assignment status: active (distributing to employees) or cancelled (admin cancelled the whole assignment)

assignerId (ID): User who created this task assignment

assigneeUserIds (ID array): Direct user assignments - these users will receive individual tasks

assigneeUserIds_op (String): Operator for filtering array property “assigneeUserIds”. Use “contains” to check if array contains the value, or “overlap” to check if arrays have common elements.

assignedDepartmentIds (ID array): Department assignments - all users in these departments will receive individual tasks

assignedDepartmentIds_op (String): Operator for filtering array property “assignedDepartmentIds”. Use “contains” to check if array contains the value, or “overlap” to check if arrays have common elements.

shiftId (ID): Optional shift link for the task

REST Request To access the api you can use the REST controller with the path GET /v1/taskassignments

  axios({
    method: 'GET',
    url: '/v1/taskassignments',
    data: {
    
    },
    params: {
    
        // Filter parameters (see Filter Parameters section above)
        // title: '<value>' // Filter by title
        // dueTime: '<value>' // Filter by dueTime
        // status: '<value>' // Filter by status
        // assignerId: '<value>' // Filter by assignerId
        // assigneeUserIds: '<value>' // Filter by assigneeUserIds
        // assigneeUserIds_op: '<value>' // Filter by assigneeUserIds_op
        // assignedDepartmentIds: '<value>' // Filter by assignedDepartmentIds
        // assignedDepartmentIds_op: '<value>' // Filter by assignedDepartmentIds_op
        // shiftId: '<value>' // Filter by shiftId
            }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "taskAssignments",
	"method": "GET",
	"action": "list",
	"appVersion": "Version",
	"rowCount": "\"Number\"",
	"taskAssignments": [
		{
			"id": "ID",
			"title": "String",
			"description": "Text",
			"dueTime": "Date",
			"status": "Enum",
			"status_idx": "Integer",
			"assignerId": "ID",
			"assigneeUserIds": "ID",
			"assignedDepartmentIds": "ID",
			"shiftId": "ID",
			"companyId": "ID",
			"isActive": true,
			"recordVersion": "Integer",
			"createdAt": "Date",
			"updatedAt": "Date",
			"_owner": "ID"
		},
		{},
		{}
	],
	"paging": {
		"pageNumber": "Number",
		"pageRowCount": "NUmber",
		"totalRowCount": "Number",
		"pageCount": "Number"
	},
	"filters": [],
	"uiPermissions": []
}

Delete Taskassignment API

Rest Route

The deleteTaskAssignment API REST controller can be triggered via the following route:

/v1/taskassignments/:taskAssignmentId

Rest Request Parameters

The deleteTaskAssignment api has got 1 regular request parameter

Parameter Type Required Population
taskAssignmentId ID true request.params?.[“taskAssignmentId”]
taskAssignmentId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/taskassignments/:taskAssignmentId

  axios({
    method: 'DELETE',
    url: `/v1/taskassignments/${taskAssignmentId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "taskAssignment",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"taskAssignment": {
		"id": "ID",
		"title": "String",
		"description": "Text",
		"dueTime": "Date",
		"status": "Enum",
		"status_idx": "Integer",
		"assignerId": "ID",
		"assigneeUserIds": "ID",
		"assignedDepartmentIds": "ID",
		"shiftId": "ID",
		"companyId": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Individualtask API

Rest Route

The updateIndividualTask API REST controller can be triggered via the following route:

/v1/individualtasks/:individualTaskId

Rest Request Parameters

The updateIndividualTask api has got 5 regular request parameters

Parameter Type Required Population
individualTaskId ID true request.params?.[“individualTaskId”]
title String false request.body?.[“title”]
description Text false request.body?.[“description”]
status Enum false request.body?.[“status”]
dueTime Date false request.body?.[“dueTime”]
individualTaskId : This id paremeter is used to select the required data object that will be updated
title : Task title (copied from parent assignment)
description : Task description (copied from parent assignment)
status : Individual task status: pending, completed, or cancelled
dueTime : Deadline for completion (copied from parent)

REST Request To access the api you can use the REST controller with the path PATCH /v1/individualtasks/:individualTaskId

  axios({
    method: 'PATCH',
    url: `/v1/individualtasks/${individualTaskId}`,
    data: {
            title:"String",  
            description:"Text",  
            status:"Enum",  
            dueTime:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "individualTask",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"individualTask": {
		"id": "ID",
		"taskAssignmentId": "ID",
		"assigneeUserId": "ID",
		"title": "String",
		"description": "Text",
		"status": "Enum",
		"status_idx": "Integer",
		"completedTime": "Date",
		"dueTime": "Date",
		"companyId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Update Taskassignment API

Rest Route

The updateTaskAssignment API REST controller can be triggered via the following route:

/v1/taskassignments/:taskAssignmentId

Rest Request Parameters

The updateTaskAssignment api has got 8 regular request parameters

Parameter Type Required Population
taskAssignmentId ID true request.params?.[“taskAssignmentId”]
title String false request.body?.[“title”]
description Text false request.body?.[“description”]
dueTime Date false request.body?.[“dueTime”]
status Enum false request.body?.[“status”]
assigneeUserIds ID false request.body?.[“assigneeUserIds”]
assignedDepartmentIds ID false request.body?.[“assignedDepartmentIds”]
shiftId ID false request.body?.[“shiftId”]
taskAssignmentId : This id paremeter is used to select the required data object that will be updated
title : Task title visible to all assignees
description : Detailed task description
dueTime : Deadline for task completion
status : Assignment status: active (distributing to employees) or cancelled (admin cancelled the whole assignment)
assigneeUserIds : Direct user assignments - these users will receive individual tasks
assignedDepartmentIds : Department assignments - all users in these departments will receive individual tasks
shiftId : Optional shift link for the task

REST Request To access the api you can use the REST controller with the path PATCH /v1/taskassignments/:taskAssignmentId

  axios({
    method: 'PATCH',
    url: `/v1/taskassignments/${taskAssignmentId}`,
    data: {
            title:"String",  
            description:"Text",  
            dueTime:"Date",  
            status:"Enum",  
            assigneeUserIds:"ID",  
            assignedDepartmentIds:"ID",  
            shiftId:"ID",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "taskAssignment",
	"method": "PATCH",
	"action": "update",
	"appVersion": "Version",
	"rowCount": 1,
	"taskAssignment": {
		"id": "ID",
		"title": "String",
		"description": "Text",
		"dueTime": "Date",
		"status": "Enum",
		"status_idx": "Integer",
		"assignerId": "ID",
		"assigneeUserIds": "ID",
		"assignedDepartmentIds": "ID",
		"shiftId": "ID",
		"companyId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Create Individualtask API

Rest Route

The createIndividualTask API REST controller can be triggered via the following route:

/v1/individualtasks

Rest Request Parameters

The createIndividualTask api has got 7 regular request parameters

Parameter Type Required Population
taskAssignmentId ID true request.body?.[“taskAssignmentId”]
assigneeUserId ID true request.body?.[“assigneeUserId”]
title String true request.body?.[“title”]
description Text false request.body?.[“description”]
status Enum true request.body?.[“status”]
completedTime Date false request.body?.[“completedTime”]
dueTime Date false request.body?.[“dueTime”]
taskAssignmentId : Reference to the parent task assignment
assigneeUserId : The employee who receives this individual task
title : Task title (copied from parent assignment)
description : Task description (copied from parent assignment)
status : Individual task status: pending, completed, or cancelled
completedTime : When this employee completed their task
dueTime : Deadline for completion (copied from parent)

REST Request To access the api you can use the REST controller with the path POST /v1/individualtasks

  axios({
    method: 'POST',
    url: '/v1/individualtasks',
    data: {
            taskAssignmentId:"ID",  
            assigneeUserId:"ID",  
            title:"String",  
            description:"Text",  
            status:"Enum",  
            completedTime:"Date",  
            dueTime:"Date",  
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "201",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "individualTask",
	"method": "POST",
	"action": "create",
	"appVersion": "Version",
	"rowCount": 1,
	"individualTask": {
		"id": "ID",
		"taskAssignmentId": "ID",
		"assigneeUserId": "ID",
		"title": "String",
		"description": "Text",
		"status": "Enum",
		"status_idx": "Integer",
		"completedTime": "Date",
		"dueTime": "Date",
		"companyId": "ID",
		"isActive": true,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

Delete Individualtask API

Rest Route

The deleteIndividualTask API REST controller can be triggered via the following route:

/v1/individualtasks/:individualTaskId

Rest Request Parameters

The deleteIndividualTask api has got 1 regular request parameter

Parameter Type Required Population
individualTaskId ID true request.params?.[“individualTaskId”]
individualTaskId : This id paremeter is used to select the required data object that will be deleted

REST Request To access the api you can use the REST controller with the path DELETE /v1/individualtasks/:individualTaskId

  axios({
    method: 'DELETE',
    url: `/v1/individualtasks/${individualTaskId}`,
    data: {
    
    },
    params: {
    
        }
  });

REST Response

{
	"status": "OK",
	"statusCode": "200",
	"elapsedMs": 126,
	"ssoTime": 120,
	"source": "db",
	"cacheKey": "hexCode",
	"userId": "ID",
	"sessionId": "ID",
	"requestId": "ID",
	"dataName": "individualTask",
	"method": "DELETE",
	"action": "delete",
	"appVersion": "Version",
	"rowCount": 1,
	"individualTask": {
		"id": "ID",
		"taskAssignmentId": "ID",
		"assigneeUserId": "ID",
		"title": "String",
		"description": "Text",
		"status": "Enum",
		"status_idx": "Integer",
		"completedTime": "Date",
		"dueTime": "Date",
		"companyId": "ID",
		"isActive": false,
		"recordVersion": "Integer",
		"createdAt": "Date",
		"updatedAt": "Date",
		"_owner": "ID"
	}
}

After this prompt, the user may give you new instructions to update the output of this prompt or provide subsequent prompts about the project.