Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

Look up endpoints in an Amazon Pinpoint project

Focus mode
Look up endpoints in an Amazon Pinpoint project - Amazon Pinpoint

You can look up the details for any individual endpoint that was added to an Amazon Pinpoint project. These details can include the destination address for your messages, the messaging channel, data about the user's device, data about the user's location, and any custom attributes that you record in your endpoints.

To look up an endpoint, you need the endpoint ID. If you don't know the ID, you can get the endpoint data by exporting instead. To export endpoints, see Export endpoints from Amazon Pinpoint to Amazon S3 buckets.

Examples

The following examples show you how to look up an individual endpoint by specifying its ID.

AWS CLI

You can use Amazon Pinpoint by running commands with the AWS CLI.

Example Get endpoint command

To look up an endpoint, use the get-endpoint command:

$ aws pinpoint get-endpoint \ > --application-id application-id \ > --endpoint-id endpoint-id

Where:

  • application-id is the ID of the Amazon Pinpoint project that contains the endpoint.

  • endpoint-id is the ID of the endpoint that you're looking up.

The response to this command is the JSON definition of the endpoint, as in the following example:

{ "EndpointResponse": { "Address": "1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1e2f", "ApplicationId": "application-id", "Attributes": { "Interests": [ "Technology", "Music", "Travel" ] }, "ChannelType": "APNS", "CohortId": "63", "CreationDate": "2018-05-01T17:31:01.046Z", "Demographic": { "AppVersion": "1.0", "Make": "apple", "Model": "iPhone", "ModelVersion": "8", "Platform": "ios", "PlatformVersion": "11.3.1", "Timezone": "America/Los_Angeles" }, "EffectiveDate": "2018-05-07T19:03:29.963Z", "EndpointStatus": "ACTIVE", "Id": "example_endpoint", "Location": { "City": "Seattle", "Country": "US", "Latitude": 47.6, "Longitude": -122.3, "PostalCode": "98121" }, "Metrics": { "music_interest_level": 6.0, "travel_interest_level": 4.0, "technology_interest_level": 9.0 }, "OptOut": "ALL", "RequestId": "7f546cac-6858-11e8-adcd-2b5a07aab338", "User": { "UserAttributes": { "Gender": "Female", "FirstName": "Wang", "LastName": "Xiulan", "Age": "39" }, "UserId": "example_user" } } }
AWS SDK for Java

You can use the Amazon Pinpoint API in your Java applications by using the client that's provided by the AWS SDK for Java.

Example Code

To look up an endpoint, initialize a GetEndpointRequest object. Then, pass this object to the getEndpoint method of the AmazonPinpoint client:

