Export Jobs - Amazon Pinpoint

Export Jobs

The Export Jobs resource represents jobs that export endpoint definitions to files. A file can be added directly to an Amazon Simple Storage Service (Amazon S3) bucket by using the Amazon Pinpoint API or downloaded directly to a computer by using the Amazon Pinpoint console.

An endpoint uniquely identifies a mobile device, email address, or phone number that can receive a message. By using export jobs, you can export information about all the endpoints that are associated with an application, or you can export information about the subset of endpoints that belong to a segment.

You can use the Export Jobs resource to create an export job for an application or to retrieve information about all the export jobs for an application. This includes checking the status of an in-progress export job and accessing the history of your export jobs.

URI

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

HTTP methods

GET

Operation ID: GetExportJobs

Retrieves information about the status and settings of all the export jobs for an application.

Path parameters
NameTypeRequiredDescription
application-idStringTrue

The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Header parameters
NameTypeRequiredDescription
acceptStringFalse

Indicates which content types, expressed as MIME types, the client understands.

Query parameters
NameTypeRequiredDescription
page-sizeStringFalse

The maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.

tokenStringFalse

The NextToken string that specifies which page of results to return in a paginated response.

Responses
Status codeResponse modelDescription
200ExportJobsResponse

The request succeeded.

400MessageBody

The request contains a syntax error (BadRequestException).

403MessageBody

The request was denied because access to the specified resource is forbidden (ForbiddenException).

404MessageBody

The request failed because the specified resource was not found (NotFoundException).

405MessageBody

The request failed because the method is not allowed for the specified resource (MethodNotAllowedException).

413MessageBody

The request failed because the payload for the body of the request is too large (RequestEntityTooLargeException).

429MessageBody

The request failed because too many requests were sent during a certain amount of time (TooManyRequestsException).

500MessageBody

The request failed due to an unknown internal server error, exception, or failure (InternalServerErrorException).

POST

Operation ID: CreateExportJob

Creates an export job for an application.

Path parameters
NameTypeRequiredDescription
application-idStringTrue

The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Header parameters
NameTypeRequiredDescription
acceptStringFalse

Indicates which content types, expressed as MIME types, the client understands.

Responses
Status codeResponse modelDescription
202ExportJobResponse

The request was accepted for processing. Processing may not be complete.

400MessageBody

The request contains a syntax error (BadRequestException).

403MessageBody

The request was denied because access to the specified resource is forbidden (ForbiddenException).

404MessageBody

The request failed because the specified resource was not found (NotFoundException).

405MessageBody

The request failed because the method is not allowed for the specified resource (MethodNotAllowedException).

413MessageBody

The request failed because the payload for the body of the request is too large (RequestEntityTooLargeException).

429MessageBody

The request failed because too many requests were sent during a certain amount of time (TooManyRequestsException).

500MessageBody

The request failed due to an unknown internal server error, exception, or failure (InternalServerErrorException).

OPTIONS

Retrieves information about the communication requirements and options that are available for the Export Jobs resource.

Path parameters
NameTypeRequiredDescription
application-idStringTrue

The unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.

Responses
Status codeResponse modelDescription
200None

The request succeeded.

Schemas

Request bodies

{ "SegmentId": "string", "SegmentVersion": integer, "S3UrlPrefix": "string", "RoleArn": "string" }

Response bodies

