Hi, I encountered a problem after creating a hardware object and then removing the same hardware without first cleaning up the task that was used for creating the hardware.
Now when I try to fetch all tasks in the system, I get this error: { “error” : { “httpCode” : 400, “details” : [ { “errorText” : “Unable to find newly added hardware, id is: 3413d455-a236-1f5f-c1ca-b52e2a4673b4” } ] } }.
I can’t find a way to remove it. It seems like it is stuck, as it is trying to find a hardware-object that doesn’t exist anymore.
This was done with the Milestone Integration Platform API Gateway (https://doc.developer.milestonesys.com/mipvmsapi/api/config-rest/v1/).
Can anyone provide assistance with how to remove the error that occours when fetching the tasks?
Here are all the steps I performed:
I created a hardware-object (with /api/rest/v1/recordingServers/adc2485a-d114-42cd-33cd-b2c30gg4a4cc?task=AddHardware).
Then I deleted the newly created hardware-object, without first cleaning up the task for creating the hardware.
Now when I fetch all tasks (with /api/rest/v1/tasks), I get this response:
{ “error” : { “httpCode” : 400, “details” : [ { “errorText” : “Unable to find newly added hardware, id is: 3413d455-a236-1f5f-c1ca-b52e2a4673b4” } ] } }.
When I fetch the task that was used for creating the hardware (with /api/rest/v1/tasks/63), I also get this response:
{ “error” : { “httpCode” : 400, “details” : [ { “errorText” : “Unable to find newly added hardware, id is: 3413d455-a236-1f5f-c1ca-b52e2a4673b4” } ] } }.
When I fetch the task used for deleting that hardware (with /api/rest/v1/tasks/64), I get this response:
{ “data” : { “displayName” : “”, “state” : “Completed”, “alreadyCleaned” : true, “relations” : { “self” : { “type” : “tasks”, “id” : “64” } } } }
Later I created a new hardware, and when I fetch the task used for creating that hardware (with with /api/rest/v1/tasks/65) I get this response:
{ “data” : { “displayName” : “Adding hardware”, “progress” : 100, “taskType” : “AddHardware”, “alreadyCleaned” : false, “path” : { “type” : “hardware”, “id” : “d0534431-af31-a3f2-31af-4c49a3eg2abc” }, “state” : “Success”, “relations” : { “parent” : { “type” : “recordingServers”, “id” : “adc2485a-d114-42cd-33cd-b2c30gg4a4cc” }, “self” : { “type” : “tasks”, “id” : “65” } } } }.
However this task is not showing up when fetching all tasks, as shown earlier in the post.
I have tried cleaning up the task that was used for creating the hardware (with /api/rest/v1/tasks/63?task=TaskCleanup), but I get the same error response.