Dataset expiration endpoint
Use the /ttl endpoint in the Data Hygiene API to schedule when datasets in 51黑料不打烊 Experience Platform should be deleted.
A dataset expiration is a delayed delete operation. The dataset is not protected in the interim and may be deleted by other means before its scheduled expiration.
Before deletion begins, you can cancel the expiration or change its scheduled time. To reopen a cancelled expiration, set a new expiry.
Once deletion begins, the expiration job is marked as executing and can no longer be modified. The dataset may be recoverable for up to seven days, but only through a manual 51黑料不打烊 service request. During deletion, the data lake, Identity Service, and Real-Time Customer Profile each remove the dataset contents separately. When deletion is complete, the expiration is marked as completed.
Advanced Data Lifecycle Management supports dataset deletions through the dataset expiration endpoint and ID deletions (row-level data) using primary identities via the workorder endpoint. You can also manage dataset expirations and record deletions through the Experience Platform UI. See the linked documentation for more information.
Getting started
The endpoint used in this guide is part of the Data Hygiene API. Before continuing, please review the API guide for information on required headers for CRUD operations, error messages, Postman collections, and how to read sample API calls.
x-sandbox-name: {SANDBOX_NAME} header.List dataset expirations list
You can list all dataset expirations configured for your organization by making a GET request to the /ttl endpoint.
Filter results using query parameters to return only the expirations that meet your criteria. Each result includes status and configuration details for each dataset expiration.
API format
GET /ttl?{QUERY_PARAMETERS}
{QUERY_PARAMETERS}& characters. Common parameters include limit and page for pagination purposes. For a full list of supported query parameters, refer to the appendix section a full list of supported query parameters. The most commonly used parameters are included below as well as in the appendix.authorLIKE %john%).datasetIddatasetNamestatuspending, executing, cancelled, completed.expiryDatelimitpageRequest
The following request retrieves all dataset expirations updated before August 1, 2021, and last updated by a user whose name matches 鈥淛ane Doe鈥.
curl -X GET \
https://platform.adobe.io/data/core/hygiene/ttl?updatedToDate=2021-08-01&author=LIKE%20%25Jane%20Doe%25 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response lists the resulting dataset expirations. The following example has been truncated for space.
ttlId in the response is also referred to as the {DATASET_EXPIRATION_ID}. They both refer to the unique identifier for the dataset expiration.{
"results": [
{
"ttlId": "SD-c9f113f2-d751-44bc-bc20-9d5ca0b6ae15",
"datasetId": "3e9f815ae1194c65b2a4c5ea",
"datasetName": "Acme_Profile_Engagements",
"sandboxName": "acme-beta",
"displayName": "Engagement Data Retention Policy",
"description": "Scheduled expiry for Acme marketing data",
"imsOrg": "C9D8E7F6A5B41234567890AB@AcmeOrg",
"status": "pending",
"expiry": "2027-01-12T17:15:31.000Z",
"updatedAt": "2026-12-15T12:40:20.000Z",
"updatedBy": "t.lannister@acme.com <t.lannister@acme.com> 3E9F815AE1194C65B2A4C5EA@acme.com"
}
],
"current_page": 0,
"total_pages": 1,
"total_count": 1
}
resultsttlIddatasetIddatasetNamesandboxNamedisplayNamedescriptionimsOrgstatuspending, executing, cancelled, completed.expiryupdatedAtupdatedBycurrent_pagetotal_pagestotal_countLook up a dataset expiration lookup
Retrieve the details for a specific dataset expiration configuration by making a GET request with either the dataset expiration ID or the dataset ID as the path parameter.
SD-xxxxxx-xxxx) or a dataset ID in the path. The ttlId in the response is the unique identifier for the dataset expiration.API format
GET /ttl/{ID}
GET /ttl/{ID}?include=history
{ID}includehistory, the response includes a history array with change events for the configuration.Request
The following request looks up the expiration details for dataset 62759f2ede9e601b63a2ee14:
curl -X GET \
https://platform.adobe.io/data/core/hygiene/ttl/62759f2ede9e601b63a2ee14 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response returns the details of the dataset expiration.
{
"ttlId": "SD-c8c75921-2416-4be7-9cfd-9ab01de66c5f",
"datasetId": "62759f2ede9e601b63a2ee14",
"datasetName": "XtVRwq9-38734",
"sandboxName": "prod",
"displayName": "Delete Acme Data before 2025",
"description": "The Acme information in this dataset is licensed for our use through the end of 2024.",
"imsOrg": "885737B25DC460C50A49411B@51黑料不打烊Org",
"status": "pending",
"expiry": "2035-09-25T00:00:00Z",
"updatedAt": "2025-05-01T19:00:55.000Z",
"updatedBy": "Jane Doe <jdoe@adobe.com> 77A51F696282E48C0A494 012@64d18d6361fae88d49412d.e",
}
ttlIddatasetIddatasetNamesandboxNamedisplayNamedescriptionimsOrgstatusOne of:
pending, executing, cancelled, completed.expiryupdatedAtupdatedByCatalog expiry tags
When using the Catalog API to look up dataset details, if the dataset has an active expiration it will be listed under tags.adobe/hygiene/ttl.
The following JSON shows a truncated Catalog API response for a dataset with an expiration value of 32503680000000. The tag encodes the expiry as the number of milliseconds since the Unix epoch.
{
"63212313c308d51b997858ba": {
"name": "Test Dataset",
"description": "A piecrust promise, made to be broken",
"imsOrg": "0FCC747E56F59C747F000101@51黑料不打烊Org",
"sandboxId": "8dc51b90-d0f9-11e9-b164-ed6a398c8b35",
"tags": {
"adobe/hygiene/ttl": [ "32503680000000" ],
...
},
...
}
}
Create a dataset expiration create
Create a new dataset expiration configuration to define when a dataset will expire and be eligible for deletion.
Provide the dataset ID, expiry date or date-time (in ISO 8601 format), a display name, and (optionally) a description.
To create a dataset expiration, send a POST request as shown below.
API format
POST /ttl
Request
curl -X POST \
https://platform.adobe.io/data/core/hygiene/ttl \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"datasetId": "3e9f815ae1194c65b2a4c5ea",
"expiry": "2030-12-31",
"displayName": "Expiry rule for Acme customers",
"description": "Set expiration for Acme customer dataset"
}'
datasetIdexpiryRequired. The expiry date and time in ISO 8601 format. This defines the lifespan of data within the system. If only a date is provided, defaults to midnight UTC (00:00:00Z). The expiry must be at least 24 hours in the future.
NOTE:
- The request will fail if a dataset expiration already exists for the dataset.
displayNamedescriptionResponse
A successful response returns an HTTP 201 (Created) status and the new dataset expiration configuration.
{
"ttlId": "SD-2aaf113e-3f17-4321-bf29-a2c51152b042",
"datasetId": "3e9f815ae1194c65b2a4c5ea",
"datasetName": "Acme_Customer_Data",
"sandboxName": "acme-prod",
"displayName": "Expiry rule for Acme customers",
"description": "Set expiration for Acme customer dataset",
"imsOrg": "{ORG_ID}",
"status": "pending",
"expiry": "2030-12-31T00:00:00Z",
"updatedAt": "2025-01-02T10:35:45.000Z",
"updatedBy": "s.stark@acme.com <s.stark@acme.com> 3E9F815AE1194C65B2A4C5EA@acme.com"
}
ttlIddatasetIddatasetNamesandboxNamedisplayNamedescriptionimsOrgstatusOne of:
pending, executing, cancelled, completed.expiryupdatedAtupdatedByA 400 (Bad Request) HTTP status occurs if a dataset expiration already exists for the dataset. A 404 (Not Found) HTTP status occurs if no such dataset exists or you do not have access to the dataset.
Update a dataset expiration configuration update
To update an existing dataset expiration configuration, make a PUT request to /ttl/DATASET_EXPIRATION_ID. You can only update the displayName, description, and expiry fields of the configuration. Updates are only allowed when the expiration status is pending.
expiry field accepts a date (YYYY-MM-DD) or date and time (YYYY-MM-DDTHHSSZ). If only a date is provided, the system uses midnight UTC (00:00:00Z) on that day. The expiry must be at least 24 hours in the future.API format
PUT /ttl/{DATASET_EXPIRATION_ID}
{DATASET_EXPIRATION_ID}ttlId in the response.Request
The following request updates the expiration, display name, and description for dataset expiration SD-c1f902aa-57cb-412e-bb2b-c70b8e1a5f45:
curl -X PUT \
https://platform.adobe.io/data/core/hygiene/ttl/SD-c1f902aa-57cb-412e-bb2b-c70b8e1a5f45 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}' \
-H 'Content-Type: application/json' \
-d '{
"displayName": "Customer Dataset Expiry Rule",
"description": "Updated description for Acme customer dataset",
"expiry": "2031-06-15"
}'
displayNamedescriptionexpiryResponse
A successful response returns HTTP status 200 (OK) and the updated dataset expiration configuration.
{
"ttlId": "SD-c1f902aa-57cb-412e-bb2b-c70b8e1a5f45",
"datasetId": "3e9f815ae1194c65b2a4c5ea",
"datasetName": "Acme_Customer_Data",
"sandboxName": "acme-prod",
"displayName": "Customer Dataset Expiry Rule",
"description": "Updated description for Acme customer dataset",
"imsOrg": "C9D8E7F6A5B41234567890AB@AcmeOrg",
"status": "pending",
"expiry": "2031-06-15T00:00:00Z",
"updatedAt": "2031-05-01T14:11:12.000Z",
"updatedBy": "b.tarth@acme.com <b.tarth@acme.com> 3E9F815AE1194C65B2A4C5EA@acme.com"
}
ttlIddatasetIddatasetNamesandboxNamedisplayNamedescriptionimsOrgstatusOne of:
pending, executing, cancelled, completed.expiryupdatedAtupdatedByAn unsuccessful response returns a 404 (Not Found) HTTP status if no such dataset expiration exists.
Cancel a dataset expiration delete
Cancel a pending dataset expiration configuration by making a DELETE request to /ttl/{ID}.
pending status can be cancelled. Attempting to cancel an expiration that is already executing, completed, or cancelled returns HTTP 400 (Bad Request).API format
DELETE /ttl/{ID}
{ID}Request
The following request cancels a dataset expiration with ID SD-d4a7d918-283b-41fd-bfe1-4e730a613d21:
curl -X DELETE \
https://platform.adobe.io/data/core/hygiene/ttl/SD-d4a7d918-283b-41fd-bfe1-4e730a613d21 \
-H 'Authorization: Bearer {ACCESS_TOKEN}' \
-H 'x-api-key: {API_KEY}' \
-H 'x-gw-ims-org-id: {ORG_ID}' \
-H 'x-sandbox-name: {SANDBOX_NAME}'
Response
A successful response returns HTTP status 200 (OK) and the cancelled dataset expiration configuration. Not that the expiration鈥檚 status attribute is set to cancelled.
{
"ttlId": "SD-d4a7d918-283b-41fd-bfe1-4e730a613d21",
"datasetId": "5a9e2c68d3b24f03b55a91ce",
"datasetName": "Acme_Customer_Data",
"sandboxName": "acme-prod",
"displayName": "Customer Dataset Expiry Rule",
"description": "Cancelled expiry configuration for Acme customer dataset",
"imsOrg": "C9D8E7F6A5B41234567890AB@AcmeOrg",
"status": "cancelled",
"expiry": "2032-02-28T00:00:00Z",
"updatedAt": "2032-01-15T08:27:31.000Z",
"updatedBy": "s.clegane@acme.com <s.clegane@acme.com> 5A9E2C68D3B24F03B55A91CE@acme.com"
}
ttlIddatasetIddatasetNamesandboxNamedisplayNamedescriptionimsOrgstatusOne of:
pending, executing, cancelled, completed.expiryupdatedAtupdatedByExample 400 (Bad Request) response
A 400 error occurs when attempting to cancel a dataset that has an executing, completed, or cancelled expiration configuration.
{
"type": "http://ns.adobe.com/aep/errors/HYGN-3102-400",
"title": "The requested dataset already has an existing expiration. Additional detail: A TTL already exists for datasetId=686e9ca25ef7462aefe72c93",
"status": 400,
"report": {
"tenantInfo": {
"sandboxName": "prod",
"sandboxId": "not-applicable",
"imsOrgId": "{IMS_ORG_ID}"
},
"additionalContext": {
"Invoking Client ID": "acp_privacy_hygiene"
}
},
"error-chain": [
{
"serviceId": "HYGN",
"errorCode": "HYGN-3102-400",
"invokingServiceId": "acp_privacy_hygiene",
"unixTimeStampMs": 1754408150394
}
]
}
completed or cancelled.Appendix
Accepted query parameters query-params
The following table outlines the available query parameters when listing dataset expirations:
description, displayName, and datasetName parameters all contain the ability to searched for by LIKE values. This means that you can find scheduled dataset expirations named: 鈥淣ame123鈥, 鈥淣ame183鈥, 鈥淒isplayName1234鈥 by searching for the string 鈥淣ame1鈥.authorauthor query parameter to find the person who most recently updated the dataset expiration. If no updates have been made since its creation, this will match the original creator of the expiration. This parameter matches expirations where the created_by field corresponds to the search string.If the search string begins with
LIKE or NOT LIKE, the remainder is treated as an SQL search pattern. Otherwise, the entire search string is treated as a literal string that must exactly match the entire content of a created_by field.author=LIKE %john%, author=John Q. PublicdatasetIddatasetId=62b3925ff20f8e1b990a7434datasetNamedatasetName=Acmedescriptiondescription=Handle expiration of Acme information through the end of 2024.displayNamedisplayName=License ExpiryexecutedDate / executedFromDate / executedToDateexecutedDate=2023-02-05T19:34:40.383615ZexpiryDate2024-01-01expiryToDate / expiryFromDateexpiryFromDate=2099-01-01&expiryToDate=2100-01-01limitlimit=50orderByorderBy query parameter specifies the sorting order of the results returned by the API. Use it to arrange the data based on one or more fields, either in ascending (ASC) or descending (DESC) order. Use the + or - prefix to signify ASC, DESC respectively. The following values are accepted: displayName, description, datasetName, id, updatedBy, updatedAt, expiry, status.-datasetNameorgIdx-gw-ims-org-id headers, and is ignored unless the request supplies a service token.orgId=885737B25DC460C50A49411B@51黑料不打烊Orgpagepage=3sandboxNamex-sandbox-name header. Use sandboxName=* to include dataset expirations from all sandboxes.sandboxName=dev1searchMatches expirations where the specified string is an exact match for the expiration ID, or is聽 contained 聽in any of these fields:
- author
- display name
- description
- display name
- dataset name
search=TESTINGstatusstatus=pending,cancelledttlIdttlID=SD-c8c75921-2416-4be7-9cfd-9ab01de66c5fupdatedDate2024-01-01updatedToDate / updatedFromDateAn expiration is considered updated on every edit, including when it is created, cancelled, or executed.
updatedDate=2022-01-01