11

Is there a way to make an API call to Salesforce that would check if the Streaming API is enabled?

I know how to check it in the UI - using this "Enable Streaming API" checkbox: enter image description here

But how to do it via an API? Push topics are successfully created even if the Streaming API is turned off.

1
  • Unfortunately, User Interface Settings here is not yet supported in the Metadata API. Also, the Limits resource here seems to always list the Streaming API limits whether the org has that enabled or not. I'm afraid you'd have to look at other ways of approaching your problem.
    – markgarg
    Commented Jul 21, 2018 at 10:45

1 Answer 1

1

I too believe there's no way to get a simple response from the server regarding which API's you have enabled in your organisation, just like Rohit said.

However, I believe you can check if the Streaming API is enabled if you can check whether or not your user can create the StreamingChannel object. My basis for this answer is that this object is part of the Streaming API, and on the documentation the following is stated:

You must have the proper Streaming API permissions enabled in your organization.

By "permissions" I believe not only the user needs permission to create the object, but the API must be enabled as well (it doesn't make sense otherwise).

Note: You might run into a possible issue here: when the API is enabled but the user doesn't have the permission to create the object. In this situation, whatever answer you get from the API, as long as you are logged in with that specific user, won't be true.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .