Menu
Amazon Pinpoint
REST API Reference

Import Job

A job that imports endpoint definitions or user IDs from an Amazon S3 bucket. You can use this resource to look up an import job.

URI

/v1/apps/application-id/jobs/import/job-id

HTTP Methods

GET

Returns information about an import job.

Header

Name Required Type

accept

false

string

Path

Name Required Type

application-id

true

string

job-id

true

string

Response

Status Code Schema

200

ImportJobResponse

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 ImportJobResponse

{ "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": { "S3Url": "string", "RoleArn": "string", "ExternalId": "string", "Format": "CSV", "RegisterEndpoints": true, "DefineSegment": true, "SegmentName": "string", "SegmentId": "string" } }

Example MessageBody

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

Attributes

ImportJobResponse

Attribute Type Description

ApplicationId

string

The unique ID of the application to which the import job applies.

CompletedPieces

integer

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

CompletionDate

string

The date the import job completed in ISO 8601 format.

CreationDate

string

The date the import job was created in ISO 8601 format.

Definition

ImportJobResource

The import job settings.

FailedPieces

integer

The number of pieces that have failed to import 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 import job.

JobStatus

string

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

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

TotalFailures

integer

The number of entries that failed to import; for example, because of syntax errors.

TotalPieces

integer

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

TotalProcessed

integer

The number of entries that were processed by the import job.

Type

string

The job type: Import.

ImportJobResource

Attribute Type Description

DefineSegment

boolean

Sets whether the imported endpoint definitions or user IDs define a segment when they are imported. If you set this to true, also set a value for SegmentName.

ExternalId

string

DEPRECATED. Your AWS account ID, which you assigned to the ExternalID key in an IAM trust policy. Used by Amazon Pinpoint to assume an IAM role. This requirement is removed, and external IDs are not recommended for IAM roles assumed by Amazon Pinpoint.

Format

string

The format of the files to import. Valid values: CSV, JSON

RegisterEndpoints

boolean

Sets whether the endpoints definitions are registered with Amazon Pinpoint when they are imported.

RoleArn

string

The Amazon Resource Name (ARN) of an IAM role that grants Amazon Pinpoint access to the Amazon S3 location that contains the files to import.

S3Url

string

A URL that points to the location within an Amazon S3 bucket that contains the files to import. The location can be a folder or a single file. The URL should follow this format: s3://bucket-name/folder-name/file-name

Amazon Pinpoint will import files from this location and any subfolders it contains.

SegmentId

string

The ID of the segment to update if the import job is meant to update an existing segment.

SegmentName

string

A custom name for the segment created by the import job. Use if DefineSegment is true.

MessageBody

Attribute Type Description

Message

string

The error message returned from the API.

RequestID

string

The unique message body ID.