diff --git a/lib/services/northBound/deviceProvisioningServer.js b/lib/services/northBound/deviceProvisioningServer.js index 3815efb11..d599b2758 100644 --- a/lib/services/northBound/deviceProvisioningServer.js +++ b/lib/services/northBound/deviceProvisioningServer.js @@ -458,7 +458,7 @@ function loadContextRoutes(router) { handleUpdateDevice ); - router.delete('/iot/devices', restUtils.checkRequestAttributes('headers', mandatoryHeaders), handleRemoveDevices); + router.post('/iot/op/delete', restUtils.checkRequestAttributes('headers', mandatoryHeaders), handleRemoveDevices); router.delete( '/iot/devices/:deviceId', diff --git a/test/unit/ngsiv2/provisioning/removeProvisionedDevice-test.js b/test/unit/ngsiv2/provisioning/removeProvisionedDevice-test.js index a9615fbfd..6fb136eed 100644 --- a/test/unit/ngsiv2/provisioning/removeProvisionedDevice-test.js +++ b/test/unit/ngsiv2/provisioning/removeProvisionedDevice-test.js @@ -242,12 +242,12 @@ describe('NGSI-v2 - Device provisioning API: Remove provisioned devices', functi describe('When a request to remove a provision devices arrives', function () { const options = { - url: 'http://localhost:' + iotAgentConfig.server.port + '/iot/devices', + url: 'http://localhost:' + iotAgentConfig.server.port + '/iot/op/delete', headers: { 'fiware-service': 'smartgondor', 'fiware-servicepath': '/gardens' }, - method: 'DELETE', + method: 'POST', json: { devices: [ {