compile

Compile a CSDL filter.

An HTTPS POST request sent to:

https://api.datasift.com/v1.3/compile

A successful call to this endpoint returns: 200 OK plus a JSON object.

Parameters

Parameter Description
csdl
required

The CSDL code you want to compile.

Example values: interaction.content contains "apple"

Examples

  1. Here's an example of a call to /v1.3/compile:

curl -X POST https://api.datasift.com/v1.3/compile 
    -d 'csdl=interaction.content contains "apple"' 
    -H 'Authorization: datasift-user:your-datasift-api-key'

DataSift returns this JSON:

{
    "hash": "9fe133a7ee1bd2757f1e26bd78342458",
    "created_at": "2011-05-12 11:18:07",
    "dpu": "0.1"
}

Property: Description:
hash A unique identifier for this stream. Make sure you store this because you will need it later.
dpu The cost in DPUs to run this stream. Remember that some data sources charge a license cost, which we pass on to you in addition to the DPU cost.

Notes

  1. All calls to the API must be properly authenticated with a DataSift username and API key.
  2. All calls to the API must be versioned. The current version is v1.3.

Resource information

Rate limit cost: 5

Requires authentication: Yes

Response formats: JSON, JSONP