---
name: aprimo-pm-reporting-api-quickstart
description: Quick-start guide for the Aprimo Reporting API — pulling real-time data from Aprimo Productivity Management (PM/MPM) reports for integration with tools like Power BI and Crystal Reports. Use when developers need to enable Web Service Access on a report, build the request URL and parameters, choose between Basic Auth and OAuth 2.0, or troubleshoot Reporting API errors.
---

# Aprimo PM Reporting API – Quick Start

Get your first report call working in a few minutes, then dive deeper into the full documentation.

:::important
The Reporting API pulls data from **Aprimo Productivity Management (PM/MPM) reports** — it's a different thing from the **Analytics API** (which is DAM-only, pre-aggregated content engagement data via a fixed query schema). There's also **Report Distribution** (scheduled exports to SFTP) as an alternative for bulk/batch use cases. If asked about DAM engagement metrics, reach for the `aprimo-dam-analytics-api-quickstart` skill instead.
:::

## What This API Is For

The Reporting API retrieves **real-time data from an existing MPM report** that has Web Service Access enabled — it does not let you define new queries or reports from scratch. Every report is its own endpoint, with its own report ID, its own set of prompt parameters (if any), and its own field names in the response — there's no universal schema like the Analytics API's Facts/Dimensions. If you don't know the report ID or its parameters, you need someone with access to the report in Aprimo to tell you (or pull them from the report's `.xsd`/Parameters tab).

## 60-Second Setup

### 1. Enable Web Service Access on the Report

This is done **per report**, inside Aprimo, by a user with the **"Analysis, Web Service Access Administration"** domain right — not via the API:

1. Open the report and go to its **Web Service Access** tab.
2. Set **"Allow External Web Service Access?"** to one of:
   - **Yes – Basic Authentication**
   - **Yes – OAuth 2 Authentication**
   (Default is **No** — reports are not exposed until this is set.)
3. Save the page.

### 2. Get Credentials

**If Basic Authentication:** saving the page generates a **Web Service Authentication Token** in that same field. This token is generated **once per report** — toggling the setting off and back on reuses the same token, it doesn't rotate it.

**If OAuth 2 Authentication:** use the same Client Credentials flow as the rest of the Aprimo REST API (see the `aprimo-pm-api-quickstart` skill, or the steps below) to get a Bearer token.

### 3. Make Your First Call

```bash
# Basic Auth — username is the report ID, password is the Web Service Authentication Token
curl -u '515:YOUR_WEB_SERVICE_TOKEN' \
  'https://<your-tenant>.aprimo.com/WebApi/api/Reports/515.json/'
```

```bash
# OAuth 2 — same Bearer token used across the rest of the Aprimo REST API
curl -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  'https://<your-tenant>.aprimo.com/WebApi/api/Reports/515.json/'
```

Both return the report's data as JSON (the default format when `.json` — or no type at all — is used).

---

## Code Examples by Language

These use OAuth 2.0, since it's shared with the rest of the Aprimo REST API. See [Essential Concepts → Authentication](#authentication) for the Basic Auth header variant — it's a one-line change.

### Python

```python
import requests
from requests.auth import HTTPBasicAuth

tenant = "your-tenant"

# --- OAuth 2.0 variant ---
client_id = "YOUR_CLIENT_ID"
client_secret = "YOUR_CLIENT_SECRET"

token_response = requests.post(
    f"https://{tenant}.aprimo.com/login/connect/token",
    data={
        "grant_type": "client_credentials",
        "scope": "api",
        "client_id": client_id,
        "client_secret": client_secret,
    },
)
access_token = token_response.json()["access_token"]

report_id = 515
response = requests.get(
    f"https://{tenant}.aprimo.com/WebApi/api/Reports/{report_id}.json/",
    headers={"Authorization": f"Bearer {access_token}"},
    params={"Task Status": "In Process"},  # report-specific prompt parameter
)
print(response.status_code, response.json())

# --- Basic Auth variant (skip the token request above) ---
response = requests.get(
    f"https://{tenant}.aprimo.com/WebApi/api/Reports/{report_id}.json/",
    auth=HTTPBasicAuth(str(report_id), "YOUR_WEB_SERVICE_TOKEN"),
    params={"Task Status": "In Process"},
)
```

### JavaScript / TypeScript

```javascript
const tenant = "your-tenant";
const reportId = 515;

// --- OAuth 2.0 variant ---
async function getAccessToken(clientId, clientSecret) {
  const params = new URLSearchParams({
    grant_type: "client_credentials",
    scope: "api",
    client_id: clientId,
    client_secret: clientSecret,
  });
  const response = await fetch(`https://${tenant}.aprimo.com/login/connect/token`, {
    method: "POST",
    body: params,
  });
  return (await response.json()).access_token;
}

