{"id":512,"date":"2022-03-18T15:19:21","date_gmt":"2022-03-18T14:19:21","guid":{"rendered":"http:\/\/help-e.loops.education\/?p=512"},"modified":"2022-03-18T15:22:53","modified_gmt":"2022-03-18T14:22:53","slug":"webhook","status":"publish","type":"post","link":"https:\/\/help-e.loops.education\/index.php\/2022\/03\/18\/webhook\/","title":{"rendered":"Webhook"},"content":{"rendered":"\n<p><strong>Webhook<\/strong><\/p>\n\n\n\n<p>Loops can deliver real-time data packages of events from activities in your organization, to enable custom integrations with other systems.<\/p>\n\n\n\n<p>As an example, Loops can inform your implementation whenever a loop is started in your organization. To implement a listener to Loops webhooks isn&#8217;t that complex, but do require some programming.<\/p>\n\n\n\n<p>The delivery is made as a POST-request with a JSON-object as body. As multiple events can be delivered at the same time the object is defined as a list of events to accomodate this.<\/p>\n\n\n\n<p><strong>Events<\/strong><\/p>\n\n\n\n<p>The event object consists of an objects with two keys, &#8221;type&#8221; and &#8221;data&#8221;.<\/p>\n\n\n\n<p>The following types of events is handled by Loops:<\/p>\n\n\n\n<p>* Whenever a loop is started<\/p>\n\n\n\n<p>* Whenever a loop is terminated<\/p>\n\n\n\n<p>* Whenever a loop is revived<\/p>\n\n\n\n<p>* When participants are added to a loop<\/p>\n\n\n\n<p>* When participants are leaving a loop<\/p>\n\n\n\n<p><strong>Example<\/strong><\/p>\n\n\n\n<p>This is an example of a loop that just got started. The loop have two participants.<\/p>\n\n\n\n<p>[<\/p>\n\n\n\n<p>&nbsp; {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &#8221;type&#8221;: &#8221;SESSION_STARTED&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &#8221;data&#8221;: {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &#8221;uuid&#8221;: &#8221;7fa00242-52c6-486f-a041-874513dbc0e6&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &#8221;name&#8221;: &#8221;Digital Tools &#8211; Fall 2021&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &#8221;loopName&#8221;: &#8221;Digital Tools&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &#8221;participants&#8221;: [<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;userId&#8221;: 1,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;role&#8221;: &#8221;owner&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;state&#8221;: &#8221;invited&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;email&#8221;: &#8221;teacher@example.com&#8221;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; },<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; {<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;userId&#8221;: 2,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;role&#8221;: &#8221;pupil&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;state&#8221;: &#8221;invited&#8221;,<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &#8221;email&#8221;: &#8221;pupil@example.com&#8221;<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; &nbsp; },<\/p>\n\n\n\n<p>&nbsp; &nbsp; &nbsp; ]<\/p>\n\n\n\n<p>&nbsp; &nbsp; }<\/p>\n\n\n\n<p>&nbsp; }<\/p>\n\n\n\n<p>]<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/s3-eu-central-1.amazonaws.com\/euc-cdn.freshdesk.com\/data\/helpdesk\/attachments\/production\/77037435866\/original\/qyJF7OFLqQofK_dSfAQEYhf51giczEZvGg.png?1623682084\" alt=\"\"\/><\/figure>\n\n\n\n<p><strong><a href=\"https:\/\/sendgrid.com\/blog\/whats-webhook\/\">Read more about webhooks<\/a><\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Webhook Loops can deliver real-time data packages of events from activities in your organization, to enable custom integrations with other systems. As an example, Loops can inform your implementation whenever a loop is started in your organization. To implement a listener to Loops webhooks isn&#8217;t that complex, but do require some programming. The delivery is [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[169],"tags":[],"class_list":["post-512","post","type-post","status-publish","format-standard","hentry","category-avancerade-installningar"],"_links":{"self":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts\/512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/comments?post=512"}],"version-history":[{"count":2,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts\/512\/revisions"}],"predecessor-version":[{"id":516,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/posts\/512\/revisions\/516"}],"wp:attachment":[{"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/media?parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/categories?post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/help-e.loops.education\/index.php\/wp-json\/wp\/v2\/tags?post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}