This video walks through how to setup Postman, an API client, to send Adobe Analytics 2.0 API requests. It includes setting up an Adobe I/O integration (NOTE: you need to be a system admin in Experience Cloud to set this up), where to find your global company ID, and more.
Hi this is Jen Lasser with Adobe Analytics product management. In this video, I’m going to show you how to use Postman. Which is an API client to make requests to the Adobe Analytics 2.0 API. The first thing that you want to do when setting up Postman is request an Adobe IO client ID and client secret. So in Adobe IO we’ll go ahead and set up a new integration. So access in API is the option you want to select. And we’ll click continue.
On this screen, we’ll go ahead and select experience cloud Adobe Analytics and then OAuth Integration. Hit continue. On the next screen we can go ahead and hit continue again. And then this is the final screen of setting up the integration. You’ll type in your name, for the integration. Description. Default redirect URI and redirect URI pattern. The redirect URI and redirect URI pattern for Adobe is https www adobe.com and then the redirect URI pattern is just the same thing with the periods escaped. Check the captcha and then go ahead and create integration. I’ve already set up an integration so I’ll just go ahead and click cancel. So I’m going to pull up the integration that I already created. We’ll go ahead and hit view here. You can see it has a trend of how many API calls I’ve made. But the important part on this screen is the client ID and the client secret. These are the two things that you’ll need to type into Postman to set up access to the 2.0 API.
The second thing that you’ll need for setting up Postman is your company ID. To get your company ID, you can go to swagger and run any requests. Down in the response section you’ll see the request URL. This request URL is very helpful for Postman as well, so you can copy that. But a piece of this is the company ID, so mine is AdobePA. So you’ll want to remember that as well as we head into Postman. In Postman, you can set up your first request. To do this, you’ll want to go to authorization, and select type Oauth 2.0. From here, you’ll hit, get new access token. We have a full documentation page that tells you all the different inputs that you need here. So I’ve pre-populated them. Callback URL will be the same thing as the redirect URI that you set up in Adobe IO. The client ID can be copied over from Adobe IO as well as the client secret. So we go ahead and copy the client ID. And we’ll paste that in here. Then we’ll also retrieve our client secret. And we’ll copy that as well. And paste that into the client secret field.
Then you can hit request token after you filled out the rest of the form. The request will take you through the experience cloud login process.
And then it will retrieve an access token that you can use for this session.
So go ahead and click x here. And under available tokens, you will now see the token that we just retrieved. So go ahead and select that.
You can preview requests. Which will set the headers that you need for the request you’re about to make. Over in the header section, that preview request action set up this authorization key with a bearer value.
The other two keys that you want to set up are the x proxy global company ID. This is where we’ll take that value that we got from swagger and paste it in. And then the API key is the client ID that you got from Adobe IO. So we’ll paste that here. Once you have the header set up, you’re all set to run your first request. So you can use swagger to find different types of requests that you can make. The first one that I wanted to demonstrate is just the ability to get a list of your users. The request string looks like this. With your global company ID in it. And then the method that you want to use. And then I’ll limit the request to return 500 rows on a single page. And we’ll go ahead and click send. You’ll see in the body below the response says returned. And you can start to see a list of users that are a part of your company. I want to show you one more method beyond the users method. And that is the reports method in the 2.0 API. To do a reports method, you want to change from get to post. And then you also want to change your URL to reports. For the reports method, you want to enter in some content to the body. If you don’t know how to formulate API 2.0 requests, we’ve put together another video about how to use analysis workspace to build a request for you that you can check out. Once on the body tab, click over to raw, and then change your format to jSON application. From here, you can enter in our API request or paste it in from the value that you got out of analysis workspace. And then go ahead and click send. Sending the request will generate a new body below.
In the body you can see the results of the request that you made. So I made a pages request, I just wanted the top 50 values with visits pulled in. So you can see, it has returned the top pages. Starting with home page, which had 36,000 visits. And then the next page of purchase step one, so on and so forth. This has been a demonstration of setting up Postman to make API 2.0 requests. We covered the users method as well as the reports method which is used in analysis workspace. Hope you guys enjoy exploring the new API 2.0.
For more information, visit the documentation.