Use the Cloud Integration Hub Publish Data REST API to publish data transactions directly to a topic on the Cloud Integration Hub publication repository.
You can use the Publish Data API to publish data with publications that publish data directly to a topic with an API. You cannot use the API with publications that trigger a Data Integration task.
To publish data through the API, copy the URL of the API from the Publication page in Cloud Integration Hub.
Note: When you use a private publication repository, if you change the Secure Agent on which the publication repository service runs or the port number of the publication repository, the URL of the API changes accordingly. In this case, be sure to notify API users and consumers of the new URL.
A topic table name must begin with an alphabetic character or underscore and can contain only ASCII alphanumeric characters or underscores. The name must be unique in the Cloud Integration Hub repository.
If the topic to which you publish includes a DATETIME field, you must use the following format for the DATETIME value: yyyy-MM-dd HH:mm:ss.SSS.
Publish Data REST API Action Response
When you use the Cloud Integration Hub Publish Data REST API to publish data directly to a topic, Cloud Integration Hub returns the response code of the action that you perform in the REST API response.
Publishing data through the REST API returns one of the following response codes:
•SUCCESS. Cloud Integration Hub published the data successfully. The status message includes the event ID of the publication event that Cloud Integration Hub generates, the number of row accepted, and the number of rows successfully processed.
•FAILED. Cloud Integration Hub could not publish the data.
Note: When you publish data through the Publish Data REST API to a private publication repository and the publication fails because the publication repository service is not accessible, Cloud Integration Hub returns an error to the calling application and does not create an error event.
Topic Swagger Structure for Publish Data REST API
The Publish Data REST API returns the Swagger structure for the topic into which the publication publishes data.
To view the Swagger structure, copy the URL of the structure from the Publication page in Cloud Integration Hub.