Creating a steam using the API


#1

In this question you say that its possible to create a stream using the API:

http://dev.datasift.com/discussions/there-api-create-new-stream

Please could you explain the steps and methods I should require.

I have compiled a CDSL using this call:

http://api.datasift.com/compile?csdl=interaction.content%20contains%20"apdple"&username=REPLACED&api_key=REPLACED

Which returns:

{
“hash”: “5642b187fbd15c96b75bd3183e0bf7fe”,
“created_at”: “2012-06-07 07:31:01”,
“dpu”: “0.1”
}

But that does not create a stream that I can listen to. Just the definition. I suspect I am missing a step.

How can I create a new stream programatically.

Thanks

Simon


#2

That has created your stream hash. You can consume this stream using this stream hash with one of the following methods:

- Through one of our official client libraries (recommended)

- Via HTTP Streaming

- Through out REST API (Not recommended for high throughput / production streams)


#3

Thanks Jason,

I can indeed consume the stream with the hash but it doesn’t appear to show in my list of streams:

http://datasift.com/stream/my

Can I see a list of the ones which have been created through the API anywhere (ideally through a web interface)?


#4

Unfortunately you can not view streams created through the API in the web interface. You are responsible for keeping track of any streams created through the API yourself. Take a look at our Version Control documentation for more information on this.

You can see a list of streams accessed in the last 24 hours by calling our /usage REST API endpoint.


#5

Hi, Thanks for clarifying,

Do does creating streams have an associated cost of is it just consuming the streams which has a cost?


#6

There is a cost on your API rate limit credits - not a $$ cost.

Each hour you are given up to 10,000 credits to hit our API endpoints with. A /compile request will cost 5 credits, a /usage request will cost 25.

This is all documented on our API Rate Limiting page.


#7

I am trying to create recordings through:
http://api.datasift.com/recording/schedule?hash=
with proper start timstamp, name and API credentials.

I had been using this without any issue through our automated script, which successfully ran for the last time on June 15th. (I was using ‘/recording/export/start’ to pull the exports.)
After that I observe that such calls are returning: HTTP/1.1 500 Internal Server Error

Has anything changed?


#8

The /recording API endpoints have since been deprecated. Unfortunately we can now only offer recordings through the web interface at datasift.com/tasks

To pull data from DataSift's APIs, you can use either our REST API or Streaming API to consume data in real-time.


#9

How to data pull using API and how to show data in ghrafical format using API in datasift related issue .


#10

DataSift is just a data provider - you can pull data from DataSift is using our Streaming API through one of our official client libraries.Any additional processing or graphing will need to be done by you. You may want to take a look at DataSift Labs or our “Like Coffee?” live infographic for some inspiration.