Follow

Appen API Responses and Messaging

The Appen API returns a variety of responses to client requests.  Here, you'll find examples of such responses, and what they mean. All application responses are returned in JSON, and HTTP status codes and messages appear in the response header.
 

Please visit this link for our new Developer API Documentation.

HTTP Status Codes

200 Success
The request was successful.
 
202 Accepted
We have accepted your request, and it has been queued for processing. The body of this response indicates when to try the request again.
 
302 Redirect
We are redirecting you to a resource. The body of this response often contains a message.
 
400 Bad Request
You failed to pass one or more required parameters.
 
401 Unauthenticated
Authorization failed, check your key.
 
402 Payment Required
The operation you are trying to complete requires payment.
 
404 Not Found
The resource you are referencing does not exist, or you don't own it.
 
405 Method Not Allowed
The method you are using (GET, POST, PUT, DELETE) is not available from this URL.
 
406 Not Acceptable
The format you requested is not available.
 
422 Unit Limit Reached
You have uploaded the maximum amount of units (1 million) allowed in a job.
Note: limit by default is 250k, but the Team admin has the ability to increase it to 1 million
 
429 Too Many Requests
You have exceeding our rate limit. The rate limits are explained here.
 
500 Internal Server Error
An error occurred on the server. 

Application Response Messages

In addition to or in lieu of a resource object, the Appen API may return one of three types of status messages: Success, Notice, or Error.

The type of application message returned will not necessarily "correspond" with the HTTP status code.  For example, a 200 OK status code returned with an application error message indicates that the request successfully reached the server, but the Appen platform couldn't complete the request.

Success

{
  success: {
  message: "Job created successfully."
}
}


Notice

{
  notice: {
  message: "Your job is being completed."
}
}


Error

{
  error: {
  message: "Job could not be canceled."
}
}

Unit Object Response

{
    "id":513610734,
    "data":{
    "author":"Homer",
    "major_works":"The Iliad|The Odyssey",
    "countries_active":"Greece"
    },
    "difficulty":0,
    "judgments_count":0,
    "state":"new",
    "agreement":null,
    "missed_count":0,
    "gold_pool":null,
    "created_at":"2014-07-31T05:47:59+00:00",
    "updated_at":"2014-07-31T05:47:59+00:00",
    "job_id":546283
    }
 

Judgment Object Response

[
    {
    "id":1246809011,
    "created_at":"2014-04-18T23:14:24+00:00",
    "started_at":"2014-04-18T23:14:09+00:00",
    "webhook_sent_at":null,
    "external_type":"neodav",
    "judgment":1,
    "reviewed":null,
    "golden":false,
    "missed":null, 
    "rejected":null,
    "tainted":true,
    "country":"NLD",
    "region":"",
    "city":"",
    "job_id":425765,
    "unit_id":449227099,
    "worker_id":22256937,
    "trust":0,
    "worker_trust":0.888888888888889,
    "unit_state":"finalized",
    "data":{
    "choose_one":"Yes"
    },
    "unit_data":{
    "retweet_count":2,
    "text":"Turning heads in #TedToToe! http://t.co/uzmnqP1eYW http://t.co/0LBnWQzaxD",
    "favorite_count":5,
    "created":"2014-04-18T21:15:03+00:00",
    "user":"ted_baker",
    "lang":"en",
    "id":457266078155304960
    }
    },
    {
    "id":1246811339,
    "created_at":"2014-04-18T23:17:43+00:00",
    "started_at":"2014-04-18T23:17:34+00:00",
    "webhook_sent_at":null,
    "external_type":"neodev",
    "judgment":2,
    "reviewed":null,
    "golden":false,
    "missed":null,
    "rejected":null,
    "tainted":true,
    "country":"NLD",
    "region":"07",
    "city":"Amsterdam",
    "job_id":425765,
    "unit_id":449227099,
    "worker_id":22797593,
    "trust":0,
    "worker_trust":0.848888888888889,
    "unit_state":"finalized",
    "data":{
    "choose_one":"No"
    },
    "unit_data":{
    "retweet_count":2,
    "text":"Turning heads in #TedToToe! http://t.co/uzmnqP1eYW http://t.co/0LBnWQzaxD",
    "favorite_count":5,
    "created":"2014-04-18T21:15:03+00:00",
    "user":"ted_baker",
    "lang":"en",
    "id":457266078155304960
    }
    }
    ]

Tainted Judgments Response

{
      "golden_units":0,
      "all_units":1,
      "ordered_units":1,
      "completed_units_estimate":0,
      "needed_judgments":193,
      "all_judgments":108,
      "tainted_judgments":1,
      "completed_gold_estimate":0,
      "completed_non_gold_estimate":0
    } 

Job Object Response

{
      "id":000000,
      "options":{
      "logical_aggregation":true,
      "track_clones":true,
      "include_unfinished":true,
      "front_load":false,
      "after_gold":10
      },
      "title":null,
      "secret":"redacted",
      "project_number":null,
      "alias":null,
      "judgments_per_unit":3,
      "units_per_assignment":5,
      "pages_per_assignment":1,
      "max_judgments_per_worker":null,
      "max_judgments_per_ip":null,
      "gold_per_assignment":0,
      "minimum_account_age_seconds":null,
      "execution_mode":"worker_ui_remix",
      "payment_cents":10,
      "custom_key":null,
      "design_verified":true,
      "require_worker_login":null,
      "public_data":false,
      "variable_judgments_mode":"none",
      "max_judgments_per_unit":null,
      "expected_judgments_per_unit":null,
      "min_unit_confidence":null,
      "units_remain_finalized":null,
      "auto_order_timeout":null,
      "auto_order_threshold":null,
      "completed_at":null,
      "state":"unordered",
      "auto_order":false,
      "webhook_uri":null,
      "send_judgments_webhook":null,
      "language":"en",
      "minimum_requirements":null,
      "desired_requirements":null,
      "order_approved":true,
      "max_work_per_network":null,
      "copied_from":null,
      "created_at":"2014-03-21T03:10:54+00:00",
      "updated_at":"2014-03-21T03:10:54+00:00",
      "included_countries":[
      ],
      "excluded_countries":[
      ],
      "instructions":"",
      "cml":null,
      "js":null,
      "css":null,
      "problem":null,
      "confidence_fields":null,
      "gold":{
      },
      "units_count":0,
      "golds_count":0,
      "judgments_count":0,
      "support_email":"jdoe@crowdflower.com",
      "crowd_costs":0.0,
      "completed":false,
      "fields":null
      } 


 


Was this article helpful?
6 out of 15 found this helpful


Have more questions? Submit a request
Powered by Zendesk