This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST 'https://api.datasift.com/v1/push/create' \ | |
| -d 'name=connectormongodb' \ | |
| -d 'hash=42d388f8b1db997faaf7dab487f11290' \ | |
| -d 'output_type=mongodb' \ | |
| -d 'output_params.host=mongodb.example.com' \ | |
| -d 'output_params.port=27017' \ | |
| -d 'output_params.db_name=datasiftmongodb' \ | |
| -d 'output_params.collection_name=my_first_test' \ | |
| -d 'output_params.auth.username=dsreceiver' \ | |
| -d 'output_params.auth.password=dsrpassword' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST 'https://api.datasift.com/v1/push/update' \ | |
| -d 'id=f4d4caee9acfd27faf88843d8d6191b1' \ | |
| -d 'name=myupdatedpushsubscription' \ | |
| -d 'hash=SourceStreamHash' \ | |
| -d 'output_type=s3' \ | |
| -d 'output_params.bucket=datasift-s3' \ | |
| -d 'output_params.directory=interactions' \ | |
| -d 'output_params.acl=private' \ | |
| -d 'output_params.auth.access_key=YourAmazonAWSAccessKey' \ | |
| -d 'output_params.auth.secret_key=YourAmazonAWSSecretKey' \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"error":"Missing param 'id'"} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X GET http://api.datasift.com/v1/preview/get \ | |
| -d 'id=e25d533cf287ec44fe66e8362f61961f' \ | |
| -H 'Authorization: datasift-user:your-datasift-api-key' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| auth=[ | |
| { | |
| "parameters": { | |
| "value": "kfDecg0a9le3f..." | |
| } | |
| } | |
| ] | |
| # flatten before URL-encoding | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| resources=[ | |
| { | |
| "parameters": { | |
| "extract_links": true | |
| } | |
| } | |
| ] | |
| # flatten before URL-encoding |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "count": 20, | |
| "page": 1, | |
| "pages": 1, | |
| "per_page": 20, | |
| "log_entries": [ | |
| { | |
| "id": 835176, | |
| "event_time": 1372133607, | |
| "success": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| curl -X POST https://api.datasift.com/v1/source/log \ | |
| -d 'id=fd2e72e3a7ae40c2a6e86e96381d8165' \ | |
| -H 'Authorization: datasift-user:your-datasift-api-key' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import tornado.ioloop | |
| import tornado.web | |
| class MainHandler(tornado.web.RequestHandler): | |
| def get(self): | |
| print self.request.headers | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "interactionId": "f35ace79b903eedfe5198f386d6fda0c", | |
| "subscriptionId": "ABC123456a891e3406789123216789", | |
| "hash": null, | |
| "hashType": null, | |
| "interaction": { | |
| "demographic": { | |
| "first_language": "English", | |
| "main_street": { | |
| "eat_and_drink_at": [ |