Menu
Amazon Pinpoint
REST API Reference

Segment Export Jobs

Use this resource to look up the jobs that export the endpoints that belong to a segment. You can use this resource to check the status of an in-progress export job, and you can access the history of your export jobs.

URI

/v1/apps/application-id/segments/segment-id/jobs/export

HTTP Methods

GET

Returns a list of export jobs for a specific segment.

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

segment-id

true

string

Query

Name Required Type

page-size

false

string

token

false

string

Response

Status Code Schema

200

ExportJobsResponse

Errors

Errors

Status Code Schema Error Type

400

MessageBody

BadRequestException

403

MessageBody

ForbiddenException

404

MessageBody

NotFoundException

405

MessageBody

MethodNotAllowedException

429

MessageBody

TooManyRequestsException

500

MessageBody

InternalServerErrorException

Schemas

Response Schemas

Example ExportJobsResponse

{ "Item": [ { "ApplicationId": "string", "Id": "string", "JobStatus": "CREATED", "CompletedPieces": 0, "FailedPieces": 0, "TotalPieces": 0, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": 0, "TotalProcessed": 0, "Failures": [ "string" ], "Definition": { "SegmentId": "string", "S3UrlPrefix": "string", "RoleArn": "string" } } ], "NextToken": "string" }

Example MessageBody

{ "RequestID": "string", "Message": "string" }

Attributes

ExportJobsResponse

Attribute Type Description

Item

array

A list of export jobs for the application.

NextToken

string

The string that you use in a subsequent request to get the next page of results in a paginated response.

ExportJobResponse

Attribute Type Description

ApplicationId

string

The unique ID of the application associated with the export job.

CompletedPieces

integer

The number of pieces that have successfully completed as of the time of the request.

CompletionDate

string

The date the job completed in ISO 8601 format.

CreationDate

string

The date the job was created in ISO 8601 format.

Definition

ExportJobResource

The export job settings.

FailedPieces

integer

The number of pieces that failed to be processed as of the time of the request.

Failures

array

Provides up to 100 of the first failed entries for the job, if any exist.

Id

string

The unique ID of the job.

JobStatus

string

The status of the job. Valid values: CREATED, INITIALIZING, PROCESSING, COMPLETING, COMPLETED, FAILING, FAILED

The job status is FAILED if one or more pieces failed.

TotalFailures

integer

The number of endpoints that were not processed; for example, because of syntax errors.

TotalPieces

integer

The total number of pieces that must be processed to finish the job. Each piece is an approximately equal portion of the endpoints.

TotalProcessed

integer

The number of endpoints that were processed by the job.

Type

string

The job type. Will be 'EXPORT'.

ExportJobResource

Attribute Type Description

RoleArn

string

The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that endpoints will be exported to.

S3UrlPrefix

string

A URL that points to the location within an Amazon S3 bucket that will receive the export. The location is typically a folder with multiple files.

The URL should follow this format: s3://bucket-name/folder-name/

Amazon Pinpoint will export endpoints to this location.

SegmentId

string

The ID of the segment to export endpoints from. If not present, Amazon Pinpoint exports all of the endpoints that belong to the application.

SegmentVersion

integer

The version of the segment to export if specified.

MessageBody

Attribute Type Description

Message

string

The error message that's returned from the API.

RequestID

string

The unique message body ID.