async function getReportOAuth(accessToken) {
  const url = `https://${tenant}.aprimo.com/WebApi/api/Reports/${reportId}.json/?${new URLSearchParams({
    "Task Status": "In Process",
  })}`;
  const response = await fetch(url, {
    headers: { Authorization: `Bearer ${accessToken}` },
  });
  return response.json();
}

// --- Basic Auth variant ---
async function getReportBasicAuth(webServiceToken) {
  const url = `https://${tenant}.aprimo.com/WebApi/api/Reports/${reportId}.json/?${new URLSearchParams({
    "Task Status": "In Process",
  })}`;
  const response = await fetch(url, {
    headers: { Authorization: `Basic ${btoa(`${reportId}:${webServiceToken}`)}` },
  });
  return response.json();
}
```

### C#

```csharp
using System;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

class AprimoReportingClient
{
    private string _tenant = "your-tenant";
    private HttpClient _httpClient = new HttpClient();

    // --- OAuth 2.0 variant ---
    async Task<string> GetAccessToken(string clientId, string clientSecret)
    {
        var tokenUrl = $"https://{_tenant}.aprimo.com/login/connect/token";
        var content = new FormUrlEncodedContent(new[]
        {
            new KeyValuePair<string, string>("grant_type", "client_credentials"),
            new KeyValuePair<string, string>("scope", "api"),
            new KeyValuePair<string, string>("client_id", clientId),
            new KeyValuePair<string, string>("client_secret", clientSecret)
        });
        var response = await _httpClient.PostAsync(tokenUrl, content);
        dynamic data = JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync());
        return data.access_token;
    }

    async Task<string> GetReportOAuth(int reportId, string accessToken)
    {
        var url = $"https://{_tenant}.aprimo.com/WebApi/api/Reports/{reportId}.json/?Task%20Status=In%20Process";
        var request = new HttpRequestMessage(HttpMethod.Get, url);
        request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", accessToken);
        var response = await _httpClient.SendAsync(request);
        return await response.Content.ReadAsStringAsync();
    }

    // --- Basic Auth variant ---
    async Task<string> GetReportBasicAuth(int reportId, string webServiceToken)
    {
        var url = $"https://{_tenant}.aprimo.com/WebApi/api/Reports/{reportId}.json/?Task%20Status=In%20Process";
        var request = new HttpRequestMessage(HttpMethod.Get, url);
        var basicToken = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{reportId}:{webServiceToken}"));
        request.Headers.Authorization = new AuthenticationHeaderValue("Basic", basicToken);
        var response = await _httpClient.SendAsync(request);
        return await response.Content.ReadAsStringAsync();
    }
}
```

---

## Essential Concepts

### URL Format

```
https://<customer_name>.aprimo.com/WebApi/api/Reports/<report_id>.<type>/
```

- `<customer_name>` — your Aprimo tenant subdomain.
- `<report_id>` — the numeric ID of the report (found in Aprimo, on the report itself).
- `<type>` — `xsd`, `xml`, `json`, or `pdf`. **Omit it (and the `.`) entirely to default to JSON.**
- The `.` before `<type>` and the trailing `/` after it are both required when `<type>` is present.

### Authentication

Set per report (see 60-Second Setup). Two independent options — a report is configured for one or the other, not both:

| | Basic Auth | OAuth 2.0 |
|---|---|---|
| Header | `Authorization: Basic base64(report_id:token)` | `Authorization: Bearer access_token` |
| Credential source | The report's own **Web Service Authentication Token** (Web Service Access tab) | Standard Aprimo Client Credentials / other OAuth 2.0 flow — shared across the whole REST API |
| Scope | Only unlocks *this* report | Whatever the token's user/client normally has access to |

### Report Parameters

Only relevant if the report has user prompts. Get exact parameter names from the **Attribute** value on the report's **Parameters** tab — not the label shown in the UI.

- **Single value**: `?Task Status=Open&MyProjectEA=100&Begin_Date=01/01/2016`
- **List value** (multiple values for the same parameter — repeat the parameter): `?Begin Date=01/01/2016&Begin Date=02/02/2016&Task Status=Open&Task Status=Closed`
  - If the same parameter name exists on more than one object in the report, prefix it: `?Activity.Begin Date=01/01/2016&Task.Begin Date=03/03/2016`
- **Range value**: `<Range Name>=<Start>;<End>` — semicolon-separated, e.g. `?Begin Date=01/01/2016;01/01/2017&End Date=06/01/2016;12/31/2017`
- Values must match what the report expects (dates as `MM/DD/YYYY`, picklists as the exact display text, e.g. `"In Process"`).
- Extra parameters the report doesn't use are silently ignored.
- **Always URL-encode** — spaces in parameter names (`Task Status`) and values are common and must be encoded (`Task%20Status`). Query-string builders (`URLSearchParams`, `requests`' `params=`) handle this for you; don't hand-roll the string.

### Response Formats

| Type | Use for |
|---|---|
| `xsd` | The report's schema — element/field names and types, no data. Good for discovering field names before you build a JSON/XML consumer. |
| `xml` | Structured data as XML — `<ReportDetails><Row>...</Row></ReportDetails>`. |
| `json` (default) | Structured data as JSON — `{"ReportDetails": {"title": ..., "Rows": [...]}}`. |
| `pdf` | The report rendered exactly as it appears in the Aprimo UI. |

### Status Codes

| Code | Meaning |
|---|---|
| 200 | Success. |
| 206 | Partial content — the report exceeded the **"Report Result Record Limit"** system setting. The `Content-Range` header shows what was returned, e.g. `0-9999/12001`. The API doesn't document a way to page past this from the client side — if you consistently need more, that system parameter needs to be raised by an admin. |
| 400 | Bad request — often a missing required report parameter; the response names the missing parameter. |
| 401 | Unauthorized — commonly "Web Service Access is not allowed for this report" (not enabled, or wrong credential type for how it's configured). |
| 403 | Forbidden — URL not accessible with the provided credentials. |
| 404 | Report not found for that report ID. |
| 500 | Internal server error. |

### Best Practices

- Reports should complete in **under 5 minutes**; a report that regularly exceeds that needs optimization on the Aprimo side (parameters, filters, or the report design itself) — treat consistent timeouts as a report-design problem, not a client retry problem.
- **Don't call the same MPM object concurrently.** Overlapping calls against the same object can produce errors like `ExecuteNonQuery requires an open and available Connection. The connection's current state is open.` — serialize calls to the same report/object rather than firing them in parallel.

