Campaign Activities - Amazon Pinpoint

Campaign Activities

A campaign represents a messaging initiative that engages a specific segment of users for an Amazon Pinpoint application. The Campaign Activities resource provides information about the activities that were performed by a campaign, such as the time during which the campaign ran and the number of endpoints that the campaign delivered messages to.

You can use this resource to retrieve information about the activities that were performed by a specific campaign.

URI

/v1/apps/application-id/campaigns/campaign-id/activities

HTTP methods

GET

Operation ID: GetCampaignActivities

Retrieves information about all the activities for a campaign.

Path parameters
NameTypeRequiredDescription
application-idStringTrue

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

campaign-idStringTrue

The unique identifier for the campaign.

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
200ActivitiesResponse

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).

OPTIONS

Retrieves information about the communication requirements and options that are available for the Campaign Activities resource.

Path parameters
NameTypeRequiredDescription
campaign-idStringTrue

The unique identifier for the campaign.

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

Response bodies

{ "NextToken": "string", "Item": [ { "Id": "string", "ApplicationId": "string", "CampaignId": "string", "TreatmentId": "string", "State": "string", "Result": "string", "ScheduledStart": "string", "Start": "string", "End": "string", "SuccessfulEndpointCount": integer, "TotalEndpointCount": integer, "TimezonesTotalCount": integer, "TimezonesCompletedCount": integer, "ExecutionMetrics": { } } ] }
{ "RequestID": "string", "Message": "string" }

Properties

ActivitiesResponse

Provides information about the activities that were performed by a campaign.

PropertyTypeRequiredDescription
Item

Array of type ActivityResponse

True

An array of responses, one for each activity that was performed by the campaign.

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.

ActivityResponse

Provides information about an activity that was performed by a campaign.

PropertyTypeRequiredDescription
ApplicationId

string

True

The unique identifier for the application that the campaign applies to.

CampaignId

string

True

The unique identifier for the campaign that the activity applies to.

End

string

False

The actual time, in ISO 8601 format, when the activity was marked CANCELLED or COMPLETED.

ExecutionMetrics

object

False

A JSON object that contains metrics relating to the campaign execution for this campaign activity. For information about the structure and contents of the results, see Standard Amazon Pinpoint analytics metrics in the Amazon Pinpoint Developer Guide.

Id

string

True

The unique identifier for the activity.

Result

string

False

Specifies whether the activity succeeded. Possible values are SUCCESS and FAIL.

ScheduledStart

string

False

The scheduled start time, in ISO 8601 format, for the activity.

Start

string

False

The actual start time, in ISO 8601 format, of the activity.

State

string

False

The current status of the activity. Possible values are: PENDING, INITIALIZING, RUNNING, PAUSED, CANCELLED, and COMPLETED.

SuccessfulEndpointCount

integer

False

The total number of endpoints that the campaign successfully delivered messages to.

TimezonesCompletedCount

integer

False

The total number of time zones that were completed.

TimezonesTotalCount

integer

False

The total number of unique time zones that are in the segment for the campaign.

TotalEndpointCount

integer

False

The total number of endpoints that the campaign attempted to deliver messages to.

TreatmentId

string

False

The unique identifier for the campaign treatment that the activity applies to. A treatment is a variation of a campaign that's used for A/B testing of a campaign.

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:

GetCampaignActivities