{"id":23133,"date":"2020-02-07T11:38:51","date_gmt":"2020-02-07T11:38:51","guid":{"rendered":"https:\/\/developer.kore.ai\/v10-1\/?p=23133"},"modified":"2023-07-28T09:25:53","modified_gmt":"2023-07-28T08:25:53","slug":"get-audit-logs-api","status":"publish","type":"post","link":"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/get-audit-logs-api\/","title":{"rendered":"Get Admin Console Audit Logs API"},"content":{"rendered":"<section class=\"l-section wpb_row height_auto\"><div class=\"l-section-h i-cf\"><div class=\"g-cols vc_row type_default valign_top\"><div class=\"vc_col-sm-12 wpb_column vc_column_container\"><div class=\"vc_column-inner\"><div class=\"wpb_wrapper\">\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<p>To retrieve the audit logs from Bot Admin Console<\/p>\n<p class=\"note\"><strong>Note:<\/strong> This feature was introduced in ver7.2 of the platform.<\/p>\n<table>\n<tbody>\n<tr>\n<td><strong>Method<\/strong><\/td>\n<td>GET<\/td>\n<\/tr>\n<tr>\n<td><strong>Endpoint<\/strong><\/td>\n<td><code>https:\/\/{{host}}\/<span style=\"font-weight: 400;\">api\/public\/auditlogs?<br \/>\nsize=50&amp;offset=0&amp;fromDate={{timestamp}}&amp;toDate={{timestamp}}&amp;fetchAfter={{AuditLogId}}<\/span><\/code><\/td>\n<\/tr>\n<tr>\n<td><strong>Content Type<\/strong><\/td>\n<td><code>application\/json<\/code><\/td>\n<\/tr>\n<tr>\n<td><strong>Authorization<\/strong><\/td>\n<td><code>auth: {{JWT}}<\/code><\/p>\n<p>See <a href=\"https:\/\/developer.kore.ai\/v10-1\/docs\/bots\/api-guide\/apis\/#Generating_the_JWT_Token\" target=\"_blank\" rel=\"noopener noreferrer\">How to generate the JWT Token.<\/a><\/td>\n<\/tr>\n<tr>\n<td><strong>API Scope<\/strong><\/td>\n<td>\n<ul>\n<li>Bot Builder: Not Applicable<\/li>\n<li>Admin Console: Logs &gt; Admin Console Audit Logs<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Path_Parameters\">Path Parameters<\/span><\/h2>\n<table>\n<tbody>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<tr>\n<td>host<\/td>\n<td>Environment URL, for example, https:\/\/bots.kore.ai<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">size<\/span><\/td>\n<td>Number of records to be fetched upto a maximum of 100<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">offset<\/span><\/td>\n<td>Specify the page number from which to start fetching the logs. If unspecified, it starts from 0, which is the first page of the list of logs<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">fromDate<\/span><\/td>\n<td>Takes the date format yyyy-mm-dd<br \/>\n(or) yyyy-mm-ddThh:mm:ss.msZ<br \/>\neg:2019-04-01 (or) 2019-04-01T13:25:58.515Z<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">toDate<\/span><\/td>\n<td>Takes the date format yyyy-mm-dd<br \/>\n(or) yyyy-mm-ddThh:mm:ss.msZ<br \/>\neg:2019-04-01 (or) 2019-04-01 T13:26:05.598Z<\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400;\">fetchAfter<br \/>\n(optional)<\/span><\/td>\n<td>Audit Log Id from where you want to fetch the logs.<br \/>\nThis is an unique incremental ID for each record created under audit logs and you can obtain it from looking at the previous audit log file.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Request\">Sample Request<\/span><\/h2>\n<pre>curl --location --request GET \\\r\n'https:\/\/{{host}}\/api\/public\/auditlogs?size=50&amp;offset=0&amp;fromDate=2021-07-07T11:11:18.464Z&amp;toDate=2021-06-30T11:11:18.469Z' \\\r\n--header 'auth: YOUR_JWT_ACCESS_TOKEN' \\\r\n--header 'Content-Type: application\/json' \\<\/pre>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n\r\n\t<div class=\"wpb_text_column \">\r\n\t\t<div class=\"wpb_wrapper\">\r\n\t\t\t<h2><span class=\"ez-toc-section\" id=\"Sample_Response\">Sample Response<\/span><\/h2>\n<p><a ref=\"magnificPopup\" href=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210713131454\/img.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-28587\" src=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210713131454\/img.png\" alt=\"\" width=\"812\" height=\"784\" srcset=\"https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210713131454\/img.png 812w, https:\/\/kore-wordpress.s3.us-east-2.amazonaws.com\/developer.kore.ai\/v10-1\/wp-content\/uploads\/sites\/35\/20210713131454\/img-300x290.png 300w\" sizes=\"auto, (max-width: 812px) 100vw, 812px\" \/><\/a><\/p>\n\r\n\t\t<\/div>\r\n\t<\/div>\r\n<div class=\"w-separator size_small with_line width_default thick_1 style_solid color_border align_center\"><div class=\"w-separator-h\"><\/div><\/div><\/div><\/div><\/div><\/div><\/div><\/section>\n","protected":false},"excerpt":{"rendered":"To retrieve the audit logs from Bot Admin Console Note: This feature was introduced in ver7.2 of the platform. Method GET Endpoint https:\/\/{{host}}\/api\/public\/auditlogs? size=50&amp;offset=0&amp;fromDate={{timestamp}}&amp;toDate={{timestamp}}&amp;fetchAfter={{AuditLogId}} Content Type application\/json Authorization auth: {{JWT}} See How to generate the JWT Token. API Scope Bot Builder: Not Applicable Admin Console: Logs &gt; Admin Console Audit Logs &nbsp; Path Parameters Parameter...","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-23133","post","type-post","status-publish","format-standard","hentry","category-api-guide"],"_links":{"self":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/23133","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/comments?post=23133"}],"version-history":[{"count":10,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/23133\/revisions"}],"predecessor-version":[{"id":58443,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/posts\/23133\/revisions\/58443"}],"wp:attachment":[{"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/media?parent=23133"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/categories?post=23133"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/developer.kore.ai\/v10-1\/wp-json\/wp\/v2\/tags?post=23133"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}