# \AnalyticsApi

All URIs are relative to *https://registry.example.com*

Method | HTTP request | Description
------------- | ------------- | -------------
[**capture_analytics_snapshot**](AnalyticsApi.md#capture_analytics_snapshot) | **POST** /api/v1/admin/analytics/snapshot | Capture analytics snapshot
[**get_downloads_trend**](AnalyticsApi.md#get_downloads_trend) | **GET** /api/v1/admin/analytics/downloads/trend | Get downloads trend
[**get_repository_trend**](AnalyticsApi.md#get_repository_trend) | **GET** /api/v1/admin/analytics/repositories/{id}/trend | Get repository trend
[**get_stale_artifacts**](AnalyticsApi.md#get_stale_artifacts) | **GET** /api/v1/admin/analytics/artifacts/stale | List stale artifacts
[**get_storage_breakdown**](AnalyticsApi.md#get_storage_breakdown) | **GET** /api/v1/admin/analytics/storage/breakdown | Get storage breakdown by repository
[**get_storage_growth**](AnalyticsApi.md#get_storage_growth) | **GET** /api/v1/admin/analytics/storage/growth | Get storage growth summary
[**get_storage_trend**](AnalyticsApi.md#get_storage_trend) | **GET** /api/v1/admin/analytics/storage/trend | Get storage trend



## capture_analytics_snapshot

> models::StorageSnapshot capture_analytics_snapshot()
Capture analytics snapshot

Captures a point-in-time snapshot of the current system state including repository, artifact, storage, download, and user totals. The snapshot is persisted and returned.

### Parameters

This endpoint does not need any parameter.

### Return type

[**models::StorageSnapshot**](StorageSnapshot.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_downloads_trend

> Vec<models::DownloadTrend> get_downloads_trend(from, to)
Get downloads trend

Returns a daily time-series of download counts within the requested date range, suitable for charting download activity over time.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**from** | Option<**String**> | Start date (inclusive) in YYYY-MM-DD format. Defaults to 30 days ago when omitted. |  |
**to** | Option<**String**> | End date (inclusive) in YYYY-MM-DD format. Defaults to today when omitted. |  |

### Return type

[**Vec<models::DownloadTrend>**](DownloadTrend.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_repository_trend

> Vec<models::RepositorySnapshot> get_repository_trend(id, from, to)
Get repository trend

Returns a daily time-series of snapshots for a single repository within the requested date range, including artifact counts, storage bytes, and download counts.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**id** | **uuid::Uuid** | Repository UUID. | [required] |
**from** | Option<**String**> | Start date (inclusive) in YYYY-MM-DD format. Defaults to 30 days ago when omitted. |  |
**to** | Option<**String**> | End date (inclusive) in YYYY-MM-DD format. Defaults to today when omitted. |  |

### Return type

[**Vec<models::RepositorySnapshot>**](RepositorySnapshot.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_stale_artifacts

> Vec<models::StaleArtifact> get_stale_artifacts(days, limit)
List stale artifacts

Returns artifacts that have not been downloaded within the specified number of days, ordered by staleness descending. Useful for identifying cleanup candidates.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**days** | Option<**i32**> | Minimum number of days since the last download to consider an artifact stale. Defaults to 90. |  |
**limit** | Option<**i32**> | Maximum number of stale artifacts to return. Defaults to 50. |  |

### Return type

[**Vec<models::StaleArtifact>**](StaleArtifact.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_storage_breakdown

> Vec<models::RepositoryStorageBreakdown> get_storage_breakdown()
Get storage breakdown by repository

Returns per-repository storage usage including artifact counts, byte totals, download counts, and the timestamp of the most recent upload.

### Parameters

This endpoint does not need any parameter.

### Return type

[**Vec<models::RepositoryStorageBreakdown>**](RepositoryStorageBreakdown.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_storage_growth

> models::GrowthSummary get_storage_growth(from, to)
Get storage growth summary

Returns an aggregate growth summary comparing the start and end of the requested period, including absolute and percentage changes in storage and artifact counts.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**from** | Option<**String**> | Start date (inclusive) in YYYY-MM-DD format. Defaults to 30 days ago when omitted. |  |
**to** | Option<**String**> | End date (inclusive) in YYYY-MM-DD format. Defaults to today when omitted. |  |

### Return type

[**models::GrowthSummary**](GrowthSummary.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_storage_trend

> Vec<models::StorageSnapshot> get_storage_trend(from, to)
Get storage trend

Returns a time-series of daily storage snapshots within the requested date range. Useful for charting total storage, artifact counts, and user growth over time.

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**from** | Option<**String**> | Start date (inclusive) in YYYY-MM-DD format. Defaults to 30 days ago when omitted. |  |
**to** | Option<**String**> | End date (inclusive) in YYYY-MM-DD format. Defaults to today when omitted. |  |

### Return type

[**Vec<models::StorageSnapshot>**](StorageSnapshot.md)

### Authorization

[apiKeyAuth](../README.md#apiKeyAuth), [bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

