Skip to main content

campaign_date_range_kpis

Creates, updates, deletes, gets or lists a campaign_date_range_kpis resource.

Overview

Namecampaign_date_range_kpis
TypeResource
Idaws.pinpoint.campaign_date_range_kpis

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
application_idstringThe unique identifier for the application that the metric applies to.
campaign_idstringThe unique identifier for the campaign that the metric applies to.
end_timestring (date-time)The last date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.
kpi_namestringThe name of the metric, also referred to as a key performance indicator (KPI), that the data was retrieved for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. For a list of possible values, see the Amazon Pinpoint Developer Guide.
kpi_resultobjectAn array of objects that contains the results of the query. Each object contains the value for the metric and metadata about that value.
next_tokenstringThe string to use in a subsequent request to get the next page of results in a paginated response. This value is null for the Campaign Metrics resource because the resource returns all results in a single page.
start_timestring (date-time)The first date and time of the date range that was used to filter the query results, in extended ISO 8601 format. The date range is inclusive.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_campaign_date_range_kpiselectapplication-id, campaign-id, kpi-name, regionend-time, next-token, page-size, start-timeRetrieves (queries) pre-aggregated data for a standard metric that applies to a campaign.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
application-idstringThe unique identifier for the application. This identifier is displayed as the Project ID on the Amazon Pinpoint console.
campaign-idstringThe unique identifier for the campaign.
kpi-namestringThe name of the metric, also referred to as a key performance indicator (KPI), to retrieve data for. This value describes the associated metric and consists of two or more terms, which are comprised of lowercase alphanumeric characters, separated by a hyphen. Examples are email-open-rate and successful-delivery-rate. For a list of valid values, see the Amazon Pinpoint Developer Guide.
regionstringAWS region (default: us-east-1)
end-timestring (date-time)The last date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-26T20:00:00Z for 8:00 PM UTC July 26, 2019.
next-tokenstringThe string that specifies which page of results to return in a paginated response. This parameter is not supported for application, campaign, and journey metrics.
page-sizestringThe maximum number of items to include in each page of a paginated response. This parameter is not supported for application, campaign, and journey metrics.
start-timestring (date-time)The first date and time to retrieve data for, as part of an inclusive date range that filters the query results. This value should be in extended ISO 8601 format and use Coordinated Universal Time (UTC), for example: 2019-07-19T20:00:00Z for 8:00 PM UTC July 19, 2019. This value should also be fewer than 90 days from the current day.

SELECT examples

Retrieves (queries) pre-aggregated data for a standard metric that applies to a campaign.

SELECT
application_id,
campaign_id,
end_time,
kpi_name,
kpi_result,
next_token,
start_time
FROM aws.pinpoint.campaign_date_range_kpis
WHERE `application-id` = '{{ application-id }}' -- required
AND `campaign-id` = '{{ campaign-id }}' -- required
AND `kpi-name` = '{{ kpi-name }}' -- required
AND region = '{{ region }}' -- required
AND `end-time` = '{{ end-time }}'
AND `next-token` = '{{ next-token }}'
AND `page-size` = '{{ page-size }}'
AND `start-time` = '{{ start-time }}'
;