Get the instructions set by category

Last Updated on : 2023-12-07 03:33:52download

Query the instruction set by category. This instruction set is the most comprehensive instruction set under the Tuya public version category and can be used as a reference for developers. If you are a platform developer, it is recommended to follow this category for development and docking.

API address

GET: /v1.0/functions/{category}

Request parameter

Parameter nameTypeINRequiredDescription
categoryStringuritrueProduct Category

Return parameter

Parameter nameTypeDescription
resultFunctionRes

Description of result

Parameter nameTypeDescription
categoryStringProduct Category
functionsListInstruction Set

Description of functions

Parameter nameTypeDescription
nameStringCommand name
descStringDescription
codeStringCommand
typeStringCommand Type
valuesStringCommand into the parameter range

Request example

GET: /v1.0/fucntions/kg

Return example

{
    "result": {
        "functions": [
            {
                "code": "switch",
                "values": "{}",
                "type": "Boolean",
                "name": "switch",
                "desc": "Global switch equals true, open all. Global switch equals false, close all."
            }
        ],
        "category": "kg"
    },
    "t": 1571293457435,
    "success": true
}

Error code

For more information, see error code.