Help Center > > Developer Guide> SDK Usage Guide on the Application Side> Huawei IoT Platform Java SDK Usage Guide> Service API Calling Process and Precautions

Service API Calling Process and Precautions

Updated at: Aug 28, 2019 GMT+08:00

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 Product > Product Development > Add > Customization, and click 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.

    NOTE:

    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 Secure Application Access > Periodically Refreshing a Token in the Northbound Java SDK API Reference.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel