What is Clickworker API anyway? – Pt. II
In the first Techtalk article, I described the various ways a client can use the clickworker platform. In addition to our two main service avenues, Marketplace and Solutions team project development, we offer an automated order and result delivery system which presents many new benefits to clients, particularly for those with more complex orders. One primary benefit of this new system is clients no longer having to deal with the manual transferring of every data set via email or web browser and the manual retrieving of results. This can be completely automatized.
In order to describe the operational sequence behind a REST API assignment, let us consider an example project. To keep things simple, this project consists of just one step:
We have a large collection of several thousand pictures which we would like to have organized into four categories. In order to do this, a project is set up so that each individual job appears with one picture and a list of possible categories. The clickworker must then select a category to assign to the picture. For example, if the picture is of someone playing in a tennis match, the correct category to assign would be “sport”.
For every picture we would like categorized, the picture’s URL address and list of possible categories need to be sent to the Clickworker REST API server. As our first picture, we choose Picture URL: //www.clickworker.com/images/image_1.png and for possible categories, we choose: sports, hobby, occupation, music.
Technically speaking, these data are sent as “xml-files”. Below is an example of transfer via the cURL program:
To the server we send project-independent and essential data (e.g. the API version), a “time stamp” and the job ID (“categorization” in this case), and also any information that is necessary for the processing of individual jobs (e.g. “picture_url” for the picture address and “cat1” to “cat4” for the possible categories). As an answer to this call, we receive a task ID which we need in order to retrieve results:
The XML data is then turned into a categorization order on the Clickworker API server. This order is then placed in the Workplace where clickworkers can start working on it. When the clickworker chooses the job and saves the results, we can upload the completed tasks:
The answer from the server will then read:
The clickworker categorizes the photo as “sport“ and as the results are received, the task is no longer made available.
The rest of the photos are similarly processed and for each a XML data set is created and sent to the Clickworker REST API for order generation for the category to be approved.
This simple example shows the potential of the REST API. It can also be used for much more complex processes. In the near future we will also be able to use the Marketplace through an API alone, so that our clients can determine the process and data structure themselves.
You can also read a reference from a job done through the Clickworker REST API here:
(written by: Jörg Sädtler, Software Developer and part of the clickworker.com tech team)