Service API Calling Process and Precautions
The methods for calling other APIs are similar to those for calling service APIs. For details, see Calling Service APIs.
- The following figure shows the flow for calling a service API.
- The following figure shows the profile file used in the Java SDK Demo. There is only one Brightness service, which contains a brightness attribute and a PUT command. When calling a device command or device service API, change the service, attribute, or command name to the corresponding name if the following profile content is not used.
- To create a profile, perform the following steps:
Log in to the Developer Center, choose Customization to open the Set Product Information page. Specify Product Name, Model, Manufacture ID, Industry, Device Type, and Protocol Type, and click Create. Click +Add Service to add attributes and commands based on device functions, and click Save.
, and clickNOTE:You are advised to call the API to register the device after the profile file is defined.
- The values of DeviceType, ManufacturerId, ManufacturerName, and Model must be the same as those defined in the profile file.
- The accessToken can be managed by the SDK or third-party applications. For details, choose Northbound Java SDK API Reference. in the
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot