How to determine new hash of updated filter programmatically?


#1

I have a filter that is updated on a periodic basis. I would like to be able to restart my stream consuming script without having to manually log in to the DataSift Web site, find the new hash value, and copy and paste it into the script. Is there a way to determine the hash value for a given filter through the API?

Thanks.


#2

Compiling your CSDL via the API will give you the filter hash value of the newly compiled CSDL. We wrote a great guide on the process you’re asking about a while back; How To Update Filters On-The-Fly And Build Dynamic Social Solutions.

I feel this should answer most of your questions, but please feel free to ask if you need any further clarification


#3

Thanks for that useful article. It looks as though there isn’t a way to do what I would like. I would prefer to have our analysts edit the CSDL through the DataSift Web interface, and then update the stream. From what I read, I’ll need to create a custom user interface to allow analysts to edit the CSDL, and have that interface trigger the restart. And the link with the version that sits in the DS Web UI will go away.


#4

Yes, if you want to manage your CSDL in the DataSift UI, you’ll have to do what you’re doing right now, and pull the updated filter hash after compiling and saving your updated CSDL. There’s no way to programatically get at the hash of a filter in the UI