---

## Rate Limiting

Aprimo's REST APIs enforce a **burst-based rate limit**. Each environment has a sustained
rate measured in requests per second, plus a burst buffer that absorbs short spikes. A
typical configuration is **15 requests per second with a burst buffer of 100 requests**,
but the exact figures are per-environment — confirm yours with your Aprimo Account
Executive, who can also discuss an increase.

Two properties of this model catch integrations out:

- **The budget is per environment, not per integration or per user.** Every application,
  script, and scheduled job pointed at the same tenant draws on the same allowance, so a
  bulk job can starve an interactive app running alongside it.
- **Excess requests are rejected, not queued.** Once both the sustained rate and the burst
  buffer are exhausted, further requests return `429 Too Many Requests` immediately. You
  get fast feedback rather than a silent delay, but your client has to handle it.

**Writing a well-behaved client:**

- **Retry a `429` with exponential backoff** — wait 1s, then 2s, 4s, 8s, and add a little
  random jitter so parallel workers don't all retry on the same beat.
- **Space out polling.** When waiting on a long-running operation, use progressive waits
  (1s, 3s, 5s…) rather than a tight loop.
- **Reuse access tokens** until they expire instead of requesting a fresh one per call.
- **Cache reference data** that rarely changes, and refresh it periodically.
- **Spread scheduled work out** rather than firing every request at the top of the hour.
- **Log every `429`** alongside the endpoint that caused it — the pattern usually points at
  a single hot loop.
- **Serialize calls against the same report.** This is separate from the rate limit —
  see the concurrency note under Essential Concepts — but it compounds with it: parallel
  calls both risk connection errors and burn the shared request budget faster.

---

## Common Tasks

### Get a report's schema before consuming it

```bash
curl -H 'Authorization: Bearer YOUR_TOKEN' \
  'https://<tenant>.aprimo.com/WebApi/api/Reports/515.xsd/'
```

### Get JSON data with a date range and a picklist filter

```bash
curl -G -H 'Authorization: Bearer YOUR_TOKEN' \
  'https://<tenant>.aprimo.com/WebApi/api/Reports/515.json/' \
  --data-urlencode 'Begin Date=01/01/2016;02/20/2017' \
  --data-urlencode 'Task Status=In Process'
```

### Get the report as a PDF

```bash
curl -H 'Authorization: Bearer YOUR_TOKEN' \
  'https://<tenant>.aprimo.com/WebApi/api/Reports/515.pdf/' \
  -o report.pdf
```

### Submit a list-value parameter (multiple statuses)

```bash
curl -G -H 'Authorization: Bearer YOUR_TOKEN' \
  'https://<tenant>.aprimo.com/WebApi/api/Reports/515.json/' \
  --data-urlencode 'Task Status=Open' \
  --data-urlencode 'Task Status=Closed'
```

