Amazon Pinpoint
REST API Reference

The AWS Documentation website is getting a new look!
Try it now and let us know what you think. Switch to the new look >>

You can return to the original look by selecting English in the language selector above.

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 the activity performed by a campaign.

Path Parameters

Name Type Required Description
application-id String True

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

campaign-id String True

The unique identifier for the campaign.

Header Parameters

Name Type Required Description
accept String False

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

Query Parameters

Name Type Required Description
page-size String False

The maximum number of items to include in each page of a paginated response. This parameter is currently not supported by the Application Metrics and Campaign Metrics resources.

token String False

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

Responses

Status Code Response Model Description
200 ActivitiesResponse

The request succeeded.

400 MessageBody

The request contains a syntax error (BadRequestException).

403 MessageBody

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

404 MessageBody

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

405 MessageBody

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

429 MessageBody

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

500 MessageBody

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.

Responses

Status Code Response Model Description
200 None

The request succeeded.

Schemas

Response Bodies

Example ActivitiesResponse

{ "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 } ] }

Example MessageBody

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

Properties

ActivitiesResponse

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

Property Type Required Description
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.

Item

Array of type ActivityResponse

True

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

ActivityResponse

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

Property Type Required Description
Id

string

True

The unique identifier for the activity.

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.

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.

State

string

False

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

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.

End

string

False

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

SuccessfulEndpointCount

integer

False

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

TotalEndpointCount

integer

False

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

TimezonesTotalCount

integer

False

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

TimezonesCompletedCount

integer

False

The total number of time zones that were completed.

MessageBody

Provides information about an API request or response.

Property Type Required Description
RequestID

string

False

The unique identifier for the request or response.

Message

string

False

The message that's returned from the API.

See Also

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

GetCampaignActivities