Menu
Amazon Pinpoint
REST API Reference

Import Job

Represents a job that imports endpoint definitions 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

Copy
{ "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

Copy
{ "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 endpoints 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 endpoints to import.

TotalProcessed

integer

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

Type

string

The job type. Will be Import.

ImportJobResource

Attribute Type Description

DefineSegment

boolean

Sets whether the endpoints create a segment when they are imported.

ExternalId

string

A unique, custom ID assigned to the IAM role that restricts who can assume the role.

Format

string

The format of the files that contain the endpoint definitions. Valid values: CSV, JSON

RegisterEndpoints

boolean

Sets whether the endpoints 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 endpoints to import.

S3Url

string

A URL that points to the location within an Amazon S3 bucket that contains the endpoints 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 endpoints 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.