compile

Updated on Wednesday, 3 April, 2013 - 17:04
Purpose: 

Compile CSDL code.

Syntax: 

    https://api.datasift.com/compile

 

Parameter: Description:
csdl
required

The CSDL code to be compiled.

Example values: interaction.content contains "apple"

All calls to the API must be properly authenticated with a DataSift username and API key.

All the REST API endpoints accept both GET and POST requests for any of the parameters.

Requests to the /compile endpoint might include long strings, depending on the length of the CSDL you are sending. In such situations, you might find POST to be the better option.

Examples: 

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

https://api.datasift.com/compile
    ?csdl=interaction.content contains "apple"

DataSift returns this JSON:

 

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.