Tags
Assign custom tags to products, devices, and groups to categorize resources with shared characteristics. Tags simplify searching, aggregating, and managing IoT resources at scale.
Usage notes
|
Tag |
Description |
|
product tag |
Describes attributes shared by all devices under the same product. For example, you can use tags to identify a product's manufacturer, organization, physical dimensions, or operating system. |
|
device tag |
Identifies a device by a specific characteristic, enabling you to categorize, aggregate, and analyze devices for unified management. For example, you can assign the tag |
|
group tag |
Describes attributes shared by devices and subgroups within a group, enabling cross-product device management. For example, you can tag the region or space where the devices in a group are located. |
Use cases
Perform batch operations using tags
|
Tag |
Example operation |
|
product tag |
Find products that share common attributes within an IoT Platform instance based on their tags. |
|
device tag |
After searching for target devices based on their tags, you can perform the following batch operations:
|
|
group tag |
Find groups and subgroups that share common attributes within an IoT Platform instance based on their tags. |
Manage tags from devices
After you implement tag management on your devices, they can perform the following operations:
-
Report tags: When a device reports its tags, IoT Platform automatically adds or updates the corresponding device tags in the console.
-
Delete tags: A device sends a request to delete its tags, and IoT Platform removes them upon receipt.
-
Query tags: A device sends a request to query its tags, and IoT Platform returns the requested information upon receipt.
IoT Platform's multilingual device-side Link SDK integrates the tagging feature and transmits tag information within the system. For device-side Link SDK code samples, see Device tags for device development. For the topics and data formats used to manage tags, see Alink protocol for device tags.
Forward tag change information
With message forwarding, IoT Platform sends messages about device tag operations (add, update, delete, and clear) to your application server or other Alibaba Cloud services. For more information about configuring message forwarding, see Message forwarding. For the forwarded data format, see Device tag changes.
Prerequisites
-
You have logged on to the IoT Platform console.
-
Before you add tags, create the corresponding product, device, or group. For more information, see the following topics:
Background information
Managing numerous IoT devices often requires differentiating and batch-processing them. IoT Platform addresses this with its tagging feature. Assign tags to products, devices, and groups, then categorize and manage them based on these tags.
Limits
-
Tags for products, devices, and groups are key-value pairs in the
Key:Valueformat. -
The tag key abc is reserved by IoT Platform. Do not set a tag
Keyto abc. If you setKey=abc, the tag is automatically filtered out during tag-based searches. -
Tag keys are case-insensitive. However, IoT Platform and the data forwarded using the message forwarding feature always use the original casing of the tag
key.Even if you delete a tag and then re-add it with only a change in case, the
keyin forwarded data retains the original casing.For example, if you create a tag
ssid:1000and later update it by usingSsid:1001, theValueis successfully updated to 1001, but the data forwarded by the system still usesssid:1001. -
Each product, device, or group can have a maximum of 100 tags.
Edit tags in the console
Edit product tags
On the Overview page, find the instance that you want to manage and click the instance ID or instance name.
-
In the left navigation bar, select .
-
On the Products page, find the product that you want to tag, and click View in the corresponding Actions column.
The Tag Information section displays all tags for the product.
-
Click Edit to the right of Tag Information.
-
In the Edit Tag dialog box, enter the Tag Key and Tag Value.
Click Delete to remove an existing tag, or click + Add Tag to add a new one.
Parameter
Description
tag key
Must be 1 to 30 characters in length and can contain letters, digits, and periods (.).
tag value
Must be up to 128 characters in length and can contain Chinese characters, Japanese characters, letters, digits, underscores (_), hyphens (-), colons (:), and periods (.). Each Chinese or Japanese character counts as two characters.
-
(Optional) Click Add Tag to add more tags, or click Delete to remove unwanted tags.
-
Click Confirm.
Edit device tags
-
In the left navigation bar of the target instance, select .
-
On the Device page, click View for the device you want to tag.
The Tag Information section displays all tags for the device.
-
On the Device Details page, click Edit to the right of Tag Information.
-
In the Edit Tag dialog box, click Add Tag and enter the tag key and tag value.
Parameter
Description
tag key
Must be 1 to 30 characters in length and can contain letters, digits, forward slashes (/), underscores (_), hyphens (-), number signs (#), at signs (@), percent signs (%), ampersands (&), asterisks (*), and periods (.).
tag value
Must be up to 128 characters in length and can contain Chinese characters, Japanese characters, letters, digits, underscores (_), hyphens (-), number signs (#), at signs (@), percent signs (%), ampersands (&), colons (:), and periods (.). Each Chinese or Japanese character counts as two characters.
-
Optional: In the Edit Tag dialog box, click the Geographical Location Tag text box, and select a location from the pop-up map, where you can search by address.
ImportantA geographical location tag marks the physical location of a device and uses the format
coordinate:${longitude}:${latitude}.If the Thing Specification Model of the product to which the device belongs includes a GeoLocation attribute, setting a geographical location tag in the console synchronizes this information with the GeoLocation attribute value. However, location information set through server-side APIs or reported by the device is not synchronized to the GeoLocation attribute.
-
(Optional) Click Add Tag to add more tags, or click Delete to remove unwanted tags.
-
Click Confirm.
Edit group tags
-
In the left navigation bar of the target instance, select .
-
On the Groups page, find the group to which you want to add tags, and click View in the corresponding Actions column.
The Group Tags section displays all tags for the group.
-
Click Edit to the right of Tag Information.
-
Optional: In the Edit Tag dialog box, click the text box for the geographical location tag. In the map that appears, select a location. You can search by address.
NoteA geographical location tag marks the physical location of a device and uses the format
coordinate:${longitude}:${latitude}. -
In the Edit Tag dialog box, enter the Tag Key and Tag Value.
Click Delete to remove an existing tag, or click + Add Tag to add a new one.
Parameter
Description
tag key
Must be 1 to 30 characters in length and can contain letters, digits, and periods (.).
tag value
Must be up to 128 characters in length and can contain Chinese characters, Japanese characters, letters, digits, underscores (_), hyphens (-), colons (:), and periods (.). Each Chinese or Japanese character counts as two characters.
-
(Optional) Click Add Tag to add more tags, or click Delete to remove unwanted tags.
-
Click OK.
Manage tags with server-side APIs
IoT Platform provides server-side APIs to manage tags in batches and query products, devices, and groups by their tags.
Product tags
|
Feature |
API |
Description |
|
Edit tags |
Creates product tags. |
|
|
Updates product tags. |
||
|
Deletes product tags. |
||
|
Query tags |
Queries all tags of a product. |
|
|
Use tags |
Queries products by tag. |
Device tags
|
Feature |
API |
Description |
|
Edit tags |
Sets device tags. |
|
|
Deletes device tags. |
||
|
Query tags |
Queries the tag list of a specified device. |
|
|
Use tags |
Queries devices by tag. |
Group tags
|
Feature |
API |
Description |
|
Edit tags |
Adds, updates, or deletes group tags. |
|
|
Query tags |
Queries the tag list of a group. |
|
|
Use tags |
Queries device groups by tag. |