[SalesForce] Streaming API not working in workbench

I am trying to setup a streaming API client and followed the Streaming API setup using workbench section. I have tried on a custom object and standard Case object and made sure all the prerequisites are present: Streaming API is allowed for the object, user has read and create access to pushtopic and the record, user has author apex permission.

I've checked a few other questions, but they were able to atleast get it working in the Workbench and I couldn't even get it to work in Workbench.

The push topic for Case:

 PushTopic pushTopic = new PushTopic();
 pushTopic.Name = 'CaseCreation';
 pushTopic.Description = 'Streaming API test';
 pushTopic.Query = 'SELECT Id,Status FROM Case';
 pushTopic.ApiVersion = 32.0;
 pushTopic.NotifyForOperationCreate = true;
 pushTopic.NotifyForOperationUpdate = false;
 pushTopic.NotifyForOperationUndelete = false;
 pushTopic.NotifyForOperationDelete = false;
 pushTopic.NotifyForFields = 'All';
 insert pushTopic;

Logged into workbench and subscribed to it:

Subscribed to /topic/CaseCreation
{
  "channel": "/meta/subscribe", 
  "clientId": "2mzj85s3dpr6wa17gxwd3th8ncn", 
  "successful": true, 
  "id": "17", 
  "subscription": "/topic/CaseCreation"
}

I've then created a Case through UI and through Dev Console, but no records flow in.

Could someone please let me know if I'm doing something wrong ?

Best Answer

I am not sure if that is a typo but looks like you should put a space between the Id, and Status...

pushTopic.Query = 'SELECT Id,Status FROM Case';

Also did you try getting the Id of the Push Topic that you have just created ?

Related Topic