Set up Developer Console and Postman
In this lesson, you will set up a project in the Adobe Developer Console and download Postman collections so you can start using Platform APIs.
In order to complete the API exercises in this tutorial, download the Postman app for your operating system. While not required in order to use Experience Platform APIs, Postman makes API workflows easier, and Adobe Experience Platform provides dozens of Postman collections to help you execute API calls and learn how they operate. The rest of this tutorial assumes some working knowledge of Postman. For assistance, please reference the Postman documentation.
Platform is built API-first. While interface options also exist for all major tasks, you might want to use the Platform API at some point. For example to ingest data, move items around between sandboxes, automate routine tasks or to use new Platform features before the user interface has been built.
Data Architects and Data Engineers may need to use Platform API outside of this tutorial.
Permissions required
In the Configure Permissions lesson, you set up all the access controls required to complete this lesson.
Set up Adobe Developer Console
Adobe Developer Console is the developer destination to access Adobe APIs & SDKs, listen to near real-time Events, run functions on Runtime, or build plugins or App Builder applications. You will use it to access the Experience Platform API. For more details, see the Adobe Developer Console documentation
-
Create a folder on your local machine named
Luma Tutorial Assets
for files used in the tutorial. -
Open the Adobe Developer Console
-
Log in and confirm that you are in the correct Org
-
Select Create New Project in Quick Start menu.
-
In the newly created project, select the Edit Project button
-
Change the Project Title to
Luma Tutorial API Project
(add your name to the end, if multiple people from your company are taking this tutorial) -
Select Save
-
Select Add API
-
Filter the list by selecting Adobe Experience Platform
-
In list of available APIs, select Experience Platform API and select Next.
-
Select OAuth Server-to-Server as the credential and select Next.
-
Select the
AEP-Default-All-Users
product profile and select Save Configured API -
Now your Developer Console project has been created!
-
In the Try it out section of the page, select Download for Postman and then select OAuth Server-to-Server to download the Postman environment json file. Save the
oauth_server_to_server.postman_environment.json
in yourLuma Tutorial Assets
folder.
Have a System Admin add the API Credential to the role
In order to use the API Credential to interact with Experience Platform, you will need to have a System Admin assign the API Credentials to the role created in the previous lesson. If you are not a System Admin, send them:
-
The Name of your API Credential (
Credential in Luma Tutorial API Project
) -
The Technical Account Email of your credential (this will help the System Admin find the credential)
Here are the instructions for the System Admin:
-
Log into Adobe Experience Platform
-
Select Permissions in the left navigation which will take you to the Roles screen
-
Open the
Luma Tutorial Platform
role
-
Select the API Credentials tab
-
Select Add API Credentials
-
Find the
Credential in Luma Tutorial API Project
credential, filtering with the Technical Account Email provided by the tutorial participant, if the list is long -
Select the credential
-
Select Save
Set up Postman
-
Download and install Postman
-
Open Postman and create a workspace
-
Import the downloaded json environment file,
oauth_server_to_server.postman_environment.json
-
In Postman, select your environment in the dropdown
-
Select the icon to view the environment variables:
Add the Sandbox Name and Tenant ID
The SANDBOX_NAME
and TENANT_ID
and CONTAINER_ID
variables are not included in the Adobe Developer Console export, so we add them manually:
-
In Postman, open the Environment Variables
-
Select the Edit link to the right of the environment name
-
In the Add new variable field, enter
SANDBOX_NAME
-
Into both value fields, enter
luma-tutorial
, the name we gave to our sandbox in the previous lesson. If you used a different name for your sandbox, for example, luma-tutorial-ignatiusjreilly, make sure to use that value. -
In the Add new variable field, enter
TENANT_ID
-
Switch to your web browser and look up your company’s tenant id by going to Experience Platform’s interface and extracting the portion of the URL after the @ sign. For example, my tenant id is
techmarketingdemos
but yours is different: -
Copy this value and return to the Postman Manage Environments screen
-
Paste your tenant id into both value fields
-
In the Add new variable field, enter
CONTAINER_ID
-
Enter
global
into both value fieldsnote note NOTE CONTAINER_ID
is a field whose value we change several times during the tutorial. Whenglobal
is used, the API interacts with Adobe-provided elements in your Platform account. Whentenant
is used, the API interacts with your own custom elements. -
Select Save
Make API Calls
Retrieve an access token
Adobe provides a rich set of Postman collections to help you explore Experience Platform’s API. These collections are in the Adobe Experience Platform Postman Samples GitHub repo. You should bookmark this repo as you will use this numerous times throughout this tutorial and later as you implement Experience Platform for your own company.
The first collection works with the Adobe Identity Management Service (IMS) APIs. It is a convenient way to retrieve an acccess token from within Postman.
To generate the access token:
-
Download the Identity Management Service APIs collection to your
Luma Tutorial Assets
folder -
Import the collection into Postman
-
Select the request oAuth: Request Access Token request and select Send
-
You should get a
200 OK
response with an access token in the response -
The access token should be automatically stored as the ACCESS_TOKEN environment variable of your Postman environment.
Interact with a Platform API
Now let’s make a Platform API call to confirm that we’ve configured everything correctly.
Open the Experience Platform Postman collections in GitHub. There are many collections on this page, for various Platform APIs. I strongly recommend bookmarking it.
Now, let’s make our first API call:
- Download the Schema Registry API collection to your
Luma Tutorial Assets
folder - Import it into Postman
- Open Schema Registry API > Schemas > List schemas
- Look at the Params and Headers tabs and note how they include some of the environment variables we entered earlier.
- Note that the Headers > Accept value field is set to
application/vnd.adobe.xed-id+json
. The Schema Registry APIs require one of these specified Accept header values which provide different formats in the response. - Select Send to make your first Platform API call!
Hopefully you got a successful 200 OK
response containing a list of the available Adobe-provided XDM schemas in your sandbox, as pictured below.
If your call was not successful, take a moment to debug using the error response details of the API call and review the steps above. If you get stuck, please request help in the Community Forum or use the link in the right side of this page to “Log an issue”.
With your Platform permissions, sandbox, and Postman set up, you are ready to model data in schemas!