TagoIO SDK for JavaScript and TypeScript

    Class Buckets

    Use Resources.devices instead.

    Hierarchy

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    devices: Devices = ...

    Methods

    • Parameters

      • deviceID: string

      Returns Promise<number>

      Gets the amount of data stored for a device.

      If receive an error "Authorization Denied", check policy Device / Access in Access Management.

      // Use this instead of Buckets
      const amount = await Resources.devices.amount("device-id-123");
      console.log(amount);
    • Parameters

      • deviceID: string

      Returns Promise<DeviceInfo>

      Retrieves detailed information about a specific device.

      Use Resources.devices.info() instead

      If receive an error "Authorization Denied", check policy Device / Access in Access Management.

      // Use this instead of Buckets
      const deviceInfo = await Resources.devices.info("device-id-123");
      console.log(deviceInfo);
    • Type Parameters

      Parameters

      • OptionalqueryObj: T

      Returns Promise<
          DeviceListItem<
              T["fields"] extends (
                  | "updated_at"
                  | "profile"
                  | "connector"
                  | "network"
                  | "name"
                  | "active"
                  | "created_at"
                  | "bucket"
                  | "id"
                  | "description"
                  | "tags"
                  | "visible"
                  | "last_input"
                  | "type"
                  | "payload_decoder"
                  | "rpm"
              )[]
                  ? any[any][number]
                  : "name"
                  | "id",
          >[],
      >

      Lists all devices from your application with pagination.

      Use Resources.devices.list() instead

      If receive an error "Authorization Denied", check policy Device / Access in Access Management.

      // Use this instead of Buckets
      const list = await Resources.devices.list({
      page: 1,
      fields: ["id", "name"],
      amount: 10,
      orderBy: ["name", "asc"]
      });
      console.log(list);
    MMNEPVFCICPMFPCPTTAAATR