Get a complete list of views for portfolios you have access. Then, easily use a view ID to see view details or get the request body to quickly query the view.

3104

Resource Overview

AttributeDescriptionExample
share_typeThe share type of the view. String.
Supported values:
-PERSONAL
-FIRM
-TEAM
-PORTAL
-PORTAL_TEAM
PERSONAL
display_nameDefault argument value. Boolean or String.false
parametersReturns a request body for the Portfolio Query API. List of objects. See parameters.[{"key": "time_weighted_return"}]

Get a List of Portfolio Views

Get a complete list of views for portfolios you have access to. Then, use View IDs to quickly see view details or get a portfolio query request body.

GET /v1/portfolio/views

GET  https://examplefirm.addepar.com/api/v1/portfolio/views
200 OK: Success

{
  "data": [
    {
      "id": "19",
      "type": "portfolio_views",
      "attributes": {
        "share_type": "PERSONAL",
        "display_name": "AdvancedTable"
      },
      "links": {
        "self": "/v1/portfolio_views/19"
      }
    },
    {
      "id": "2",
      "type": "portfolio_views",
      "attributes": {
        "share_type": "FIRM",
        "display_name": "owner1"
      },
      "links": {
        "self": "/v1/portfolio_views/2"
      }
    },
    {
      "id": "4",
      "type": "portfolio_views",
      "attributes": {
        "share_type": "PORTAL",
        "display_name": "TOTAL RETURN VIEW"
      },
      "links": {
        "self": "/v1/portfolio_views/4"
      }
    }
  ],
  "included": [],
  "links": {
    "next": null
  }
}

Responses

  • 200 OK: Success
  • 404 Not Found: User lacks API permission or has not granted the appropriate scope

Get a Portfolio View Query Request Body by ID

Returns a complete request body to quickly query on a portfolio view.

GET /v1/portfolio/views/:id

Example:

GET https://examplefirm.addepar.com/v1/portfolio/views/:id
HTTP/1.1 200

{
  "data": {
    "id": "2",
    "type": "portfolio_views",
    "attributes": {
      "share_type": "FIRM",
      "parameters": {
        "columns": [
          {
            "key": "value",
            "arguments": {
              "adjusted": false,
              "time_point": "current",
              "accrued": "all",
              "currency": "USD"
            }
          }
        ],
        "groupings": [
          {
            "key": "ownership"
          },
          {
            "key": "asset_class"
          },
          {
            "key": "security"
          }
        ],
        "filters": [],
        "hide_previous_holdings": false,
        "group_by_historical_values": false,
        "group_by_multiple_attribute_values": false,
        "look_through_composite_securities": false,
        "display_account_fees": false
      },
      "display_name": "owner1"
    },
    "links": {
      "self": "/v1/portfolio_views/2"
    }
  },
  "included": []
}

Responses

  • 200 OK: Success
  • 404 Not Found: User lacks API permission or has not granted the appropriate scope