This article provides an example of how to create API requests compatible with Analysis Workspace. Following this example, you can use Analysis Workspace to make additional requests after seeing how it works.
This example includes the Try it out feature in the Swagger interface. It also includes using the Analysis Workspace debugger tool, which allows you to view the different API requests it makes. This debugger is helpful in understanding report requests and in exploring Analytics 2.0 APIs.
To run a report from Analysis Workspace:
- Log into Analysis Workspace and click the Create New Project button to create a new project.
- Scroll down and select the Products template. Click the Create button.
- Open the browser's developer tools. The following examples show steps for opening Chrome's developer tools:
-
On a Mac: Select View > Developer > Developer Tools.
-
On a PC: Select the menu for more options > More Tools > Developer Tools.
- In the developer tools, click the Console tab and enter
adobe.tools.debug.includeOberonXml = true
into the console. Press Enter and then refresh the page.
- On the Product Performance Grid panel in Analysis Workspace, click the debug icon and then click Freeform Table. A list of numbered requests appears below the Freeform Table option. Click one of the requests.
- In the Analysis Workspace debugger, scroll down to the JSON REQUEST box and copy the text, either manually, or by clicking the Copy to Clipboard button.
- Log into the Analytics 2.0 Swagger interface, expand the
/reports/ranked
endpoint, and then click the Try it out button.
-
Paste the json into the request body box and click Execute.
-
Scroll down to the Response body and verify that the response results match those in the Analysis Workspace debugger. If so, you have successfully used the Analytics 2.0
/reports
API and the Swagger interface.
Note: Before closing Analysis Workspace, you can turn off the debugger by opening your browser developer tools and pasting the following text into the console field: adobe.tools.debug.includeOberonXml = false
. Press Enter and then refresh the page. The debug icons disappear once the debugger is off.