mirror of
				https://github.com/datahub-project/datahub.git
				synced 2025-10-30 18:26:58 +00:00 
			
		
		
		
	 6b8c4c83bc
			
		
	
	
		6b8c4c83bc
		
			
		
	
	
	
	
		
			
			Co-authored-by: Indy Prentice <indy@Indys-MacBook-Pro.local> Co-authored-by: Indy Prentice <indy@ip-172-16-225-44.us-west-2.compute.internal>
		
			
				
	
	
		
			19 lines
		
	
	
		
			953 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			953 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
| # Get Index Sizes Endpoint
 | |
| 
 | |
| 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.
 | |
| 
 | |
| ```
 | |
| curl --location --request POST 'https://demo.datahubproject.io/api/gms/operations?action=getIndexSizes' \
 | |
| --header 'Authorization: Bearer TOKEN'
 | |
| ```
 | |
| 
 | |
| The endpoint takes no parameters, and the output will be a string representing a JSON object containing the following information about each index:
 | |
| ```
 | |
|       {
 | |
|         "aspectName": "datasetusagestatistics",
 | |
|         "sizeMb": 0.208,
 | |
|         "indexName": "dataset_datasetusagestatisticsaspect_v1",
 | |
|         "entityName": "dataset"
 | |
|       }
 | |
| ```
 |