{"id":96,"date":"2013-11-05T13:30:47","date_gmt":"2013-11-05T13:30:47","guid":{"rendered":"http:\/\/www.blog.microworkers.com\/?p=96"},"modified":"2013-11-26T13:16:47","modified_gmt":"2013-11-26T13:16:47","slug":"api-tutorial-introduction","status":"publish","type":"post","link":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/","title":{"rendered":"API Tutorial \u2013 Introduction"},"content":{"rendered":"<style type=\"text\/css\"><!--\nP { margin-bottom: 0.21cm; }\n--><\/style>\n<p>Welcome to our first tutorial! This will also will be the start of a whole series of blog posts regarding one of our new major features in the Beta Platform \u2013 the API.<\/p>\n<p>The API allows you to automatically create campaigns, rate tasks, add worker to groups and much more. This is all done via a RESTful interface provided by the Microworkers.com Beta Platform.<\/p>\n<p>We have already made available some basic examples on how to use the API but decided it\u2019s time for a fully worked out application showing how all the pieces have come together. Thus, we decided to write a small Comment Moderation System.<\/p>\n<style type=\"text\/css\"><!--\nP { margin-bottom: 0.21cm; }\n--><\/style>\n<p><i>You can try out the completely finished Comment Moderation System at <a title=\"Comment Moderation Demo\" href=\"http:\/\/commentmoderation.demo.microworkers.com\">commentmoderation.demo.microworkers.com<\/a>. <\/i><\/p>\n<p>In a nutshell, users are able to post comments on a Website, which are set to pending review before they are published. Instead of moderating these comments ourselves, we will use the Microworkers.com Workforce\u00a0 to instead\u00a0 do this for us. Therefore, our Comment Moderation System will group all these pending comments into one campaign, send it out and start it immediately via the API. As different workers may have different opinions on whether to approve or decline a comment, we will use a majority vote system. In detail every comment will be reviewed by 3 workers, and once all reviews are in, our application will decide if the comment can be published. At last the Comment Moderation System will automatically rate the workers as soon as the task is submitted. The workflow is depicted in the image below.<\/p>\n<p><a href=\"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-99\" alt=\"workflow\" src=\"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow-300x223.png\" width=\"300\" height=\"223\" srcset=\"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow-300x223.png 300w, https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow-1024x763.png 1024w, https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow.png 1287w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<style type=\"text\/css\"><!--\nP { margin-bottom: 0.21cm; }\n--><\/style>\n<p>&nbsp;<\/p>\n<p>In case you want to code along here is a list of things you will need:<\/p>\n<ul>\n<li>A webserver able to run PHP<\/li>\n<li>A MySQL database<\/li>\n<li>A valid Microworkers.com Beta API key<\/li>\n<li>Beginner to Intermediate programming skills in HTML,CSS,PHP and MySQL<\/li>\n<\/ul>\n<p>The series is structured as follows:<\/p>\n<ul>\n<li><b>Introduction<\/b>: You are reading it now \ud83d\ude09<\/li>\n<li><a title=\"Microworkers Comment Moderation Part One\" href=\"https:\/\/www.microworkers.com\/blog\/api-tutorial-part-i\/\"><b>Part I<\/b><\/a>: In this post we will create a simple Website enabling a visitor to leave a comment. To keep things simple we have decided not to base our application on an existing system, like for example, WordPress.<\/li>\n<li><a title=\"Microworkers Comment Moderation Part Two\" href=\"https:\/\/www.microworkers.com\/blog\/api-tutorial-part-ii\/\"><b>Part II<\/b><\/a>: This post will cover how a campaign will be created and started based on the comments awaiting approval.<\/li>\n<li><a title=\"Microworkers Comment Moderation Part Three\" href=\"https:\/\/www.microworkers.com\/blog\/api-tutorial-part-iii\/\"><b>Part III<\/b><\/a>: At last we will show you how the automated rating of the submitted tasks will work.<\/li>\n<\/ul>\n<p>So sit tight and enjoy the upcoming posts.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Welcome to our first tutorial! This will also will be the start of a whole series of blog posts regarding one of our new major features in the Beta Platform \u2013 the API. The API allows you to automatically create campaigns, rate tasks, add worker to groups and much more. This is all done via [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[],"class_list":["post-96","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>API Tutorial \u2013 Introduction - MicroWorkers<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"API Tutorial \u2013 Introduction - MicroWorkers\" \/>\n<meta property=\"og:description\" content=\"Welcome to our first tutorial! This will also will be the start of a whole series of blog posts regarding one of our new major features in the Beta Platform \u2013 the API. The API allows you to automatically create campaigns, rate tasks, add worker to groups and much more. This is all done via [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/\" \/>\n<meta property=\"og:site_name\" content=\"MicroWorkers\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/microworkerscom\/\" \/>\n<meta property=\"article:published_time\" content=\"2013-11-05T13:30:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2013-11-26T13:16:47+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow-300x223.png\" \/>\n<meta name=\"author\" content=\"Microworkers Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@microworkers\" \/>\n<meta name=\"twitter:site\" content=\"@microworkers\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Microworkers Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/\"},\"author\":{\"name\":\"Microworkers Team\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#\\\/schema\\\/person\\\/1b51bb6e5313593a1e396321287a00c5\"},\"headline\":\"API Tutorial \u2013 Introduction\",\"datePublished\":\"2013-11-05T13:30:47+00:00\",\"dateModified\":\"2013-11-26T13:16:47+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/\"},\"wordCount\":403,\"commentCount\":16,\"publisher\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/workflow-300x223.png\",\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/\",\"url\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/\",\"name\":\"API Tutorial \u2013 Introduction - MicroWorkers\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/workflow-300x223.png\",\"datePublished\":\"2013-11-05T13:30:47+00:00\",\"dateModified\":\"2013-11-26T13:16:47+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/workflow.png\",\"contentUrl\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/11\\\/workflow.png\",\"width\":1287,\"height\":960},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/api-tutorial-introduction\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.microworkers.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"API Tutorial \u2013 Introduction\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#website\",\"url\":\"https:\\\/\\\/www.microworkers.com\\\/\",\"name\":\"MicroWorkers\",\"description\":\"The Official Blog\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.microworkers.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#organization\",\"name\":\"Microworkers\",\"url\":\"https:\\\/\\\/www.microworkers.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/logo505.png\",\"contentUrl\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/wp-content\\\/uploads\\\/2019\\\/04\\\/logo505.png\",\"width\":387,\"height\":56,\"caption\":\"Microworkers\"},\"image\":{\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/microworkerscom\\\/\",\"https:\\\/\\\/x.com\\\/microworkers\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.microworkers.com\\\/#\\\/schema\\\/person\\\/1b51bb6e5313593a1e396321287a00c5\",\"name\":\"Microworkers Team\",\"url\":\"https:\\\/\\\/www.microworkers.com\\\/blog\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"API Tutorial \u2013 Introduction - MicroWorkers","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/","og_locale":"en_US","og_type":"article","og_title":"API Tutorial \u2013 Introduction - MicroWorkers","og_description":"Welcome to our first tutorial! This will also will be the start of a whole series of blog posts regarding one of our new major features in the Beta Platform \u2013 the API. The API allows you to automatically create campaigns, rate tasks, add worker to groups and much more. This is all done via [&hellip;]","og_url":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/","og_site_name":"MicroWorkers","article_publisher":"https:\/\/www.facebook.com\/microworkerscom\/","article_published_time":"2013-11-05T13:30:47+00:00","article_modified_time":"2013-11-26T13:16:47+00:00","og_image":[{"url":"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow-300x223.png","type":"","width":"","height":""}],"author":"Microworkers Team","twitter_card":"summary_large_image","twitter_creator":"@microworkers","twitter_site":"@microworkers","twitter_misc":{"Written by":"Microworkers Team","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#article","isPartOf":{"@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/"},"author":{"name":"Microworkers Team","@id":"https:\/\/www.microworkers.com\/#\/schema\/person\/1b51bb6e5313593a1e396321287a00c5"},"headline":"API Tutorial \u2013 Introduction","datePublished":"2013-11-05T13:30:47+00:00","dateModified":"2013-11-26T13:16:47+00:00","mainEntityOfPage":{"@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/"},"wordCount":403,"commentCount":16,"publisher":{"@id":"https:\/\/www.microworkers.com\/#organization"},"image":{"@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow-300x223.png","articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/","url":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/","name":"API Tutorial \u2013 Introduction - MicroWorkers","isPartOf":{"@id":"https:\/\/www.microworkers.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#primaryimage"},"image":{"@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#primaryimage"},"thumbnailUrl":"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow-300x223.png","datePublished":"2013-11-05T13:30:47+00:00","dateModified":"2013-11-26T13:16:47+00:00","breadcrumb":{"@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#primaryimage","url":"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow.png","contentUrl":"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2013\/11\/workflow.png","width":1287,"height":960},{"@type":"BreadcrumbList","@id":"https:\/\/www.microworkers.com\/blog\/api-tutorial-introduction\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.microworkers.com\/"},{"@type":"ListItem","position":2,"name":"API Tutorial \u2013 Introduction"}]},{"@type":"WebSite","@id":"https:\/\/www.microworkers.com\/#website","url":"https:\/\/www.microworkers.com\/","name":"MicroWorkers","description":"The Official Blog","publisher":{"@id":"https:\/\/www.microworkers.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.microworkers.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.microworkers.com\/#organization","name":"Microworkers","url":"https:\/\/www.microworkers.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.microworkers.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2019\/04\/logo505.png","contentUrl":"https:\/\/www.microworkers.com\/blog\/wp-content\/uploads\/2019\/04\/logo505.png","width":387,"height":56,"caption":"Microworkers"},"image":{"@id":"https:\/\/www.microworkers.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/microworkerscom\/","https:\/\/x.com\/microworkers"]},{"@type":"Person","@id":"https:\/\/www.microworkers.com\/#\/schema\/person\/1b51bb6e5313593a1e396321287a00c5","name":"Microworkers Team","url":"https:\/\/www.microworkers.com\/blog\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/posts\/96","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":6,"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":117,"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/posts\/96\/revisions\/117"}],"wp:attachment":[{"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.microworkers.com\/blog\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}