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.

This Node.js code samples illustrates how to delete a gateway:

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();

What's next

  • Use the MQTT or HTTP bridge to relay messages and configuration data between the devices and ClearBlade IoT Core.