API Explorer
API Explorer
Introduction
What's New
Appliance Management
Application Data Management
Asset Management
Asset Metadata
Authentication and Authorization
Cloud Disaster Recovery
Compliance
Copy Management
Credentials Management
Discovery
File Level Restore
Installation
Inventory Source Management
Kubernetes Data Management
Licenses Management
Location Management
Log Management
Monitoring
Protection Policies
Recovery and Reuse Management
Remote Service
Search Clusters
Secrets Manager
Server Disaster Recovery
Storage Management
Telemetry Setting
Upgrade
User Security Management
Virtual Machine Data Management
Whitelist Management

Assets garbage collection setting

This example describes how to use the time-to-live (TTL) setting to control the assets garbage collection function. Garbage collection for the assets occurs when three conditions are met:

  • The asset is marked as deleted
  • The asset has no copy left
  • The last updated time for the asset exceeded TTL setting

The TTL setting for assets garbage collection is configurable through REST API.

Use the following API:

PUT /api/v2/common-settings/DELETION_TTL_SETTING

Login

Use the login API to retrieve the access token. For details, see the tutorial for authentication and authorization.

Get TTL settings

Retrieve all TTL settings in PowerProtect Data Manager.

URI Operation Description Return Codes
/api/v2/common-settings/DELETION_TTL_SETTING GET Returns a list of all TTL settings in PowerProtect Data Manager 200 OK
404 Not Found
401 Not Authorized
curl --request GET \
  --url https://<your-ppdm-server>:8443/api/v2/common-settings/DELETION_TTL_SETTING \
  --header 'content-type: application/json' \
  --header 'Authorization:  {{access_token}}'
  • access_token from the Login API call

Sample response:

OK (200)
{
    "id": "DELETION_TTL_SETTING",
    "properties": [
        {
            "name": "index_activity",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_resource_deletion_detail",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_asset_protection_detail",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_audit_log",
            "value": "43200",
            "type": "LONG"
        },
        {
            "name": "index_compliance_result",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_historical_frontend_capacity",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_job",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_message",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_task_v2",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_protection_copy_set",
            "value": "10080",
            "type": "LONG"
        },
        {
            "name": "index_data_source",
            "value": "10080",
            "type": "LONG"
        }
    ]
}

NOTE: The time unit for TTL setting is minutes. The default value is 10080 minutes, which equals seven days.

Update TTL settings

URI Operation Description Return Codes
/api/v2/common-settings/DELETION_TTL_SETTING PUT Change TTL setting for assets garbage collection. 200 OK
404 Not Found
401 Not Authorized
curl --request PUT \
  --url https://<your-ppdm-server>:8443/api/v2/common-settings/DELETION_TTL_SETTING \
  --header 'content-type: application/json' \
  --header 'Authorization:  {{access_token}}'

Sample request body to change TTL=14400 (10 days) for assets garbage collection:

{
    "id": "DELETION_TTL_SETTING",
    "properties": [
        {
            "name": "index_activity",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_resource_deletion_detail",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_asset_protection_detail",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_audit_log",
            "value": "43200",
            "type": "LONG"
        },
        {
            "name": "index_compliance_result",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_historical_frontend_capacity",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_job",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_message",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_task_v2",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_protection_copy_set",
            "value": "10080",
            "type": "LONG"
        },
        {
            "name": "index_data_source",
            "value": "14400",
            "type": "LONG"
        }
    ]
}

NOTE: You cannot only supply the TTL setting for assets. You must supply all TTL settings.

Sample response:

{
    "id": "DELETION_TTL_SETTING",
    "properties": [
        {
            "name": "index_activity",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_resource_deletion_detail",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_asset_protection_detail",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_audit_log",
            "value": "43200",
            "type": "LONG"
        },
        {
            "name": "index_compliance_result",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_historical_frontend_capacity",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_job",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_message",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_task_v2",
            "value": "64800",
            "type": "LONG"
        },
        {
            "name": "index_protection_copy_set",
            "value": "10080",
            "type": "LONG"
        },
        {
            "name": "index_data_source",
            "value": "14400",
            "type": "LONG"
        }
    ]
}