You can access and run API calls directly from the documentation in theIoT tool.
About this task
IoT tool APIs include messaging APIs that you can use to send
events from devices and application APIs. You can use the APIs to manage tasks, such as device
management, action management, and risk management. For more information, see
Messaging APIs and
Application APIs.
Note: Your organization ID, which is
also known as the workspaceId or the tenant ID, must be included in the hostname for all HTTP API
calls.
Procedure
-
To access the IoT tool API documentation, in the IoT tool, click the Help (?) icon and then click
API.
- Click View APIs to open the API documentation.
- To run the API calls directly from the documentation, generate the IoT API key and token. You can generate multiple API keys, such as one per
user.
- In the IoT tool, from the main menu, click
Apps.
- Click Generate API Key.
- Specify a description and expiration and click
Next.
- Depending on the API that you specify, select either the Device
Application role or the Standard Application role. For more
information about roles, see Using role-based access control.
Note: Authentication tokens are not recoverable. To generate a new token, you need to
register the API key again.
Click Generate Key. Record the API key
and token.
- Authorize the APIs. From the API documentation, click
Authorize.
- In the Available authorizations dialog, specify the authentication
information.
- In the Username field, specify the API key that you generated.
- In the Password field, specify the token that you generated.
- Click Authorize.
- Close the Available authorizations dialog. Do not click
Logout.
- In the API documentation, for the API you are specifying, click Try it
out.
- Click Execute.