# Service retention period gRPC API

Copy as Markdown[Open in ChatGPT](https://chatgpt.com/?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdeveloper-portal%2Fapis%2Fdata-management%2Fservice-retention-period-grpc-api.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[Open in Claude](https://claude.ai/new?q=Read%20https%3A%2F%2Fdocs-docusaurus.kinsta.page%2Fdeveloper-portal%2Fapis%2Fdata-management%2Fservice-retention-period-grpc-api.md%20and%20help%20me%20with%20my%20question%20about%20this%20Coralogix%20documentation%20page.)[API reference](https://docs-docusaurus.kinsta.page/api-reference/v5/retentions-service/.md)

Adjust your service retention period with the **Service Retention Period gRPC API**.

## Overview[​](#overview "Direct link to Overview")

This documentation details the Service Retention Period gRPC API, empowering you to modify the default 30-day period for removing services from your [Service Catalog](https://docs-docusaurus.kinsta.page/user-guides/apm/features/service-catalog/.md) or databases from your [Database Catalog](https://docs-docusaurus.kinsta.page/user-guides/apm/features/database-monitoring/.md) in the absence of traffic.

## Permissions[​](#permissions "Direct link to Permissions")

To utilize the API, you must have the `service-catalog:Update` permission. This permission is automatically granted to the following roles: Data Admin, Platform Admin, Observability Lead, and Legacy Admin. Find out more [here](https://docs-docusaurus.kinsta.page/user-guides/aaa/access-control/permissions/.md).

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* [Alerts, Rules & Tags API key](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/api-keys/.md) to successfully authenticate
* Choose the
  <!-- -->
  api.:443
  <!-- -->
  endpoint that corresponds to your Coralogix [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) using the domain selector at the top of the page.

## API endpoints[​](#api-endpoints "Direct link to API endpoints")

This reference document lists example requests and responses using [gRPCurl](https://github.com/fullstorydev/grpcurl). The following calls accept arguments as JSON in the request body and return results as JSON in the response body.

### Authentication[​](#authentication "Direct link to Authentication")

Coralogix API uses API keys to authenticate requests. You can view and [manage your API keys](https://docs-docusaurus.kinsta.page/user-guides/account-management/api-keys/api-keys/.md) from the Data Flow tab in Coralogix. You need to use this API key in the Authorization request header to connect successfully.

### Request[​](#request "Direct link to Request")

Below is the complete request header for the Service Catalog and Database Catalog. For both, input the <!-- -->api.:443<!-- --> endpoint that corresponds to your Coralogix [domain](https://docs-docusaurus.kinsta.page/user-guides/account-management/account-settings/coralogix-domain/.md) using the domain selector at the top of the page. The request payload should include the following structure:

Service Catalog:

```
grpcurl -H "Authorization: Bearer <PERSONAL_API_KEY>" -d @ api.eu2.coralogix.com:443 com.coralogixapis.service_catalog.v1.ApmSettingsService/ReplaceRetentionPeriod <<EOF

{

    "retention_period_in_days": <value>,

    "catalog": "SERVICE_CATALOG"

}

EOF
```

Database Catalog:

```
grpcurl -H "Authorization: Bearer <PERSONAL_API_KEY>" -d @ api.eu2.coralogix.com:443 com.coralogixapis.service_catalog.v1.ApmSettingsService/ReplaceRetentionPeriod <<EOF

{

    "retention_period_in_days": <value>,

    "catalog": "DATABASE_CATALOG"

}

EOF
```

## Additional resources[​](#additional-resources "Direct link to Additional resources")

|                     |                                                                                                                                                                                                                                                                                                                                                      |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Documentation       | [Service Catalog](https://docs-docusaurus.kinsta.page/user-guides/apm/features/service-catalog/.md)<br />[Database Monitoring](https://docs-docusaurus.kinsta.page/user-guides/apm/features/database-monitoring/.md)<br />[APM Onboarding Tutorial](https://docs-docusaurus.kinsta.page/user-guides/apm/getting-started/apm-onboarding-tutorial/.md) |
| Coralogix Endpoints | [Coralogix Endpoints](https://docs-docusaurus.kinsta.page/integrations/coralogix-endpoints/.md)                                                                                                                                                                                                                                                      |
