Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

After unbinding all devices from the gateway, use the Device delete method to delete the gateway, specifying the ID of the gateway you want to delete.

...

Deleting a gateway code samples

Node.js
Code Block
// const cloudRegion = 'us-central1';
// const projectId = 'adjective-noun-123';
// const registryId = 'my-registry';
import { DeviceManagerClient } from '@clearblade/iot';

const iotClient = new DeviceManagerClient({
  // optional auth parameters.
});

async function deleteDevice() {
  // Construct request
  const devPath = iotClient.devicePath(projectId, cloudRegion, registryId, deviceId);

  const [responses] = await iotClient.deleteDevice({ name: devPath });
  console.log('Successfully deleted device', responses);
}

deleteDevice();

...