HTTP Application APIs

Several APIs are available for developing code for devices, gateways, and applications that connect to IBM Watson™ IoT Platform service.

API authentication

The HTTP Application API is protected by HTTP basic authentication. Use the API key generated by Platform Service.

Example: a-abc123-kodl0vqqrk, where abc123 is the {orgId}. The token generated by Platform Service.

For more information about API keys and tokens, see API key connection. Tip: You can look up the default API key and token for your IBM Maximo Asset Monitor instance by using the Platform Service user interface.

Using the API

Each Platform Service organization is identified by a 6-character organization ID ({orgId}) which is required in the host name for any HTTP API call.

Tip: You can find your organization ID on the Connect tab of the user interface. If you are in an IBM-managed environment, it is provided in your Welcome letter. If you are in a customer-managed environment, your organization ID is your workspace ID. Your application suite administrator configures the workspace ID during the installation process.

HTTP API URL

Use the following API endpoint URLs to access the Platform Service APIs. The API endpoint URL consists of a Host URL and a Base URL. The base URL for each REST API is listed with the API docs, and is typically api/v0002/.

The Host URL is as follows:

https://{orgId}.internetofthings.ibmcloud.com/{base_URL}

Curl example

The following example is an example of an API call to list the devices in your organization:
curl -X GET "https://{orgId}.internetofthings.ibmcloud.com/api/v0002/bulk/devices?_limit=25" -u '{username}:{password}'

API docs

Use the following URL to view the Platform Service API docs: Platform Service REST APIs.

From this landing page, you can access the documentation for the available Platform Service APIs.

Interactive API docs

Use the following URL to view and use the interactive API docs for your Platform Service organization:

https://{orgId}.internetofthings.ibmcloud.com/docs/index.html

Tip: You can also access the interactive API docs directly from the Platform Service dashboard by selecting the menu bar help icon in the upper right corner of the window and then clicking API.

From this landing page, you can access the documentation for the available Platform Service APIs. For each call, you can use the Try it out button to run the API calls directly from the documentation.

To run the API calls directly from the documentation, you must first provide the relevant authorization credentials by completing the following steps:

  1. From the API docs navigation page, click View APIs for the REST API that you want to work with.
  2. On the API docs landing page, click Authorize.
  3. In the Available authorizations box, set the username to the API key and the password to the authentication token. Click Authorize.
  4. Close the Available authorizations box.
    Important: Do not select Logout.

HTTP Messaging API