Messaging API
Use the HTTP Messaging API to send events from devices to the IoT tool.
API authentication
The HTTP Messaging API is protected by HTTP basic authentication. For
use-token-auth, use the username and token that you created when you registered your device.
The HTTP Messaging API allows the publication of events and commands by applications and devices indistinguishable from events and commands that are published by using MQTT. For more information about Messaging API keys and tokens, see MQTT authentication.
HTTP API URL
Use the following API endpoint URLs to access the HTTP Messaging API. 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
documentation and is typically api/v0002/.
The Host URL is as follows:
https://{orgId}.messaging.iot.masdomain.com/{base_URL}
The {orgId} value is your IoT tool
organization 6-character organization ID. The {orgId} value must included in the
host name for any HTTP API call. If you are using Maximo® Application Suite Dedicated,
your organization ID 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.
If you are connecting a device or application to the Quickstart service, specify 'quickstart' as
the {orgId} value.
Curl example
The following example is an example of an API call to send a device event: curl -X POST
"https://{orgId}.messaging.iot.masdomain.com//api/v0002/device/types/{deviceType}/devices/{deviceId}/events/{event_name}"
-H "content-type: {contenttype}" -d "EventPayload" -u
'use-token-auth:{authentication_token}', where {contenttype} is one of the following:
text/plain, application/json, application/xml, or
application/octet-stream, and {authentication_token} is the
authentication token that you created when you registered the device.
For more information about IoT tool MQTT messaging support, see MQTT messaging.