Product Information

Last Updated on : 2024-08-28 02:57:15download

Query product information through the following open API.

API list

Request method API endpoint Description
GET /v1.0/cloud/illume/open/product/info Gets product information.

Get product information

API description

Based on the product ID, get basic product information and related data point (DP) information.

API endpoint

GET /v1.0/cloud/illume/open/product/info

Request parameters

Parameter Data type Parameter type Description Required
productId String Query The product ID. Yes

Response parameters

Parameter Type Description
code Integer The response code. It is empty if the request succeeds. For more information, see Error codes.
success Boolean Indicates whether the request succeeds. Valid values:
  • true: succeeded
  • false: failed
msg String The error message. It is empty if the request succeeds.
t Long The returned 13-digit timestamp.
result Object The returned result.

Description of result

{
    "category":"The level-2 category.",
    "categoryCode":"The level-3 category.",
    "dps":[
        {
            "desc":"The description.",
            "dpCode":"The DP code.",
            "dpId":"The DP ID.",
            "dpName":"The DP name.",
            "dpSubType":"The data type.",
            "property":"The DP property in JSON format."
        }
    ],
    "name":"The product name.",
    "prodcutId":"The product ID."
}

Sample request

GET:/v1.0/cloud/illume/open/product/info?productId=3aqockhk

Sample response

{
    "category":"dlzmkz",
    "categoryCode":"dlzmkz_4z_3",
    "dps":[
        {
            "desc":"",
            "dpCode":"switch_led",
            "dpId":1,
            "dpName":"Switch",
            "dpSubType":"bool",
            "property":"{\"type\":\"bool\"}"
        },
        {
            "desc":"",
            "dpCode":"work_mode",
            "dpId":2,
            "dpName":"Working mode",
            "dpSubType":"enum",
            "property":"{\"range\":[\"white\",\"colour\",\"scene\",\"music\"],\"type\":\"enum\"}"
        },
        {
            "desc":"",
            "dpCode":"bright_value",
            "dpId":3,
            "dpName":"Brightness of white light",
            "dpSubType":"value",
            "property":"{\"min\":10,\"max\":1000,\"step\":1,\"unit\":null,\"scale\":0,\"type\":\"value\"}"
        },
        {
            "desc":"Used to set the light status after a power-off and then a power-on",
            "dpCode":"power_memory",
            "dpId":33,
            "dpName":"Power-off memory",
            "dpSubType":"raw",
            "property":"{\"maxlen\":128,\"type\":\"raw\"}"
        },
        {
            "desc":"",
            "dpCode":"fault",
            "dpId":58,
            "dpName":"Fault alert",
            "dpSubType":"bitmap",
            "dpType":"obj",
            "property":"{\"maxlen\":7,\"label\":[\"power_fault\",\"current_fault\",\"voltage_fault\",\"pf_abnormal\",\"freq_abnormal\",\"open_circuit_alarm\",\"short_circuit_alarm\"],\"type\":\"bitmap\"}"
        }
    ],
    "name":"Street Light Controller",
    "prodcutId":"3aqockhk"
}

Error codes

The following table lists the error codes that might be returned when you call this API. For more information, see Global Error Codes.

Error code Description
500 A system error occurred.