import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.pinpoint.PinpointClient; import software.amazon.awssdk.services.pinpoint.model.EndpointResponse; import software.amazon.awssdk.services.pinpoint.model.GetEndpointResponse; import software.amazon.awssdk.services.pinpoint.model.PinpointException; import software.amazon.awssdk.services.pinpoint.model.GetEndpointRequest;
import com.google.gson.FieldNamingPolicy; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import software.amazon.awssdk.regions.Region; import software.amazon.awssdk.services.pinpoint.PinpointClient; import software.amazon.awssdk.services.pinpoint.model.EndpointResponse; import software.amazon.awssdk.services.pinpoint.model.GetEndpointResponse; import software.amazon.awssdk.services.pinpoint.model.PinpointException; import software.amazon.awssdk.services.pinpoint.model.GetEndpointRequest; /** * Before running this Java V2 code example, set up your development * environment, including your credentials. * * For more information, see the following documentation topic: * * https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/get-started.html */ public class LookUpEndpoint { public static void main(String[] args) { final String usage = """ Usage: <appId> <endpoint> Where: appId - The ID of the application to delete. endpoint - The ID of the endpoint.\s """; if (args.length != 2) { System.out.println(usage); System.exit(1); } String appId = args[0]; String endpoint = args[1]; System.out.println("Looking up an endpoint point with ID: " + endpoint); PinpointClient pinpoint = PinpointClient.builder() .region(Region.US_EAST_1) .build(); lookupPinpointEndpoint(pinpoint, appId, endpoint); pinpoint.close(); } public static void lookupPinpointEndpoint(PinpointClient pinpoint, String appId, String endpoint) { try { GetEndpointRequest appRequest = GetEndpointRequest.builder() .applicationId(appId) .endpointId(endpoint) .build(); GetEndpointResponse result = pinpoint.getEndpoint(appRequest); EndpointResponse endResponse = result.endpointResponse(); // Uses the Google Gson library to pretty print the endpoint JSON. Gson gson = new GsonBuilder() .setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE) .setPrettyPrinting() .create(); String endpointJson = gson.toJson(endResponse); System.out.println(endpointJson); } catch (PinpointException e) { System.err.println(e.awsErrorDetails().errorMessage()); System.exit(1); } System.out.println("Done"); } }

To print the endpoint data in a readable format, this example uses the Google GSON library to convert the EndpointResponse object to a JSON string.

HTTP

You can use Amazon Pinpoint by making HTTP requests directly to the REST API.

Example GET endpoint request

To look up an endpoint, issue a GET request to the Endpoint resource:

GET /v1/apps/application_id/endpoints/endpoint_id HTTP/1.1 Host: pinpoint.us-east-1.amazonaws.com Content-Type: application/json Accept: application/json Cache-Control: no-cache

Where:

  • application-id is the ID of the Amazon Pinpoint project that contains the endpoint.

  • endpoint-id is the ID of the endpoint that you're looking up.

The response to this request is the JSON definition of the endpoint, as in the following example:

{ "ChannelType": "APNS", "Address": "1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1e2f", "EndpointStatus": "ACTIVE", "OptOut": "NONE", "RequestId": "b720cfa8-6924-11e8-aeda-0b22e0b0fa59", "Location": { "Latitude": 47.6, "Longitude": -122.3, "PostalCode": "98121", "City": "Seattle", "Country": "US" }, "Demographic": { "Make": "apple", "Model": "iPhone", "ModelVersion": "8", "Timezone": "America/Los_Angeles", "AppVersion": "1.0", "Platform": "ios", "PlatformVersion": "11.3.1" }, "EffectiveDate": "2018-06-06T00:58:19.865Z", "Attributes": { "Interests": [ "Technology", "Music", "Travel" ] }, "Metrics": { "music_interest_level": 6, "travel_interest_level": 4, "technology_interest_level": 9 }, "User": {}, "ApplicationId": "application_id", "Id": "example_endpoint", "CohortId": "39", "CreationDate": "2018-06-06T00:58:19.865Z" }

You can use Amazon Pinpoint by running commands with the AWS CLI.

Example Get endpoint command

To look up an endpoint, use the get-endpoint command:

$ aws pinpoint get-endpoint \ > --application-id application-id \ > --endpoint-id endpoint-id

Where:

  • application-id is the ID of the Amazon Pinpoint project that contains the endpoint.

  • endpoint-id is the ID of the endpoint that you're looking up.

The response to this command is the JSON definition of the endpoint, as in the following example:

{ "EndpointResponse": { "Address": "1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2v3w4x5y6z7a8b9c0d1e2f", "ApplicationId": "application-id", "Attributes": { "Interests": [ "Technology", "Music", "Travel" ] }, "ChannelType": "APNS", "CohortId": "63", "CreationDate": "2018-05-01T17:31:01.046Z", "Demographic": { "AppVersion": "1.0", "Make": "apple", "Model": "iPhone", "ModelVersion": "8", "Platform": "ios", "PlatformVersion": "11.3.1", "Timezone": "America/Los_Angeles" }, "EffectiveDate": "2018-05-07T19:03:29.963Z", "EndpointStatus": "ACTIVE", "Id": "example_endpoint", "Location": { "City": "Seattle", "Country": "US", "Latitude": 47.6, "Longitude": -122.3, "PostalCode": "98121" }, "Metrics": { "music_interest_level": 6.0, "travel_interest_level": 4.0, "technology_interest_level": 9.0 }, "OptOut": "ALL", "RequestId": "7f546cac-6858-11e8-adcd-2b5a07aab338", "User": { "UserAttributes": { "Gender": "Female", "FirstName": "Wang", "LastName": "Xiulan", "Age": "39" }, "UserId": "example_user" } } }

For more information about the Endpoint resource in the Amazon Pinpoint API, see Endpoint in the Amazon Pinpoint API Reference.

On this page

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.