View
The Portfolio Views API executes a saved analysis view and returns the results. Instead of defining columns, groupings, and filters in the request (as with Portfolio Query), you reference a view by ID and the API returns whatever that view is configured to show. This is useful when a view is already set up in the Addepar UI and you want to extract its data programmatically.
Results can be returned as JSON, CSV, TSV, or XLSX.
Overview
| Base route | /v1/portfolio/views/:id/results |
| Method | GET |
| Produces | JSON, CSV, TSV, XLSX |
| Pagination | No |
| OAuth scopes | portfolio_query |
Access requirements
You must have access to both the portfolio being queried and the view being executed.
When to use Portfolio Views vs Portfolio Query
| Scenario | Use |
|---|---|
| Executing a view already configured in the Addepar UI | Portfolio Views |
| Dynamic queries with columns/groupings defined at request time | Portfolio Query |
| Non-JSON output (CSV, TSV, XLSX) from a saved view | Portfolio Views |
| Advanced or pivot table export (XLSX only) | Portfolio Views |
| Programmatic integrations where the query shape changes | Portfolio Query |
Parameters
All parameters are passed as query string arguments.
Required:
| Parameter | Description |
|---|---|
id (path) | View ID. Found in the URL after /views/ in the Addepar UI, or via the "Generate API URL" feature. |
portfolio_id | Entity ID, group ID, or 1 (for firm). |
portfolio_type | Scope. Values: ENTITY, ENTITY_FUNDS, GROUP, GROUP_FUNDS, FIRM, FIRM_ACCOUNTS, FIRM_CLIENTS, FIRM_HOUSEHOLDS, FIRM_UNVERIFIED_ACCOUNTS. |
output_type | Format. Values: JSON, CSV, TSV, XLSX. |
start_date | Period start. Format: YYYY-MM-DD. |
end_date | Period end. Format: YYYY-MM-DD. |
Finding the view ID
You can find a view's ID in two ways:
- From the URL: Navigate to the view in Analysis. The ID is the number after
/views/in the browser URL. - Generate API URL: In Analysis, click Export (top right) > Generate API URL > Copy Link. The URL contains all required parameters pre-filled.
Get view results (JSON)
JSON returns a hierarchical tree identical in structure to Portfolio Query responses: a total node with children grouped by the view's configured groupings.
GET /v1/portfolio/views/:id/results
curl -X GET "https://{firm}.addepar.com/api/v1/portfolio/views/1/results?portfolio_id=10&portfolio_type=ENTITY&output_type=JSON&start_date=2024-01-01&end_date=2024-06-30" \
-H "Authorization: Basic {credentials}" \
-H "Addepar-Firm: 1" \
-H "Accept: application/vnd.api+json"
{
"meta": {
"columns": [
{ "key": "value", "display_name": "Value (USD)", "output_type": "Number", "currency": "USD" }
],
"groupings": [
{ "key": "holding_account", "display_name": "Holding Account" },
{ "key": "position", "display_name": "Position" }
]
},
"data": {
"type": "portfolio_views",
"attributes": {
"total": {
"name": "Total",
"columns": { "value": 1.037535456E7 },
"children": [
{
"name": "Directly Owned",
"grouping": "holding_account",
"columns": { "value": 1.037535456E7 },
"children": [
{
"name": "GS Liquidity Partners 2007 LP",
"grouping": "position",
"columns": { "value": 8629166.56 },
"children": []
}
]
}
]
}
}
},
"included": []
}
If the view has no groupings, the response contains only the total node with no children.
JSON restrictions: Advanced and Pivot tables are not supported.
Get view results (CSV, TSV, XLSX)
File-format exports return the view data as a downloadable file.
curl -X GET "https://{firm}.addepar.com/api/v1/portfolio/views/1/results?portfolio_id=10&portfolio_type=ENTITY&output_type=CSV&start_date=2024-01-01&end_date=2024-06-30" \
-H "Authorization: Basic {credentials}" \
-H "Addepar-Firm: 1"
The response includes a Content-Disposition header with the filename.
XLSX supports Advanced and Pivot table formats.
CSV and TSV behavior:
- Only the lowest-level grouping data is included. Higher-level groupings and rollup values are omitted.
- Entity columns (Security, Direct Owner) include an additional
[Entity Name] [Entity ID]column. - Position columns include an additional Position ID column.
- Percentages are decimals (e.g.,
0.05for 5%). - Booleans are
"true"/"false". - UTF-8 BOM is prepended for encoding compatibility.
- Numerical formatting ($, K, M) is stripped; raw values up to 10 decimal places.
CSV and TSV restrictions:
- Advanced and Pivot tables are not supported.
- Benchmarks cannot appear at the grouping level.
- Holding Account, Ownership Structure, and Legal Entity attributes cannot be the lowest-level grouping.
Response codes
| Code | Meaning |
|---|---|
200 OK | Results returned |
400 Bad Request | Invalid parameters, unsupported view type, or market data attribute requiring additional license |
403 Forbidden | Insufficient permissions or scope |
404 Not Found | View does not exist or is not accessible |
Related
- Portfolio Query -- Dynamic queries without a saved view
- Portfolio Query Builder -- Convert a view into a Portfolio Query request
- Positions -- The ownership data views aggregate
- Rate Limiting -- View execution is computationally expensive
Updated 4 days ago