Cloud Integration Hub > Cloud Integration Hub REST APIs > Change Publication Subscription Mode REST API
  

Change Publication Subscription Mode REST API

Use the Cloud Integration Hub Change Publication Subscription Mode REST API to change the mode of a publication or a subscription, that is, to enable a disabled publication or subscription or to disable an enabled publication or subscription.
To change the mode of a publication, use the following REST URL:
https://<pod>.<baseUrl>/dih-console/api/v1/publication/changemode
Where:
For example:
https://cih-pod1.dm-us.informaticacloud.com/dih-console/api/v1/publication/changemode
To change the mode of a subscription, use the following REST URL:
https://<pod>.<baseUrl>/dih-console/api/v1/subscription/changemode
Where :
For example:
https://cih-pod1.dm-us.informaticacloud.com/dih-console/api/v1/subscription/changemode
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 changing the mode of a publication
To change the mode of a publication, use the following request syntax:
{
"publicationName": "<publicationName>",
"mode": "<enable/disable>"
}
For example:
{
"publicationName": "daily_sales",
"mode": "enable"
}
Request syntax for changing the mode of a subscription
To change the mode of a subscription, use the following request syntax:
{
"subscriptionName": "<subscriptionName>",
"mode": "<enable/pause/disable>"
}
For example:
{
"subscriptionName": "daily_reports",
"mode": "disable"
}

Change Publication Subscription Mode REST API Action Response

When you use the Cloud Integration Hub REST API to change the mode 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.
Changing the mode of a publication or a subscription from the REST API returns one of the following response codes: