You can call this operation to query all tags of a product.

Request parameters

Name Type Required Description
Action String Yes The operation that you want to perform. Set the value to ListProductTags.
ProductKey String Yes The unique identifier of the product.
Common request parameters - Yes See Common parameters.

Response parameters

Name Type Description
RequestId String The GUID generated by Alibaba Cloud for the request.
Success Boolean Indicates whether the call is successful. A value of true indicates that the call is successful. A value of false indicates that the call has failed.
ErrorMessage String The error message returned when the call fails.
Code String The error code returned when the call fails. For more information about error codes, see Error codes.
Data List<String> The list of tags returned when the call is successful. For more information, see the table ProductTag.
Table 1. ProductTag
Name Type Required Description
TagKey String Yes The key of the tag.
TagValue String Yes The value of the tag.

Examples

Sample request

https://iot.cn-shanghai.aliyuncs.com/&Action=ListProductTags
&ProductKey=a1h7knJdld1
&Common request parameters

Sample responses

JSON format

{
  "Data": {
    "ProductTag": [
      {
        "TagValue": "alterTable",
        "TagKey": "binary"
      },
      {
        "TagValue": "json2",
        "TagKey": "extt"
      },
      {
        "TagValue": "1234",
        "TagKey": "Lock"
      },
      {
        "TagValue": "support",
        "TagKey": "Lockk"
      },
      {
        "TagValue": "reen",
        "TagKey": "Reen"
      },
      {
        "TagValue": "try",
        "TagKey": "Reenn"
      },
      {
        "TagValue": "DropTable",
        "TagKey": "roc"
      }
    ]
  },
  "RequestId": "7FBE60F8-4AB5-4A8C-AFCB-F4F38851F01F",
  "Success": true
}

XML format

<? xml version="1.0" encoding="UTF-8" ? >
<ListProductTagsResponse>
	<Data>
		<ProductTag>
			<TagValue>alterTable</TagValue>
			<TagKey>binary</TagKey>
		</ProductTag>
		<ProductTag>
			<TagValue>json2</TagValue>
			<TagKey>extt</TagKey>
		</ProductTag>
		<ProductTag>
			<TagValue>1234</TagValue>
			<TagKey>Lock</TagKey>
		</ProductTag>
		<ProductTag>
			<TagValue>support</TagValue>
			<TagKey>Lockk</TagKey>
		</ProductTag>
		<ProductTag>
			<TagValue>reen</TagValue>
			<TagKey>Reen</TagKey>
		</ProductTag>
		<ProductTag>
			<TagValue>try</TagValue>
			<TagKey>Reenn</TagKey>
		</ProductTag>
		<ProductTag>
			<TagValue>DropTable</TagValue>
			<TagKey>roc</TagKey>
		</ProductTag>
	</Data>
    <RequestId>7FBE60F8-4AB5-4A8C-AFCB-F4F38851F01F</RequestId>
    <Success>true</Success>
</ListProductTagsResponse>