Cancel usertask using camunda rest api

We have a requirement , where after the creation of processInstanceId of workflow which contains [UserTask/ Message evet] , at some point we dont want to continue the flow , we have to cancel it or stop the execution, For this we tried with below apis,

API1:

URL: http://abc.com/rom-microworkflow-manager-svc/engine-rest/engine/microworkflow/process-instance/11350968/activity-instances

method: get

RESPONSE:
{
“id”: “11350968”,
“parentActivityInstanceId”: null,
“activityId”: “PicklistInvId:6:11345622”,
“activityType”: “processDefinition”,
“processInstanceId”: “11350968”,
“processDefinitionId”: “PicklistInvId:6:11345622”,
“childActivityInstances”: [
{
“id”: “Event_1apvk10:11351019”,
“parentActivityInstanceId”: “11350968”,
“activityId”: “Event_1apvk10”,
“activityType”: “intermediateMessageCatch”,
“processInstanceId”: “11350968”,
“processDefinitionId”: “PicklistInvId:6:11345622”,
“childActivityInstances”: [],
“childTransitionInstances”: [],
“executionIds”: [
“11351017”
],
“activityName”: null,
“incidentIds”: [],
“incidents”: [],
“name”: null
}
],
“childTransitionInstances”: [],
“executionIds”: [
“11350968”
],
“activityName”: “PICKLIST_FROM_INVENTORY”,
“incidentIds”: [],
“incidents”: [],
“name”: “PICKLIST_FROM_INVENTORY”
}

API2:

URL: http://abc.com/rom-microworkflow-manager-svc/engine-rest/engine/microworkflow/process-instance/11350968/modify

method: post

REQUEST:
{
“id”: “11350968”,
“skipCustomListeners”: true,
“skipIoMappings”: true,
“instructions”: [
{
“type”: “cancel”,
“activityInstanceId”: “Event_1apvk10:11351019”
}
]
}

RESPONSE:
{
“type”: “NotFoundException”,
“message”: “HTTP 404 Not Found”
}

we chked the data in below tables
ACT_HI_PROCINST, ACT_RU_EXECUTION

SELECT * FROM rom.ACT_HI_PROCINST where ID_=‘11350968’;
ID_, PROC_INST_ID_, BUSINESS_KEY_, PROC_DEF_KEY_, PROC_DEF_ID_, START_TIME_, END_TIME_, REMOVAL_TIME_, DURATION_, START_USER_ID_, START_ACT_ID_, END_ACT_ID_, SUPER_PROCESS_INSTANCE_ID_, ROOT_PROC_INST_ID_, SUPER_CASE_INSTANCE_ID_, CASE_INST_ID_, DELETE_REASON_, TENANT_ID_, STATE_
‘11350968’, ‘11350968’, NULL, ‘PicklistInvId’, ‘PicklistInvId:6:11345622’, ‘2022-10-26 13:30:16’, NULL, NULL, NULL, NULL, ‘StartEvent_1’, NULL, NULL, ‘11350968’, NULL, NULL, NULL, NULL, ‘ACTIVE’

SELECT * FROM rom.ACT_RU_EXECUTION where PROC_INST_ID_=‘11350968’;
ID_, REV_, ROOT_PROC_INST_ID_, PROC_INST_ID_, BUSINESS_KEY_, PARENT_ID_, PROC_DEF_ID_, SUPER_EXEC_, SUPER_CASE_EXEC_, CASE_INST_ID_, ACT_ID_, ACT_INST_ID_, IS_ACTIVE_, IS_CONCURRENT_, IS_SCOPE_, IS_EVENT_SCOPE_, SUSPENSION_STATE_, CACHED_ENT_STATE_, SEQUENCE_COUNTER_, TENANT_ID_
‘11350968’, ‘1’, ‘11350968’, ‘11350968’, NULL, NULL, ‘PicklistInvId:6:11345622’, NULL, NULL, NULL, NULL, ‘11350968’, ‘0’, ‘0’, ‘1’, ‘0’, ‘1’, ‘16’, ‘8’, NULL
‘11351017’, ‘1’, NULL, ‘11350968’, NULL, ‘11350968’, ‘PicklistInvId:6:11345622’, NULL, NULL, NULL, ‘Event_1apvk10’, ‘Event_1apvk10:11351019’, ‘1’, ‘0’, ‘1’, ‘0’, ‘1’, ‘1’, ‘9’, NULL

Please let un know if we are missing anything.