Portfolios

Get multiple portfolios

<b>Required scope: </b><code>portfolios:read</code>

Returns a list of the portfolios in compact representation. The portfolios are filtered based on the following criteria:

  • If the request is made from a regular API user (PAT or OAuth), then only portfolios owned by the current API user are returned.
  • If the request is made from a Service Account without the owner parameter, then all portfolios across the workspace are returned.
  • If the request is made from a Service Account with the owner parameter, then only portfolios owned by the specified user are returned.
get/portfolios

Request

  • Base URL: https://app.asana.com/api/1.0
  • URL: https://app.asana.com/api/1.0/portfolios
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.asana.com/-/oauth_authorize, token URL https://app.asana.com/-/oauth_token, scopes: portfolios:read)

Query parameters

limitinteger

Results per page. The number of objects to return per page. The value must be between 1 and 100.

offsetstring

Offset token. An offset to the next page returned by the API. A pagination request will return an offset token, which can be used as an input parameter to the next request. If an offset is not passed in, the API will return the first page of results. Note: You can only pass in an offset that was returned to you via a previously paginated request.

workspacestring required

The workspace or organization to filter portfolios on.

ownerstring

The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own, unless the request is made from a Service Account. In the case of a Service Account, if this parameter is specified, then all portfolios owned by this parameter are returned. Otherwise, all portfolios across the workspace are returned.

custom_typestring

Filter results by custom type. Provide a custom type GID to return only objects of that custom type (an unknown GID returns 400). Provide an empty string to return only objects with no custom type assigned. If this parameter is omitted, results are not filtered by custom type.

opt_fieldsstring[]

This endpoint returns a resource which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include. Properties can include nested fields. To learn more, see the input/output options guide.

Response

Successfully retrieved portfolios.

Example response

{
  "data": [
    {
      "gid": "12345",
      "resource_type": "portfolio",
      "name": "Bug Portfolio",
      "resource_subtype": "default_portfolio"
    }
  ],
  "next_page": {
    "offset": "eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
    "path": "/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9",
    "uri": "https://app.asana.com/api/1.0/tasks/12345/attachments?limit=2&offset=eyJ0eXAiOJiKV1iQLCJhbGciOiJIUzI1NiJ9"
  }
}

Changes

No recorded changes to this operation across all 2 revisions of this API.