{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/process-intelligence-apis/knowledge-model-api/tutorials/learning/retrieve-record-data/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#retrieving-record-data\" aria-label=\"retrieving record 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=\"retrieving-record-data\"></div>Retrieving record data</h1>\n<p>Once you understand <a href=\"/process-intelligence-apis/knowledge-model-api/tutorials/learning/exploring-schema/\">how the schema endpoints work</a>, you are ready to start getting data for the\nrecords.</p>\n<h2 style=\"position:relative;\"><a href=\"#data-endpoint\" aria-label=\"data 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=\"data-endpoint\"></div>Data endpoint</h2>\n<p>In order to get data for a record, you need to start building the URL for the Knowledge Model and record you want to\nconsume. This URL should follow this pattern:\n<code class=\"language-text\">https://&lt;team>.&lt;cluster>.celonis.cloud/intelligence/api/knowledge-models/&lt;km_id>/records/&lt;record_id>/data</code> where:</p>\n<ul>\n<li>\n<code class=\"language-text\">&lt;team></code>\n is the name for your team in the EMS\n</li>\n<li>\n<code class=\"language-text\">&lt;cluster></code>\n the cluster assigned for you (i.e. us-2, eu-3, etc.)\n</li>\n<li>\n<code class=\"language-text\">&lt;km_id></code>\n the id for the Knowledge Model you want to query. You can get it through the schema endpoints.\n</li>\n<li>\n<code class=\"language-text\">&lt;record_id></code>\n id for the record. You can get this through the schema endpoints.\n</li>\n</ul>\n<h2 style=\"position:relative;\"><a href=\"#specifying-the-fields-that-you-want-to-consume\" aria-label=\"specifying the fields that you want to consume 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=\"specifying-the-fields-that-you-want-to-consume\"></div>Specifying the fields that you want to consume</h2>\n<p>The above URL won't do much on its own. You need to specify the list of fields that you want to consume. </p>\n<p>Call fields to one of the following:</p>\n<ul>\n<li>\nAttributes\n</li>\n<li>\nAugmented Attributes\n</li>\n<li>\nFlags\n</li>\n</ul>\n<p>In order to specify which fields you want to get data for, you need to pass a <code class=\"language-text\">fields</code> query parameter and specify the\nlist of field ids that you previously got from the record schema endpoint separated by commas. For example, if you want to get\nthe data for three fields called ID, ACTIVITIES and EVENTTIME, then you need to specify the query parameter in the following way:\n<code class=\"language-text\">fields: ID, ACTIVITIES, EVENTTIME</code>. Keep in mind that the ids are case sensitive. In Postman, this should look like this: </p>\n<p><span\n      class=\"gatsby-resp-image-wrapper\"\n      style=\"position: relative; display: block; margin-left: auto; margin-right: auto; max-width: 910px; \"\n    >\n      <span\n    class=\"gatsby-resp-image-background-image\"\n    style=\"padding-bottom: 26.31578947368421%; position: relative; bottom: 0; left: 0; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAFCAIAAADKYVtkAAAACXBIWXMAAAsTAAALEwEAmpwYAAAArElEQVQY02VOyRHCMBBzD3yZ8ZU462sdnDgV0AI18KMc6qE0RDzDMeihWWultQRzCSEQ0bIsrbV1XcGYc87M/OaUEjiXeQ6jPF+Pt8fhchftVJij9yHxywEOMdBEzjlcHHdg0ForpXSHHeRUFFVBbkwxGmP6DiylHHZ83PBb673HIUgw0+TQV2zbVmvVu9SBGQ0g9qqIQUGsh7GHgi4xRoE3PjG/wPpf+bb1gk8g8i8ucNiy2gAAAABJRU5ErkJggg=='); background-size: cover; display: block;\"\n  ></span>\n  <img\n        class=\"gatsby-resp-image-image\"\n        alt=\"Fields parameter\"\n        title=\"Fields parameter\"\n        src=\"/static/06ecfd0a654b1aa88c681be17a220301/c6bbc/fields-parameter.png\"\n        srcset=\"/static/06ecfd0a654b1aa88c681be17a220301/d4770/fields-parameter.png 228w,\n/static/06ecfd0a654b1aa88c681be17a220301/379c3/fields-parameter.png 455w,\n/static/06ecfd0a654b1aa88c681be17a220301/c6bbc/fields-parameter.png 910w,\n/static/06ecfd0a654b1aa88c681be17a220301/d8104/fields-parameter.png 1365w,\n/static/06ecfd0a654b1aa88c681be17a220301/b4904/fields-parameter.png 1768w\"\n        sizes=\"(max-width: 910px) 100vw, 910px\"\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<p>If the information is correct, you should get a response like this: </p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"40902607739922360000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n  &quot;page&quot;: 0,\n  &quot;pageSize&quot;: 50,\n  &quot;total&quot;: 2,\n  &quot;sort&quot;: [],\n  &quot;content&quot;: {\n    &quot;headers&quot;: [\n      {\n        &quot;id&quot;: &quot;ID&quot;,\n        &quot;name&quot;: &quot;Id&quot;,\n        &quot;type&quot;: &quot;integer&quot;,\n        &quot;format&quot;: &quot;,.0f&quot;,\n        &quot;aggregation&quot;: false,\n        &quot;filterable&quot;: true,\n        &quot;sortable&quot;: true\n      },\n      {\n        &quot;id&quot;: &quot;EVENTTIME&quot;,\n        &quot;name&quot;: &quot;Eventtime&quot;,\n        &quot;type&quot;: &quot;date&quot;,\n        &quot;format&quot;: &quot;%Y-%m-%d&quot;,\n        &quot;aggregation&quot;: false,\n        &quot;filterable&quot;: true,\n        &quot;sortable&quot;: true\n      },\n      {\n        &quot;id&quot;: &quot;ACTIVITIES&quot;,\n        &quot;name&quot;: &quot;Activities&quot;,\n        &quot;type&quot;: &quot;string&quot;,\n        &quot;aggregation&quot;: false,\n        &quot;filterable&quot;: true,\n        &quot;sortable&quot;: true\n      }\n    ],\n    &quot;data&quot;: [\n      {\n        &quot;EVENTTIME&quot;: &quot;2015-05-01&quot;,\n        &quot;ACTIVITIES&quot;: &quot;Put in the oven&quot;,\n        &quot;ID&quot;: 1\n      },\n      {\n        &quot;EVENTTIME&quot;: &quot;2015-05-01&quot;,\n        &quot;ACTIVITIES&quot;: &quot;Roll out the dough&quot;,\n        &quot;ID&quot;: 0\n      }\n    ]\n  }\n}`, `40902607739922360000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-40902607739922360000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n  <span class=\"token property\">\"page\"</span><span class=\"token operator\">:</span> <span class=\"token number\">0</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"pageSize\"</span><span class=\"token operator\">:</span> <span class=\"token number\">50</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"total\"</span><span class=\"token operator\">:</span> <span class=\"token number\">2</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"sort\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"content\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token property\">\"headers\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n      <span class=\"token punctuation\">{</span>\n        <span class=\"token property\">\"id\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"ID\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Id\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"type\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"integer\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"format\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\",.0f\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"aggregation\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">false</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"filterable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"sortable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span>\n      <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n      <span class=\"token punctuation\">{</span>\n        <span class=\"token property\">\"id\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"EVENTTIME\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Eventtime\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"type\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"date\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"format\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"%Y-%m-%d\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"aggregation\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">false</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"filterable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"sortable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span>\n      <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n      <span class=\"token punctuation\">{</span>\n        <span class=\"token property\">\"id\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"ACTIVITIES\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Activities\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"type\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"string\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"aggregation\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">false</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"filterable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"sortable\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span>\n      <span class=\"token punctuation\">}</span>\n    <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n    <span class=\"token property\">\"data\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n      <span class=\"token punctuation\">{</span>\n        <span class=\"token property\">\"EVENTTIME\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"2015-05-01\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"ACTIVITIES\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Put in the oven\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"ID\"</span><span class=\"token operator\">:</span> <span class=\"token number\">1</span>\n      <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n      <span class=\"token punctuation\">{</span>\n        <span class=\"token property\">\"EVENTTIME\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"2015-05-01\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"ACTIVITIES\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Roll out the dough\"</span><span class=\"token punctuation\">,</span>\n        <span class=\"token property\">\"ID\"</span><span class=\"token operator\">:</span> <span class=\"token number\">0</span>\n      <span class=\"token punctuation\">}</span>\n    <span class=\"token punctuation\">]</span>\n  <span class=\"token punctuation\">}</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>Let's analyze the response: </p>\n<ul>\n<li>\npage: As you have probably noticed for other endpoints, most of the information that the Knowledge Model API returns is\npaginated. You can navigate through the different pages, changing the value of this parameter. \n</li>\n<li>\npageSize: Lets you specify the size of the page with the results. The default value is 50.\n</li>\n<li>\ntotal: Tells you total number of entries that are being returned by your query to the data endpoint. \n</li>\n<li>\nsort: As you will see in following sections, you can sort the returned information. This parameter will show you which\nsort criteria is being used. \n</li>\n<li>\ncontent: Contains the data for the record that is being requested\n<ul>\n<li>\nheader: If you consider the data returned as a table, then the list of fields that you are passing will be the headers.\nThis attribute will also tell you the format that this field has and other information like for example if it's filterable\nor sortable.\n</li>\n<li>\ndata: Contains the actual data that corresponds to each of the header/fields that were specified.\n</li>\n</ul>\n</li>\n</ul>\n<p>So, for the example above, you got two rows of data. The first one corresponds with the activity \"Put in the oven\" that has\nan id equal to 1 and happened on 2015-05-01. According to the headers you should be able to filter and sort by any of\nthe headers (id, activities or eventtime).</p>\n<h2 style=\"position:relative;\"><a href=\"#sorting-the-data\" aria-label=\"sorting the 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=\"sorting-the-data\"></div>Sorting the data</h2>\n<p>For this example, you can see that the activities are not correctly ordered. You would like to have \"Roll out the dough\"\nfirst and then \"Put in the oven\" second. To achieve this, you can sort the data by the ID. </p>\n<p>For the data endpoint, you can specify a <code class=\"language-text\">sort</code> query parameter with the fields that you would like to use for sorting.\nThese fields need to be separated by a comma. You can also specify if you want that field to be sorted ascending or\ndescending. If you want the field to be sorted ascending you need to prepend a <code class=\"language-text\">+</code> character to the name of the field,\nwhereas if you want the field to be sorted descending you will need to prepend a <code class=\"language-text\">-</code> character. For example:\n<code class=\"language-text\">sort: +id, -Activities</code> will sort the data first by id ascending and then it will sort it by the activity names in a\ndescending way. </p>\n<p>In this example you wanted to sort by id, so you can just specify the following query parameter <code class=\"language-text\">sort: id</code>.\nNotice that the <code class=\"language-text\">+</code> character is optional, as it is the default criteria if no criteria is specified. </p>\n<h2 style=\"position:relative;\"><a href=\"#filtering-the-data\" aria-label=\"filtering the 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=\"filtering-the-data\"></div>Filtering the data</h2>\n<p>Now, let's imagine you have hundreds or thousands of rows being returned by your query. How can you filter the entries that\nyou are interested in? </p>\n<p>There are two ways: </p>\n<ul>\n<li>\nUsing one or more Knowledge Model filter/s.\n</li>\n<li>\nSpecifying a filter expression in the request.\n</li>\n</ul>\n<h3 style=\"position:relative;\"><a href=\"#using-one-or-more-knowledge-model-filters\" aria-label=\"using one or more knowledge model filters 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=\"using-one-or-more-knowledge-model-filters\"></div>Using one or more Knowledge Model filter/s</h3>\n<p>Your Knowledge Model may already contain some filters. These filters can be retrieved by the\n<a href=\"https://developer.celonis.com/process-intelligence-apis/knowledge-model-api/api-reference/openapi/reference/operation/getFilters/\">filters schema endpoint</a>. For example, you could\nhave a filter with an id \"roll<em>out</em>the_dough\" that filters all the entries that have an activity with the name\n\"Roll out the dough\".</p>\n<p>If you wanted to use this filter in your query, you can simply pass it in the query parameter <code class=\"language-text\">filters</code>. In your example,\nyou can filter only the \"Roll out the dough\" entries with the query parameter <code class=\"language-text\">filters: roll_out_the_dough</code>. Similar to\nthe <code class=\"language-text\">fields</code> or <code class=\"language-text\">sort</code>, you can specify more than one filter by separating the ids by a comma.</p>\n<h3 style=\"position:relative;\"><a href=\"#specifying-a-filter-expression-in-the-request\" aria-label=\"specifying a filter expression in the request 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=\"specifying-a-filter-expression-in-the-request\"></div>Specifying a filter expression in the request</h3>\n<p>If you wanted to filter the entries that contain an activity called \"Roll out the dough\", you could also specify a filter\nexpression in your request. The filter expressions follow the pattern <code class=\"language-text\">field operator value</code>, where:</p>\n<ul>\n<li>\nfield: is the id of the field that you want to filter.\n</li>\n<li>\noperator: is one of the following operators \n<code class=\"language-text\">eq(=), gt(>), lt(&lt;), ne(!=), ge(>=), le(&lt;=), is(IS) and in(IN)</code>\n.\n</li>\n<li>\nvalue: is a constant like 'Roll out the dough'.\n</li>\n</ul>\n<p>So, in your example, you could achieve the same result as using a Knowledge Model filter by specifying the following query parameter:\n<code class=\"language-text\">filterExpr: ACTIVITIES eq 'Roll out the dough'</code>.</p>\n<p>It is also possible to combine filters with logical operators, parenthesis and some OData predictors:</p>\n<ul>\n<li>\n<code class=\"language-text\">and, or, not</code>\n</li>\n<li>\n<code class=\"language-text\">startswith, endswith, contains</code>\n</li>\n</ul>\n<p>These predictors have the following structure:</p>\n<ul>\n<li>\n<code class=\"language-text\">predictor</code>\n is an OData predicator's name\n</li>\n<li>\n<code class=\"language-text\">field</code>\n is a filterable attribute, augmented attribute or flag of a record. \n<strong>This value is case-sensitive and should be equal to the attribute id.</strong>\n</li>\n<li>\n<code class=\"language-text\">value</code>\n is a constant, such as a Salesforce Opportunity ID or a text.\n</li>\n</ul>\n<p>In this example, another way to achieve the same result is by using a predictor specifying the following query parameter:\n<code class=\"language-text\">filterExpr: startswith(ACTIVITIES,'Roll out the dough')</code>. You can specify multiple filter expressions, simply separating them by a comma or combining them with logical operators.</p>\n<p>Hopefully, with this information, you should now be able to get, sort and filter all the record data that you need. If\nyou got this far, we would like to hear from you. Have you found any limitation or something tha you would like us to\nimprove? If so, please fill our <a href=\"https://docs.google.com/forms/d/e/1FAIpQLSeHANiDNRaHNCbdgH0hc1kQv35V2yHb5gkDpZTYjoT-6Gd-rQ/viewform?usp=sf_link\">feedback form</a>\nthat will help us to improve our API.</p>","headings":[{"value":"Retrieving record data","depth":1},{"value":"Data endpoint","depth":2},{"value":"Specifying the fields that you want to consume","depth":2},{"value":"Sorting the data","depth":2},{"value":"Filtering the data","depth":2},{"value":"Using one or more Knowledge Model filter/s","depth":3},{"value":"Specifying a filter expression in the request","depth":3}]},"contentItem":{"data":{"lastModified":"2025-10-07T17:03:39.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":false,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"525399ef-e2c3-5fd6-b187-9221b07af99a__redocly content/process-intelligence-apis/knowledge-model-api/tutorials/learning/retrieve-record-data/","seo":{"title":"Retrieving record data","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"process-intelligence-apis/knowledge-model-api/tutorials/learning/retrieve-record-data.md","pageBaseUrl":"/process-intelligence-apis/knowledge-model-api/tutorials/learning/retrieve-record-data","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Retrieving record data","id":"retrieving-record-data"},{"depth":2,"value":"Data endpoint","id":"data-endpoint"},{"depth":2,"value":"Specifying the fields that you want to consume","id":"specifying-the-fields-that-you-want-to-consume"},{"depth":2,"value":"Sorting the data","id":"sorting-the-data"},{"depth":2,"value":"Filtering the data","id":"filtering-the-data"},{"depth":3,"value":"Using one or more Knowledge Model filter/s","id":"using-one-or-more-knowledge-model-filters"},{"depth":3,"value":"Specifying a filter expression in the request","id":"specifying-a-filter-expression-in-the-request"}]},"data":{"title":""},"catalogInfo":null,"link":"/process-intelligence-apis/knowledge-model-api/tutorials/learning/retrieve-record-data/","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"]}