{ "Item": [ { "ApplicationId": "string", "Id": "string", "JobStatus": enum, "CompletedPieces": integer, "FailedPieces": integer, "TotalPieces": integer, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": integer, "TotalProcessed": integer, "Failures": [ "string" ], "Definition": { "SegmentId": "string", "SegmentVersion": integer, "S3UrlPrefix": "string", "RoleArn": "string" } } ], "NextToken": "string" }
{ "ApplicationId": "string", "Id": "string", "JobStatus": enum, "CompletedPieces": integer, "FailedPieces": integer, "TotalPieces": integer, "CreationDate": "string", "CompletionDate": "string", "Type": "string", "TotalFailures": integer, "TotalProcessed": integer, "Failures": [ "string" ], "Definition": { "SegmentId": "string", "SegmentVersion": integer, "S3UrlPrefix": "string", "RoleArn": "string" } }
{ "RequestID": "string", "Message": "string" }

Properties

ExportJobRequest

Specifies the settings for a job that exports endpoint definitions to an Amazon Simple Storage Service (Amazon S3) bucket.

PropertyTypeRequiredDescription
RoleArn

string

True

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorizes Amazon Pinpoint to access the Amazon S3 location where you want to export endpoint definitions to.

S3UrlPrefix

string

True

The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where you want to export endpoint definitions to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://bucket-name/folder-name/.

SegmentId

string

False

The identifier for the segment to export endpoint definitions from. If you don't specify this value, Amazon Pinpoint exports definitions for all the endpoints that are associated with the application.

SegmentVersion

integer

False

The version of the segment to export endpoint definitions from, if specified.

ExportJobResource

Provides information about the resource settings for a job that exports endpoint definitions to a file. The file can be added directly to an Amazon Simple Storage Service (Amazon S3) bucket by using the Amazon Pinpoint API or downloaded directly to a computer by using the Amazon Pinpoint console.

PropertyTypeRequiredDescription
RoleArn

string

True

The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that authorized Amazon Pinpoint to access the Amazon S3 location where the endpoint definitions were exported to.

S3UrlPrefix

string

True

The URL of the location in an Amazon Simple Storage Service (Amazon S3) bucket where the endpoint definitions were exported to. This location is typically a folder that contains multiple files. The URL should be in the following format: s3://bucket-name/folder-name/.

SegmentId

string

False

The identifier for the segment that the endpoint definitions were exported from. If this value isn't present, Amazon Pinpoint exported definitions for all the endpoints that are associated with the application.

SegmentVersion

integer

False

The version of the segment that the endpoint definitions were exported from.

ExportJobResponse

Provides information about the status and settings of a job that exports endpoint definitions to a file. The file can be added directly to an Amazon Simple Storage Service (Amazon S3) bucket by using the Amazon Pinpoint API or downloaded directly to a computer by using the Amazon Pinpoint console.

PropertyTypeRequiredDescription
ApplicationId

string

True

The unique identifier for the application that's associated with the export job.

CompletedPieces

integer

False

The number of pieces that were processed successfully (completed) by the export job, as of the time of the request.

CompletionDate

string

False

The date, in ISO 8601 format, when the export job was completed.

CreationDate

string

True

The date, in ISO 8601 format, when the export job was created.

Definition

ExportJobResource

True

The resource settings that apply to the export job.

FailedPieces

integer

False

The number of pieces that weren't processed successfully (failed) by the export job, as of the time of the request.

Failures

Array of type string

False

An array of entries, one for each of the first 100 entries that weren't processed successfully (failed) by the export job, if any.

Id

string

True

The unique identifier for the export job.

JobStatus

string

Values: CREATED | PREPARING_FOR_INITIALIZATION | INITIALIZING | PROCESSING | PENDING_JOB | COMPLETING | COMPLETED | CANCELLING | CANCELLED | FAILING | FAILED

True

The status of the export job. The job status is FAILED if Amazon Pinpoint wasn't able to process one or more pieces in the job.

TotalFailures

integer

False

The total number of endpoint definitions that weren't processed successfully (failed) by the export job, typically because an error, such as a syntax error, occurred.

TotalPieces

integer

False

The total number of pieces that must be processed to complete the export job. Each piece consists of an approximately equal portion of the endpoint definitions that are part of the export job.

TotalProcessed

integer

False

The total number of endpoint definitions that were processed by the export job.

Type

string

True

The job type. This value is EXPORT for export jobs.

ExportJobsResponse

Provides information about all the export jobs that are associated with an application or segment. An export job is a job that exports endpoint definitions to a file.

PropertyTypeRequiredDescription
Item

Array of type ExportJobResponse

True

An array of responses, one for each export job that's associated with the application (Export Jobs resource) or segment (Segment Export Jobs resource).

NextToken

string

False

The string to use in a subsequent request to get the next page of results in a paginated response. This value is null if there are no additional pages.

MessageBody

Provides information about an API request or response.

PropertyTypeRequiredDescription
Message

string

False

The message that's returned from the API.

RequestID

string

False

The unique identifier for the request or response.

See also

For more information about using this API in one of the language-specific AWS SDKs and references, see the following:

GetExportJobs

CreateExportJob