Login

Login

cURL Examples

Create a new job without data:

curl -d 'job[without_data]=true' http://api.crowdflower.com/v1/jobs.json?key=$API_KEY

Create a new job by uploading a JSON file:

curl -T 'sampledata.json' -H 'Content-Type: application/json' http://api.crowdflower.com/v1/jobs/upload.json?key=$API_KEY

Create a new job and populate it with data from a csv file:

curl -T 'sampledata.csv' -H 'Content-Type: text/csv' http://api.crowdflower.com/v1/jobs/upload.json?key=$API_KEY

Add data to an existing job by uploading a JSON file:

curl -T 'sampledata.json' -H 'Content-Type: application/json' http://api.crowdflower.com/v1/jobs/$JOB_ID/upload.json?key=$API_KEY

Add data to an existing job by uploading a csv file:

curl -T 'sampledata.csv' -H 'Content-Type: text/csv' http://api.crowdflower.com/v1/jobs/$JOB_ID/upload.json?key=$API_KEY

Pull data from a Twitter feed and add it to a new job:

curl -d 'job[uri]=http://search.twitter.com/search.atom?q=helloworld' http://api.crowdflower.com/v1/jobs/upload.json?key=$API_KEY

Pull data from the Twitter feed and add it to an existing job:

curl -d 'job[uri]=http://search.twitter.com/search.atom?q=helloworld' http://api.crowdflower.com/v1/jobs/$JOB_ID/upload.json?key=$API_KEY

Create a new job with title “Some title” and “Instructions”:

curl -d 'job[title]=Some+title&job[instructions]=Instructions' http://api.crowdflower.com/v1/jobs.json?key=$API_KEY

Change the title of a job (must be 5 to 255 characters):

curl -X PUT --data-urlencode "job[title]=some new title" "https://api.crowdflower.com/v1/jobs/$JOB_ID.json?key=$API_KEY"

Get all jobs in JSON format:

curl https://api.crowdflower.com/v1/jobs.json?key=$API_KEY

Get your account information:

curl https://api.crowdflower.com/v1/account.json?key=$API_KEY

Order a job:

curl -d 'key=$API_KEY&channels[0]=amt&channels[0]=sama&debit[units_count]=20' http://api.crowdflower.com/v1/jobs/$JOB_ID/orders.json

Pause a job:

curl http://api.crowdflower.com/v1/jobs/$JOB_ID/pause.json?key=$API_KEY

Resume a job:

curl http://api.crowdflower.com/v1/jobs/$JOB_ID/resume.json?key=$API_KEY

Cancel a job:

curl http://api.crowdflower.com/v1/jobs/$JOB_ID/cancel?key=$API_KEY

Check the status of a job:

curl http://api.crowdflower.com/v1/jobs/$JOB_ID/ping.json?key=$API_KEY

Delete a job:

curl -X DELETE https://api.crowdflower.com/v1/jobs/$JOB_ID.json?key=$API_KEY

Copy a job with no units:

curl "https://api.crowdflower.com/v1/jobs/$JOB_ID/copy.json?key=$API_KEY"

Copy a job with only its gold units:

curl "http://api.crowdflower.com/v1/jobs/$JOB_ID/copy.json?key=$API_KEY&gold=true"

Copy a job with all of its units:

curl "https://api.crowdflower.com/v1/jobs/$JOB_ID/copy.json?key=$API_KEY&all_units=true"

Get the legend of a job:

curl http://api.crowdflower.com/v1/jobs/$JOB_ID/legend.json?key=$API_KEY

Set payment per assignment (set-only, cannot view the from the API):

curl -X PUT --data-urlencode 'job[payment_cents]=1000' --data-urlencode 'key=$API_KEY' https://api.crowdflower.com/v1/jobs/$JOB_ID.json

Exclude workers from certain countries:

curl -X PUT -d 'job[excluded_countries][]=US&job[excluded_countries][]=AD' http://api.crowdflower.com/v1/jobs/$JOB_ID.json?key=$API_KEY

Set auto_order to true:

curl -X PUT --data-urlencode 'job[auto_order]=true' --data-urlencode 'key=$API_KEY' http://api.crowdflower.com/v1/jobs/$JOB_ID.json

Delete a unit:

curl -X DELETE http://api.crowdflower.com/v1/jobs/$JOB_ID/units/$UNIT_ID.json?key=$API_KEY

Update a unit:

curl -X PUT --data-urlencode 'unit[data][choose_one_gold][]=Yes' --data-urlencode 'unit[data][choose_one_gold][]=No' "https://api.crowdflower.com/v1/jobs/$JOB_ID/units/$UNIT_ID.json?key=$API_KEY"

Change the state of a unit:

curl -X PUT --data-urlencode 'unit[state]=new' --data-urlencode 'key=$API_KEY' https://api.crowdflower.com/v1/jobs/$JOB_ID/units/$UNIT_ID.json

Set units per assignment:

curl -X PUT --data-urlencode 'job[units_per_assignment]={n}' --data-urlencode 'key=$API_KEY' https://api.crowdflower.com/v1/jobs/$JOB_ID.json

Note: You can find your API key on the account page.

Products

read more...

Customers

read more...

Social Media



Law Talk

Privacy Policy Terms of Service ©2011 CrowdFlower