Segment export jobs endpoint
Export jobs are asynchronous processes that are used to persist audience segment members to datasets. You can use the /export/jobs
endpoint in the Adobe Experience Platform Segmentation API, which allows you to programmatically retrieve, create, and cancel export jobs.
Getting started
The endpoints used in this guide are part of the Adobe Experience Platform Segmentation Service API. Before continuing, please review the getting started guide for important information that you need to know in order to successfully make calls to the API, including required headers and how to read example API calls.
Retrieve a list of export jobs retrieve-list
You can retrieve a list of all export jobs for your organization by making a GET request to the /export/jobs
endpoint.
API format
The /export/jobs
endpoint supports several query parameters to help filter your results. While these parameters are optional, their use is strongly recommended to help reduce expensive overhead. Making a call to this endpoint with no parameters will retrieve all export jobs available for your organization. Multiple parameters can be included, separated by ampersands (&
).
GET /export/jobs
GET /export/jobs?{QUERY_PARAMETERS}
Query parameters
table 0-row-3 1-row-3 2-row-3 3-row-3 | ||
---|---|---|
Parameter | Description | Example |
limit |
Specifies the number of export jobs returned. | limit=10 |
offset |
Specifies the offset of the pages of results. | offset=1540974701302_96 |
status |
Filters the results based on status. The supported values are “NEW”, “SUCCEEDED”, and “FAILED”. | status=NEW |
Request
The following request will retrieve the last two export jobs within your organization.
code language-shell |
---|
|
Response
The following response returns HTTP status 200 with a list of successfully completed export jobs, based on the query parameter provided in the request path.
code language-json |
---|
|
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 7-row-2 8-row-2 9-row-2 | |
---|---|
Property | Description |
destination |
Destination information for the exported data:
|
fields |
A list of the exported fields, separated by commas. |
schema.name |
The name of the schema associated with the dataset where data is to be exported. |
filter.segments |
The segments that are exported. The following fields are included:
|
mergePolicy |
Merge policy information for the exported data. |
metrics.totalTime |
A field indicating the total time that export job took to run. |
metrics.profileExportTime |
A field indicating the time it took for the profiles to export. |
page |
Information about the pagination of the requested export jobs. |
link.next |
A link to the next page of export jobs. |
Create a new export job create
You can create a new export job by making a POST request to the /export/jobs
endpoint.
API format
POST /export/jobs
Request
The following request creates a new export job, configured by the parameters provided in the payload.
code language-shell |
---|
|
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 7-row-2 8-row-2 9-row-2 10-row-2 11-row-2 12-row-2 13-row-2 | |
---|---|
Property | Description |
fields |
A list of the exported fields, separated by commas. If left blank, all fields will be exported. |
mergePolicy |
Specifies the merge policy to govern the exported data. Include this parameter when there are multiple segments being exported. If not provided, the export will take the same merge policy as the given segment. |
filter |
An object that specifies the segments that are going to be included in the export job by ID, qualification time, or ingest time, depending on the subproperties listed below. If left blank, all the data will be exported. |
filter.segments |
Specifies the segments to export. Omitting this value will result in all data from all profiles being exported. Accepts an array of segment objects, each containing the following fields:
|
filter.segmentQualificationTime |
Filter based on segment qualification time. The start time and/or end time can be provided. |
filter.segmentQualificationTime.startTime |
Segment qualification start time for a segment ID for a given status. It not provided, there will be no filter on the start time for a segment ID qualification. The timestamp must be provided in RFC 3339 format. |
filter.segmentQualificationTime.endTime |
Segment qualification end time for a segment ID for a given status. It not provided, there will be no filter on the end time for a segment ID qualification. The timestamp must be provided in RFC 3339 format. |
filter.fromIngestTimestamp |
Limits exported profiles to only include those that have been updated after this timestamp. The timestamp must be provided in RFC 3339 format.
|
filter.emptyProfiles |
A boolean value that indicates whether to filter for empty profiles. Profiles can contain profile records, ExperienceEvent records, or both. Profiles with no profile records and only ExperienceEvent records are referred to as “emptyProfiles”. To export all profiles in the Profile store, including the “emptyProfiles”, set the value of emptyProfiles to true . If emptyProfiles is set to false , only profiles with profile records in the store are exported. By default, if emptyProfiles attribute is not included, only profiles containing profile records are exported. |
additionalFields.eventList |
Controls the time-series event fields exported for child or associated objects by providing one or more of the following settings:
|
destination |
(Required) Information about the exported data:
|
schema.name |
(Required) The name of the schema associated with the dataset where data is to be exported. |
evaluationInfo.segmentation |
(Optional) A boolean value that, if not provided, defaults to false . A value of true indicates that segmentation needs to be done on the export job. |
Response
A successful response returns HTTP status 200 with details of your newly created export job.
code language-json |
---|
|
table 0-row-2 1-row-2 | |
---|---|
Property | Description |
id |
A system-generated read-only value identifying the export job that was just created. |
Alternatively, if destination.segmentPerBatch
had been set to true
, the destination
object above would have a batches
array, as shown below:
code language-json |
---|
|
Retrieve a specific export job get
You can retrieve detailed information about a specific export job by making a GET request to the /export/jobs
endpoint and providing the ID of the export job you wish to retrieve in the request path.
API format
GET /export/jobs/{EXPORT_JOB_ID}
{EXPORT_JOB_ID}
id
of the export job you want to access.Request
code language-shell |
---|
|
Response
A successful response returns HTTP status 200 with detailed information about the specified export job.
code language-json |
---|
|
table 0-row-2 1-row-2 2-row-2 3-row-2 4-row-2 5-row-2 6-row-2 7-row-2 8-row-2 | |
---|---|
Property | Description |
destination |
Destination information for the exported data:
|
fields |
A list of the exported fields, separated by commas. |
schema.name |
The name of the schema associated with the dataset where data is to be exported. |
filter.segments |
The segments that are exported. The following fields are included:
|
mergePolicy |
Merge policy information for the exported data. |
metrics.totalTime |
A field indicating the total time that export job took to run. |
metrics.profileExportTime |
A field indicating the time it took for the profiles to export. |
totalExportedProfileCounter |
The total number of profile exported across all batches. |
Cancel or delete a specific export job delete
You can request to delete the specified export job by making a DELETE request to the /export/jobs
endpoint and providing the ID of the export job you wish to delete in the request path.
API format
DELETE /export/jobs/{EXPORT_JOB_ID}
{EXPORT_JOB_ID}
id
of the export job you want to delete.Request
code language-shell |
---|
|
Response
A successful response returns HTTP status 204 with the following message:
{
"status": true,
"message": "Export job has been marked for cancelling"
}
Next steps
After reading this guide you now have a better understanding of how export jobs work.