---
schema_version: "1"
id: 896d3664fb2e5b735084395ac5977f9e7ae18c2cd2292dc501691ce8e25b0e9c
title: HistoryRetentionJob
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_historyretentionjob.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_historyretentionjob.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 2641f5a333ad5ac0ffd6e4d452a6a2dccaabe261bfd531d2967c41ef34c3705c
description: Represents the body of retained data from the archive, and the status of the archived data. Available in API version 29.0 or later.
---
# HistoryRetentionJob

Represents the body of retained data from the archive, and the status of the archived data. Available in API version 29.0 or later.

## Supported SOAP API Calls

describeSObjects(), query()

## Supported REST API HTTP Methods

GET

## Fields

| Field Name | Details |
| --- | --- |
| DurationSeconds | 
Type

int

Properties

Filter, Group, Nillable, Sort

Description

How many seconds the field history retention job took to complete (whether successful or not).



 |
| HistoryType | 

Type

picklist

Properties

Create, Filter, Group, Nillable, Restricted picklist, Sort

Description

The object type that contains the field history that you retained. Valid values for standard objects are:

- Account
- Case
- Contact
- Leads
- Opportunity

For custom objects, use the object name.





 |
| NumberOfRowsRetained | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

The number of field history rows that a field history retention job has retained.



 |
| RetainOlderThanDate | 

Type

dateTime

Properties

Filter, Sort

Description

The date and time before which all field history data was retained.



 |
| StartDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The start date of the field history retention job.



 |
| Status | 

Type

picklist

Properties

Filter, Group, Nillable, Restricted picklist, Sort

Description

Provides the status of the field history retention job. By default, field history tracking copies data to the archive, leaving a duplicate of the archived data in Salesforce. You can delete data from Salesforce manually after it's archived.

Status can include:

- CopyScheduled
- CopyRunning
- CopySucceeded
- CopyFailed
- CopyKilled
- NothingToArchive
- DeleteScheduled
- DeleteRunning
- DeleteSucceeded
- DeleteFailed
- DeleteKilled





 |