datahub/assets/js/1645b7aa.6c08086a.js
2025-08-01 23:38:28 +00:00

1 line
6.4 KiB
JavaScript

"use strict";(self.webpackChunkdocs_website=self.webpackChunkdocs_website||[]).push([[61904],{15680:(e,t,n)=>{n.d(t,{xA:()=>l,yg:()=>f});var r=n(96540);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var c=r.createContext({}),p=function(e){var t=r.useContext(c),n=t;return e&&(n="function"==typeof e?e(t):s(s({},t),e)),n},l=function(e){var t=p(e.components);return r.createElement(c.Provider,{value:t},e.children)},u="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},b=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,c=e.parentName,l=a(e,["components","mdxType","originalType","parentName"]),u=p(n),b=i,f=u["".concat(c,".").concat(b)]||u[b]||d[b]||o;return n?r.createElement(f,s(s({ref:t},l),{},{components:n})):r.createElement(f,s({ref:t},l))}));function f(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,s=new Array(o);s[0]=b;var a={};for(var c in t)hasOwnProperty.call(t,c)&&(a[c]=t[c]);a.originalType=e,a[u]="string"==typeof e?e:i,s[1]=a;for(var p=2;p<o;p++)s[p]=n[p];return r.createElement.apply(null,s)}return r.createElement.apply(null,n)}b.displayName="MDXCreateElement"},14073:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>l,contentTitle:()=>c,default:()=>f,frontMatter:()=>a,metadata:()=>p,toc:()=>u});n(96540);var r=n(15680);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})),e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}const a={title:"Get Index Sizes Endpoint",slug:"/api/restli/get-index-sizes",custom_edit_url:"https://github.com/datahub-project/datahub/blob/master/docs/api/restli/get-index-sizes.md"},c="Get Index Sizes Endpoint",p={unversionedId:"docs/api/restli/get-index-sizes",id:"docs/api/restli/get-index-sizes",title:"Get Index Sizes Endpoint",description:"You can do a HTTP POST request to /gms/operations?action=getIndexSizes endpoint with no parameters to see the size of indices in ElasticSearch. For now, only timeseries indices are supported, as they can grow indefinitely, and the truncateTimeseriesAspect endpoint is provided to clean up old entries. This endpoint can be used in conjunction with the cleanup endpoint to see which indices are the largest before truncation.",source:"@site/genDocs/docs/api/restli/get-index-sizes.md",sourceDirName:"docs/api/restli",slug:"/api/restli/get-index-sizes",permalink:"/docs/api/restli/get-index-sizes",draft:!1,editUrl:"https://github.com/datahub-project/datahub/blob/master/docs/api/restli/get-index-sizes.md",tags:[],version:"current",frontMatter:{title:"Get Index Sizes Endpoint",slug:"/api/restli/get-index-sizes",custom_edit_url:"https://github.com/datahub-project/datahub/blob/master/docs/api/restli/get-index-sizes.md"},sidebar:"overviewSidebar",previous:{title:"Restore Indices Endpoint",permalink:"/docs/api/restli/restore-indices"},next:{title:"Truncate Timeseries Index Endpoint",permalink:"/docs/api/restli/truncate-time-series-aspect"}},l={},u=[],d={toc:u},b="wrapper";function f(e){var{components:t}=e,n=s(e,["components"]);return(0,r.yg)(b,o(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter((function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable})))),r.forEach((function(t){i(e,t,n[t])}))}return e}({},d,n),{components:t,mdxType:"MDXLayout"}),(0,r.yg)("h1",{id:"get-index-sizes-endpoint"},"Get Index Sizes Endpoint"),(0,r.yg)("p",null,"You can do a HTTP POST request to ",(0,r.yg)("inlineCode",{parentName:"p"},"/gms/operations?action=getIndexSizes")," endpoint with no parameters to see the size of indices in ElasticSearch. For now, only timeseries indices are supported, as they can grow indefinitely, and the ",(0,r.yg)("inlineCode",{parentName:"p"},"truncateTimeseriesAspect")," endpoint is provided to clean up old entries. This endpoint can be used in conjunction with the cleanup endpoint to see which indices are the largest before truncation."),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},"curl --location --request POST 'https://demo.datahub.com/api/gms/operations?action=getIndexSizes' \\\n--header 'Authorization: Bearer TOKEN'\n")),(0,r.yg)("p",null,"The endpoint takes no parameters, and the output will be a string representing a JSON object containing the following information about each index:"),(0,r.yg)("pre",null,(0,r.yg)("code",{parentName:"pre"},' {\n "aspectName": "datasetusagestatistics",\n "sizeMb": 0.208,\n "indexName": "dataset_datasetusagestatisticsaspect_v1",\n "entityName": "dataset"\n }\n')))}f.isMDXComponent=!0}}]);