Activity Forums Salesforce® Discussions Is there a way to subscribe to push topic channel using Salesforce rest api?

  • Avnish Yadav

    Member
    August 14, 2018 at 11:41 am

    Hello Rajesh,

    Yes, you can create a PushTopic via the REST API.

    For example:-

    curl https://na1.salesforce.com/services/data/v32.0/sobjects/PushTopic/
    -H "Authorization: Bearer token -H "Content-Type: application/json"
    -d "@newpushtopic.json"

    where my newpustopic.json is:-

    {
    "Name" : "Account",
    "Query" : "SELECT Id FROM Account",
    "ApiVersion" : 32.0,
    "NotifyForOperationCreate" : true,
    "NotifyForOperationUpdate" : true,
    "NotifyForOperationUndelete" : true,
    "NotifyForOperationDelete" : true,
    "NotifyForFields" : "All",
    }

    For more infomation, read here.

    Hope this will help you.

    Thanks.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos