validate

Check the syntax of the CSDL code of a filter without compiling.

An HTTPS POST request sent to:

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

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

Parameters

Parameter Description
csdl
required

The CSDL code you want to validate.

Example values: interaction.content contains "apple"

Examples

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

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

Datasift returns this JSON:

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

Property:

Description:

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