### Submit a parameter shared by two objects in the report

```bash
curl -G -H 'Authorization: Bearer YOUR_TOKEN' \
  'https://<tenant>.aprimo.com/WebApi/api/Reports/515.json/' \
  --data-urlencode 'Activity.Begin Date=01/01/2016' \
  --data-urlencode 'Task.Begin Date=03/03/2016'
```

---

## Troubleshooting

### 401 Unauthorized
- Check the **Web Service Access** tab on the report — it must be set to **Yes**, and to the **same auth type** you're using (Basic vs. OAuth 2). Sending an OAuth Bearer token to a report configured for Basic Auth (or vice versa) also surfaces as 401.
- For Basic Auth, confirm the username is the **report ID** (not a login name) and the password is the report's **Web Service Authentication Token**, not an Aprimo user password.
- For OAuth 2, confirm the token hasn't expired.

### 404 Not Found
- The report ID is wrong, or the report doesn't exist in this tenant — error responses typically say `No report was found with ID = <id>`.

### 400 Bad Request
- A required report parameter is missing — the error response names it. Add it, using the exact **Attribute** name from the report's Parameters tab (not the display label).

### 206 Partial Content
- The report returned more rows than the **"Report Result Record Limit"** allows. Check the `Content-Range` header to see what you got. Narrow the request with parameters if possible; otherwise this needs an Aprimo admin to raise the system limit — there's no client-side paging parameter for this endpoint.

### Timeouts or "ExecuteNonQuery requires an open and available Connection" errors
- You're very likely making concurrent calls against the same report/object. Serialize the calls instead of running them in parallel.
- If a single call is slow even in isolation, the report itself likely needs optimization — this isn't something a client-side retry fixes.

### 429 Too Many Requests
- You've exhausted the environment's sustained rate and its burst buffer.
- Back off exponentially (1s, 2s, 4s…) with jitter, then retry — the request was rejected
  outright, not queued.
- Remember the budget is shared tenant-wide: another integration may be the real cause.
- See the Rate Limiting section above.

---

## Support & Next Steps

1. **Test your setup:** Confirm Web Service Access is enabled on a report you can see in Aprimo, then fetch its `.xsd` to see the field names before pulling real data.
2. **Pick your language and auth method:** Use the code examples above as a starting point.
3. **Explore the API:** Ask Claude questions like:
   - "Build a query for report 515 filtered to a date range and two task statuses."
   - "What's the difference between the list-value and range-value parameter syntax?"
   - "Why would I get a 206 instead of a 200?"
4. **Build & integrate:** For scheduled bulk exports instead of real-time pulls, consider **Report Distribution** (SFTP-based) instead of this API.

### Static Documentation

The full Aprimo developer documentation is available at **https://developers.aprimo.com**.

**For AI/Claude:** The site uses dynamic rendering. To fetch static, AI-readable versions:

1. **Browse available docs:** https://developers.aprimo.com/llms.txt
2. **Fetch specific articles as plaintext:**
   - Authentication details: `https://developers.aprimo.com/doc-content/docs/OAuth2.txt`
   - Full Reporting API reference: `https://developers.aprimo.com/doc-content/docs/reporting/reporting-api.txt`
   - External reporting tools overview (Power BI, Crystal Reports, Report Distribution): `https://developers.aprimo.com/doc-content/docs/reporting/reporting-intro.txt`
   - Rate limiting: `https://developers.aprimo.com/doc-content/docs/rate-limiting.txt`

### Going Further: help.aprimo.com

Aprimo also publishes a product help site, **help.aprimo.com**, covering UI, configuration, and admin behavior that the REST API docs don't — reach for it when a question is about what a feature *is* or how it behaves on-screen, not about API syntax.

It requires an authenticated session, and there's no API key or service account for it — access rides on the user being logged into an Aprimo instance in the same browser. If your agent has browser tooling available:

1. **Ask the user to log in.** Have them sign in to their Aprimo instance in that browser, then load help.aprimo.com in the same session. Don't attempt to authenticate yourself and never ask for credentials.
2. **Search instead of guessing paths.** The site is built on MadCap Flare, so guessed URLs mostly 404. Use `https://help.aprimo.com/?q=<terms>` to find exact topic paths, then open the results from there.
3. **If you can run JavaScript in that browser**, fetching `/Content/<path>` with `credentials: 'include'` and reading the parsed body text is faster than clicking through topic by topic — topic bodies render into an iframe that plain text extraction can miss.

If access fails, tell the user plainly that the session is missing and ask them to log in again, rather than retrying the same request.

---

**Ready to build?** Start with the examples above, ask Claude questions as you build, and refer to the full documentation at developers.aprimo.com for advanced patterns and reference.
