Cloud Integration Hub > Cloud Integration Hub REST APIs > Run Publication Subscription REST API
  

Run Publication Subscription REST API

Use the Cloud Integration Hub Run Publication Subscription REST API to run a specific publication or a specific subscription. You can run the publication or the subscription regardless of its mode. That is, you can run an enabled and disabled publication, and an enabled, paused, and disabled subscription.
Note: You can use the Run Publication Subscription REST API to publish data and subscribe to data with publications and subscriptions that trigger a Data Integration task or a file ingestion task.
The Run Publication Subscription API returns the response code of the action that you perform. If the publication or subscription runs successfully, the API returns the event ID of the publication or the subscription event that Cloud Integration Hub generates. You can run the Cloud Integration Hub Event Status API to query the status of the publication or subscription event.

Run Publication Subscription REST API Request

Cloud Integration Hub uses different REST URLs for running a publication and for running a subscription.
To run a publication, use the following REST URL:
https://<pod>.<baseUrl>/dih-console/api/v1/publication/start
Where:
For example:
https://cih-pod1.dm-us.informaticacloud.com/dih-console/api/v1/publication/start
To run a subscription, use the following REST URL:
https://<pod>.<baseUrl>/dih-console/api/v1/subscription/start
Where:
For example:
https://cih-pod1.dm-us.informaticacloud.com/dih-console/api/v1/subscription/start
Request syntax for running a publication
To run a publication, use the following request syntax:
Request headers
Include the following headers in the REST API request:
Content-Type: application/json
Accept: application/json
Request body
Include the following in the REST API request:
{
"publicationName": "<publicationName>",
"runDisabled": "<true/false>"
}
The following list describes the elements of the request:
For example:
Content-Type: application/json
Accept: application/json
{
"publicationName": "daily_sales",
"runDisabled": "true"
}
Tip: You can copy the values of <pod> and <baseUrl> from the Cloud Integration Hub URL after you access it from the My Services page of Informatica Intelligent Cloud Services.
Request syntax for running a subscription
To run a subscription, use the following request syntax:
Request headers
Include the following headers in the REST API request:
Content-Type: application/json
Accept: application/json
Request body
Include the following in the REST API request:
{
"subscriptionName": "<subscriptionName>",
"runDisabled": "<true/false>"
}
The following list describes the elements of the request:
For example:
Content-Type: application/json
Accept: application/json
{
"subscriptionName": "daily_report",
"runDisabled": "true"
}

Run Publication Subscription REST API Action Response

When you use the Cloud Integration Hub Run Publication Subscription REST API to start the running of a publication or of a subscription, Cloud Integration Hub returns the response code of the action that you perform in the REST API response.
Running a publication or a subscription from the REST API returns one of the following response codes: