{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/process-intelligence-apis/subscription-api/tutorials/learning/managing-subscription/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#managing-an-event-subscription\" aria-label=\"managing an event subscription permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"managing-an-event-subscription\"></div>Managing an event subscription</h1>\n<p>In this tutorial we will guide you through the different subscription management endpoints.</p>\n<h2 style=\"position:relative;\"><a href=\"#list-of-knowledge-models\" aria-label=\"list of knowledge models permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"list-of-knowledge-models\"></div>List of Knowledge Models</h2>\n<p>As you saw in the <a href=\"/process-intelligence-apis/subscription-api/get-started/getting-started/\">Getting Started page</a>, you can get the full list of Knowledge Models that you\nhave access to, creating a request to <code class=\"language-text\">https://&lt;team>.&lt;cluster>.celonis.cloud/intelligence/api/knowledge-models</code> (remember\nthat you need to replace <code class=\"language-text\">&lt;team></code> and <code class=\"language-text\">&lt;cluster></code> with your own values).</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 640px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 74.12280701754386%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAABm0lEQVQoz41SW27cMAzUIfLZriVSot6yY++u6/QABfpZ9Bz96F16qN4qIzsJsgjaZEALlsgRhxTVOI7zPE/ThPVyuZyfsOCEmbXW9AxjTM4F8ex8LlMZZwVOTKnWuq4rSNfrdf2ybtu2PqO1FkKIB1KOTptvv/Tvv3c//6jzNMYQcskSJKUk0Xsf8OWcsQ078HNkJmJLZojLp+uPz/N3NZbcWjW77wXOOWh+2UK8tRaJnbVaGzZDEipRFDGLCN0C2RC9p3qqFjEoDWs/ZBsiyq/KfBj0WslwwqeOi5n4yHKohfeGBljerUcQO7IeAtTDekE/C9pTM9qOl5AdHmXv9x4Fo5GchIPY6EiK1NWHrJb5HmR0OMXe6KPDfRWxeOdXUnc7NA/ibEoRNWu2Lp838BBzOg3DAO8O/S8Y+LpsFJlLWrav09RiEO9dCO9bjD2yk1P0pWLalqnlpaWxhJZ9zZgV9x8TcQrzYPvYEEvADCRn+3ygqUT6HZhO7nRmn2uJoUFFkCgOdjt1b56daM/cuWzFQ4LrWekjMwPKI9r6hp85jztJAAAAAElFTkSuQmCC'); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Knowledge Models response\"\n        title=\"Knowledge Models response\"\n        src=\"/static/2e0e81f6b671c184ceb2538595a9c81a/6af66/knowledge-models.png\"\n        srcset=\"/static/2e0e81f6b671c184ceb2538595a9c81a/d4770/knowledge-models.png 228w,\n/static/2e0e81f6b671c184ceb2538595a9c81a/379c3/knowledge-models.png 455w,\n/static/2e0e81f6b671c184ceb2538595a9c81a/6af66/knowledge-models.png 640w\"\n        sizes=\"(max-width: 640px) 100vw, 640px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 style=\"position:relative;\"><a href=\"#list-of-knowledge-model-triggers\" aria-label=\"list of knowledge model triggers permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"list-of-knowledge-model-triggers\"></div>List of Knowledge Model Triggers</h2>\n<p>You can get the full list of triggers that a Knowledge Model has, creating a request to\n<code class=\"language-text\">https://&lt;team>.&lt;cluster>.celonis.cloud/intelligence/api/knowledge-models/&lt;km_id>/triggers</code>. For this URL, you will need to\nreplace the <code class=\"language-text\">&lt;km_id></code> with the Knowledge Model id that you got from the previous endpoint.</p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 800px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 74.56140350877195%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAPCAIAAABr+ngCAAAACXBIWXMAAAsTAAALEwEAmpwYAAABfElEQVQoz41SW07DMBD0LQChkjher99J3ZKkERUSf5ygd0Dik7NwES7IxFWrVqiloyiy1zuzu2OLtm1zzl3XLZfL1WqV8eW8LMACpzjCQkq5WCystYiTkp6ecnIi51WMMaU0DEPf90M/jOM4TdNYsNls8Ef8uSCmNrBstjv58XO3+xbrnI0xIQQXfUwR/1CAmlDEYi9tC7Rmaqq63T6+fz28fYp1ishSStWylk0jG1nXdVOAVusCWUBESJNIqha6undUCYQgKefYnD2zZVOK6FMVbPf1sYaE8wEmiSPtCGxx3PzBHJQHtbmhSuSuhZ5zzjijjfbenzKPitY7HQw5Vk4rEyj0SnvxMm1wO7Z4BiZ6gxAs8tYw0WHeM6DonBOTUERs2MaOrTlv/xrAZ2YBB4l0N72G1Krb2QUCA2JIE5Jmo87n/J+8vz34yD4G5zrHTKq+kYwLVHPnxA4emWTZXPDpIhmltfXzO2UN8q1tcwFG3b/E6uQ9XncblX4BmuiFcEWM+y8AAAAASUVORK5CYII='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Knowledge Models filters\"\n        title=\"Knowledge Models filters\"\n        src=\"/static/dc769b4ed9ccdfeb92cf981b2bc2e8b2/5a190/filters.png\"\n        srcset=\"/static/dc769b4ed9ccdfeb92cf981b2bc2e8b2/d4770/filters.png 228w,\n/static/dc769b4ed9ccdfeb92cf981b2bc2e8b2/379c3/filters.png 455w,\n/static/dc769b4ed9ccdfeb92cf981b2bc2e8b2/5a190/filters.png 800w\"\n        sizes=\"(max-width: 800px) 100vw, 800px\"\n        style=\"width:100%;height:100%;margin:0;vertical-align:middle;position:absolute;top:0;left:0;\"\n        loading=\"lazy\"\n      />\n    </span></p>\n<h2 style=\"position:relative;\"><a href=\"#creating-a-new-subscription\" aria-label=\"creating a new subscription permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"creating-a-new-subscription\"></div>Creating a new Subscription</h2>\n<p>To create a new subscription for an Celonis KM Trigger you need to consume the next endpoint.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"58613656302239180000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`POST\n/knowledge-models/{{km-id}}/triggers/{{trigger-id}}/subscriptions\n\n{\n    &quot;name&quot;: &quot;new subscription with headers&quot;,\n    &quot;callbackInfo&quot;: {\n        &quot;uri&quot;: &quot;https://my-awesome-webhook.com&quot;,\n        &quot;protocol&quot;:&quot;HTTPS&quot;,\n        &quot;headers&quot;: {\n            &quot;Authorization&quot; : &quot;my bearer token&quot;\n        }\n    }\n}`, `58613656302239180000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-58613656302239180000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">POST\n/knowledge-models/{{km-id}}/triggers/{{trigger-id}}/subscriptions\n\n{\n    \"name\": \"new subscription with headers\",\n    \"callbackInfo\": {\n        \"uri\": \"https://my-awesome-webhook.com\",\n        \"protocol\":\"HTTPS\",\n        \"headers\": {\n            \"Authorization\" : \"my bearer token\"\n        }\n    }\n}</code></pre></div>\n      </div>\n<p><code>km-id</code> refers to the knowledge model that is existing at the Celonis Platform.\n<code>trigger-id</code> refers to the trigger that is existing at the Celonis Platform.</p>\n<p>All the attributes (with the exception of the headers) of the payload are mandatory.</p>\n<p><code>name</code> must be shorter than 1024.\n<code>callbackInfo.uri</code> uri used for the API to forward events emitted from Celonis Platform.\n<code>callbackInfo.protocol</code> the protocol used to forward events emitted from the Celonis Platform. It must fit with the callbackInfo.uri attribute. Otherwise it will fail into a Bad Request.\n<code>callbackInfo.headers</code> map of key/value regarding all the headers that will be attached from the API when the event is forwarded to the consumer.</p>\n<h2 style=\"position:relative;\"><a href=\"#updating-an-existing-subscription\" aria-label=\"updating an existing subscription permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"updating-an-existing-subscription\"></div>Updating an existing Subscription</h2>\n<p>To update an existing subscription, you need to consume the next endpoint.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"27679044304217194000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`PUT\n/subscriptions/{{subscription-id}}\n\n{\n    &quot;name&quot;: &quot;updated subscription with headers&quot;,\n    &quot;callbackInfo&quot;: {\n        &quot;uri&quot;: &quot;https://my-awesome-webhook.com&quot;,\n        &quot;protocol&quot;:&quot;HTTPS&quot;,\n        &quot;headers&quot;: {\n            &quot;Authorization&quot; : &quot;my bearer token&quot;\n        }\n    }\n}`, `27679044304217194000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-27679044304217194000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">PUT\n/subscriptions/{{subscription-id}}\n\n{\n    \"name\": \"updated subscription with headers\",\n    \"callbackInfo\": {\n        \"uri\": \"https://my-awesome-webhook.com\",\n        \"protocol\":\"HTTPS\",\n        \"headers\": {\n            \"Authorization\" : \"my bearer token\"\n        }\n    }\n}</code></pre></div>\n      </div>\n<p><code>subscription-id</code> refers to the subscription to update. It must exist in the API.</p>\n<p>All the attributes of the payload (with the exception of the headers) are mandatory.</p>\n<ul>\n<li>\n<code>\nname\n</code>\n the subscription name, which must be must be shorter than 1024 characters.\n</li>\n<li>\n<code>\ncallbackInfo.uri\n</code>\n uri used for the API to forward events emitted from Celonis Platform.\n</li>\n<li>\n<code>\ncallbackInfo.protocol\n</code>\n the protocol used to forward events emitted from the Celonis Platform. It must fit with the callbackInfo.uri attribute. Otherwise it will fail into a Bad Request.\n</li>\n<li>\n<code>\ncallbackInfo.headers\n</code>\n map of key/value regarding all the headers that will be attached from the API when the event is forwarded to the consumer.\n</li>\n</ul>\n<p>In case of updating a Subscription which was failing, it will be set back to ACTIVE status.</p>\n<h2 style=\"position:relative;\"><a href=\"#pausing-a-subscription\" aria-label=\"pausing a subscription permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"pausing-a-subscription\"></div>Pausing a Subscription</h2>\n<p>To pause an active subscription, you need to consume the next endpoint.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"50627759904766665000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`PATCH\n/subscriptions/{{subscription-id}}/pause`, `50627759904766665000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-50627759904766665000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">PATCH\n/subscriptions/{{subscription-id}}/pause</code></pre></div>\n      </div>\n<p><code>subscription-id</code> refers to the subscription to pause. It must exist in the API.</p>\n<p>Once the subscription is paused, it will not stop forwarding events generated by Celonis Platform. Those events aren't lost and will be sent to the consumer once the subscription is resumed.</p>\n<h2 style=\"position:relative;\"><a href=\"#resuming-a-subscription\" aria-label=\"resuming a subscription permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"resuming-a-subscription\"></div>Resuming a Subscription</h2>\n<p>To resume a paused subscription, you need to consume the next endpoint.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"30517524917241600000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`PATCH\n/subscriptions/{{subscription-id}}/resume`, `30517524917241600000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-30517524917241600000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">PATCH\n/subscriptions/{{subscription-id}}/resume</code></pre></div>\n      </div>\n<p><code>subscription-id</code> refers to the subscription to resume. It must exist in the API.</p>\n<p>Once the subscription is resumed, it will forward new events generated by Celonis Platform, as well as the events that were pending when the subscription was paused.</p>\n<h2 style=\"position:relative;\"><a href=\"#unsubscribing\" aria-label=\"unsubscribing permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"unsubscribing\"></div>Unsubscribing</h2>\n<p>To remove an existing subscription you need to consume the next endpoint.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"11421070374502840000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`DELETE\n/subscriptions/{{subscription-id}}`, `11421070374502840000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-11421070374502840000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">DELETE\n/subscriptions/{{subscription-id}}</code></pre></div>\n      </div>\n<p><code>subscription-id</code> refers to the subscription to unsubscribe. It must exist in the API.</p>\n<p>Once this action is executed, the subscription will be no longer visible at Celonis Platform, and all its data is removed from the API.</p>\n<h2 style=\"position:relative;\"><a href=\"#manual-extraction-reconcile-endpoint\" aria-label=\"manual extraction reconcile endpoint permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"manual-extraction-reconcile-endpoint\"></div>Manual extraction (reconcile endpoint)</h2>\n<p>If the subscription is failing, in the meanwhile the subscription is fixed, is possible to manually extract the data from Celonis Platform in short batches.\nThis is what is called the Reconciliation.</p>\n<p>To manually extract data, you need to consume the next endpoint.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"2625195198065122300\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`PATCH\n/subscriptions/{{subscription-id}}/events`, `2625195198065122300`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-2625195198065122300\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">PATCH\n/subscriptions/{{subscription-id}}/events</code></pre></div>\n      </div>\n<p><code>subscription-id</code> refers to the subscription to reconcile. It must exist in the API.</p>\n<p>Once this action is executed, the next 50 events will be taken. Bear in mind this action will remove those events from the system.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"76900099187634960000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n    &quot;pageSize&quot;: 2,\n    &quot;total&quot;: 0,\n    &quot;content&quot;: [\n        {\n            &quot;subscriptionId&quot;: &quot;XXX-YYY-ZZZZ&quot;,\n            &quot;triggerId&quot;: &quot;97185b79-d6e9-4425-bbee-225627533149&quot;,\n            &quot;signal&quot;: &quot;{\\\\&quot;id\\\\&quot;:\\\\&quot;a8ffef1d-aba0-4520-ae1a-02cecc7b7e4e\\\\&quot;,\\\\&quot;recordIdentifier\\\\&quot;:\\\\&quot;800A3000531000\\\\&quot;,\\\\&quot;typedRecordIdentifier\\\\&quot;:\\\\&quot;800A3000531000\\\\&quot;,\\\\&quot;attributes\\\\&quot;:[{\\\\&quot;attributeId\\\\&quot;:\\\\&quot;ATTRIBUTE_1\\\\&quot;,\\\\&quot;signalId\\\\&quot;:\\\\&quot;a8ffef1d-aba0-4520-ae1a-02cecc7b7e4e\\\\&quot;,\\\\&quot;value\\\\&quot;:null,\\\\&quot;columnType\\\\&quot;:\\\\&quot;STRING\\\\&quot;}],\\\\&quot;creationDate\\\\&quot;:1699010395821}&quot;\n        },\n        {\n            &quot;subscriptionId&quot;: &quot;XXX-YYY-ZZZZ&quot;,\n            &quot;triggerId&quot;: &quot;97185b79-d6e9-4425-bbee-225627533149&quot;,\n            &quot;signal&quot;: &quot;{\\\\&quot;id\\\\&quot;:\\\\&quot;8cf03551-471c-41f0-a85c-e88646eef354\\\\&quot;,\\\\&quot;recordIdentifier\\\\&quot;:\\\\&quot;80000000130071000\\\\&quot;,\\\\&quot;typedRecordIdentifier\\\\&quot;:\\\\&quot;80000000130071000\\\\&quot;,\\\\&quot;attributes\\\\&quot;:[{\\\\&quot;attributeId\\\\&quot;:\\\\&quot;ATTRIBUTE_1\\\\&quot;,\\\\&quot;signalId\\\\&quot;:\\\\&quot;8cf03551-471c-41f0-a85c-e88646eef354\\\\&quot;,\\\\&quot;value\\\\&quot;:\\\\&quot;D1\\\\&quot;,\\\\&quot;columnType\\\\&quot;:\\\\&quot;STRING\\\\&quot;}],\\\\&quot;creationDate\\\\&quot;:1699010395821}&quot;\n        }\n    ]\n}`, `76900099187634960000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-76900099187634960000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">{\n    \"pageSize\": 2,\n    \"total\": 0,\n    \"content\": [\n        {\n            \"subscriptionId\": \"XXX-YYY-ZZZZ\",\n            \"triggerId\": \"97185b79-d6e9-4425-bbee-225627533149\",\n            \"signal\": \"{\\\"id\\\":\\\"a8ffef1d-aba0-4520-ae1a-02cecc7b7e4e\\\",\\\"recordIdentifier\\\":\\\"800A3000531000\\\",\\\"typedRecordIdentifier\\\":\\\"800A3000531000\\\",\\\"attributes\\\":[{\\\"attributeId\\\":\\\"ATTRIBUTE_1\\\",\\\"signalId\\\":\\\"a8ffef1d-aba0-4520-ae1a-02cecc7b7e4e\\\",\\\"value\\\":null,\\\"columnType\\\":\\\"STRING\\\"}],\\\"creationDate\\\":1699010395821}\"\n        },\n        {\n            \"subscriptionId\": \"XXX-YYY-ZZZZ\",\n            \"triggerId\": \"97185b79-d6e9-4425-bbee-225627533149\",\n            \"signal\": \"{\\\"id\\\":\\\"8cf03551-471c-41f0-a85c-e88646eef354\\\",\\\"recordIdentifier\\\":\\\"80000000130071000\\\",\\\"typedRecordIdentifier\\\":\\\"80000000130071000\\\",\\\"attributes\\\":[{\\\"attributeId\\\":\\\"ATTRIBUTE_1\\\",\\\"signalId\\\":\\\"8cf03551-471c-41f0-a85c-e88646eef354\\\",\\\"value\\\":\\\"D1\\\",\\\"columnType\\\":\\\"STRING\\\"}],\\\"creationDate\\\":1699010395821}\"\n        }\n    ]\n}</code></pre></div>\n      </div>\n<p><code>pageSize</code> refers to the events returned in the page.\n<code>total</code> refers to the total events still at the API.\n<code>content</code> events as raw JSON.</p>\n<h2 style=\"position:relative;\"><a href=\"#replay-a-subscription\" aria-label=\"replay a subscription permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"replay-a-subscription\"></div>Replay a subscription</h2>\n<p>To replay the subscription to receive events from a position, you need to consume the next endpoint.</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"54128852903669514000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`PATCH\n/subscriptions/{{subscription-id}}/replay?fromOffset=10`, `54128852903669514000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-54128852903669514000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">PATCH\n/subscriptions/{{subscription-id}}/replay?fromOffset=10</code></pre></div>\n      </div>\n<p><code>subscription-id</code> refers to the subscription to replay. It must exist in the API.</p>\n<p>Optionally, you can specify the offset from receiving past events. Just append the <code class=\"language-text\">fromOffset</code> url parameter with a value between 0 and the latest known position.</p>\n<h2 style=\"position:relative;\"><a href=\"#untransferred-data\" aria-label=\"untransferred data permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"untransferred-data\"></div>Untransferred data</h2>\n<p>Untransferred data means the data unable to forward to the consumer but saved at the API to retry later. The data can be saved at the API under two circunstances:</p>\n<ul>\n<li>\nThe subscription started to fail and is still within the time window to sort it out (after 8 hours the service is suspended).\n</li>\n<li>\nThe subscription is paused.\n</li>\n</ul>\n<p>Untransferred data can be manually extracted using the reconcile endpoint.\nBut for active subscriptions with data remaining in the API, every 10 minutes our API will retry to forward the data to the consumer.</p>\n<p>Finally, the data is kept at the API for 7 days, after the period of time all the pending data will be discarded.</p>","headings":[{"value":"Managing an event subscription","depth":1},{"value":"List of Knowledge Models","depth":2},{"value":"List of Knowledge Model Triggers","depth":2},{"value":"Creating a new Subscription","depth":2},{"value":"Updating an existing Subscription","depth":2},{"value":"Pausing a Subscription","depth":2},{"value":"Resuming a Subscription","depth":2},{"value":"Unsubscribing","depth":2},{"value":"Manual extraction (reconcile endpoint)","depth":2},{"value":"Replay a subscription","depth":2},{"value":"Untransferred data","depth":2}]},"contentItem":{"data":{"lastModified":"2025-01-28T15:05:42.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":false,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"9848f3d7-7645-5d26-9182-0c4c55392028__redocly content/process-intelligence-apis/subscription-api/tutorials/learning/managing-subscription/","seo":{"title":"Managing an event subscription","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"process-intelligence-apis/subscription-api/tutorials/learning/managing-subscription.md","pageBaseUrl":"/process-intelligence-apis/subscription-api/tutorials/learning/managing-subscription","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Managing an event subscription","id":"managing-an-event-subscription"},{"depth":2,"value":"List of Knowledge Models","id":"list-of-knowledge-models"},{"depth":2,"value":"List of Knowledge Model Triggers","id":"list-of-knowledge-model-triggers"},{"depth":2,"value":"Creating a new Subscription","id":"creating-a-new-subscription"},{"depth":2,"value":"Updating an existing Subscription","id":"updating-an-existing-subscription"},{"depth":2,"value":"Pausing a Subscription","id":"pausing-a-subscription"},{"depth":2,"value":"Resuming a Subscription","id":"resuming-a-subscription"},{"depth":2,"value":"Unsubscribing","id":"unsubscribing"},{"depth":2,"value":"Manual extraction (reconcile endpoint)","id":"manual-extraction-reconcile-endpoint"},{"depth":2,"value":"Replay a subscription","id":"replay-a-subscription"},{"depth":2,"value":"Untransferred data","id":"untransferred-data"}]},"data":{"title":""},"catalogInfo":null,"link":"/process-intelligence-apis/subscription-api/tutorials/learning/managing-subscription/","sidebarName":"celonis","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}