# \PortfoliosApi
All URIs are relative to *https://app.asana.com/api/1.0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_custom_field_setting_for_portfolio**](PortfoliosApi.md#add_custom_field_setting_for_portfolio) | **post** /portfolios/{portfolio_gid}/addCustomFieldSetting | Add a custom field to a portfolio
[**add_item_for_portfolio**](PortfoliosApi.md#add_item_for_portfolio) | **post** /portfolios/{portfolio_gid}/addItem | Add a portfolio item
[**add_members_for_portfolio**](PortfoliosApi.md#add_members_for_portfolio) | **post** /portfolios/{portfolio_gid}/addMembers | Add users to a portfolio
[**create_portfolio**](PortfoliosApi.md#create_portfolio) | **post** /portfolios | Create a portfolio
[**delete_portfolio**](PortfoliosApi.md#delete_portfolio) | **delete** /portfolios/{portfolio_gid} | Delete a portfolio
[**get_items_for_portfolio**](PortfoliosApi.md#get_items_for_portfolio) | **get** /portfolios/{portfolio_gid}/items | Get portfolio items
[**get_portfolio**](PortfoliosApi.md#get_portfolio) | **get** /portfolios/{portfolio_gid} | Get a portfolio
[**get_portfolios**](PortfoliosApi.md#get_portfolios) | **get** /portfolios | Get multiple portfolios
[**remove_custom_field_setting_for_portfolio**](PortfoliosApi.md#remove_custom_field_setting_for_portfolio) | **post** /portfolios/{portfolio_gid}/removeCustomFieldSetting | Remove a custom field from a portfolio
[**remove_item_for_portfolio**](PortfoliosApi.md#remove_item_for_portfolio) | **post** /portfolios/{portfolio_gid}/removeItem | Remove a portfolio item
[**remove_members_for_portfolio**](PortfoliosApi.md#remove_members_for_portfolio) | **post** /portfolios/{portfolio_gid}/removeMembers | Remove users from a portfolio
[**update_portfolio**](PortfoliosApi.md#update_portfolio) | **put** /portfolios/{portfolio_gid} | Update a portfolio
## add_custom_field_setting_for_portfolio
> crate::models::InlineResponse2001 add_custom_field_setting_for_portfolio(portfolio_gid, inline_object11, opt_pretty)
Add a custom field to a portfolio
Custom fields are associated with portfolios by way of custom field settings. This method creates a setting for the portfolio.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**inline_object11** | [**InlineObject11**](InlineObject11.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## add_item_for_portfolio
> crate::models::InlineResponse2001 add_item_for_portfolio(portfolio_gid, inline_object9, opt_pretty, opt_fields)
Add a portfolio item
Add an item to a portfolio. Returns an empty data block.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**inline_object9** | [**InlineObject9**](InlineObject9.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## add_members_for_portfolio
> crate::models::InlineResponse2001 add_members_for_portfolio(portfolio_gid, inline_object13, opt_pretty, opt_fields)
Add users to a portfolio
Adds the specified list of users as members of the portfolio. Returns the updated portfolio record.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**inline_object13** | [**InlineObject13**](InlineObject13.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## create_portfolio
> crate::models::InlineResponse2013 create_portfolio(inline_object7, opt_pretty, opt_fields)
Create a portfolio
Creates a new portfolio in the given workspace with the supplied name. Note that portfolios created in the Asana UI may have some state (like the “Priority” custom field) which is automatically added to the portfolio when it is created. Portfolios created via our API will *not* be created with the same initial state to allow integrations to create their own starting state on a portfolio.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**inline_object7** | [**InlineObject7**](InlineObject7.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2013**](inline_response_201_3.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## delete_portfolio
> crate::models::InlineResponse2001 delete_portfolio(portfolio_gid, opt_pretty, opt_fields)
Delete a portfolio
An existing portfolio can be deleted by making a DELETE request on the URL for that portfolio. Returns an empty data record.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_items_for_portfolio
> crate::models::InlineResponse20011 get_items_for_portfolio(portfolio_gid, opt_pretty, opt_fields, limit, offset)
Get portfolio items
Get a list of the items in compact form in a portfolio.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
**limit** | Option<**i32**> | Results per page. The number of objects to return per page. The value must be between 1 and 100. | |
**offset** | Option<**String**> | 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.' | |
### Return type
[**crate::models::InlineResponse20011**](inline_response_200_11.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_portfolio
> crate::models::InlineResponse2013 get_portfolio(portfolio_gid, opt_pretty, opt_fields)
Get a portfolio
Returns the complete portfolio record for a single portfolio.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2013**](inline_response_201_3.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## get_portfolios
> crate::models::InlineResponse20010 get_portfolios(workspace, owner, opt_pretty, opt_fields, limit, offset)
Get multiple portfolios
Returns a list of the portfolios in compact representation that are owned by the current API user.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace** | **String** | The workspace or organization to filter portfolios on. | [required] |
**owner** | **String** | The user who owns the portfolio. Currently, API users can only get a list of portfolios that they themselves own. | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
**limit** | Option<**i32**> | Results per page. The number of objects to return per page. The value must be between 1 and 100. | |
**offset** | Option<**String**> | 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.' | |
### Return type
[**crate::models::InlineResponse20010**](inline_response_200_10.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## remove_custom_field_setting_for_portfolio
> crate::models::InlineResponse2001 remove_custom_field_setting_for_portfolio(portfolio_gid, inline_object12, opt_pretty)
Remove a custom field from a portfolio
Removes a custom field setting from a portfolio.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**inline_object12** | [**InlineObject12**](InlineObject12.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## remove_item_for_portfolio
> crate::models::InlineResponse2001 remove_item_for_portfolio(portfolio_gid, inline_object10, opt_pretty, opt_fields)
Remove a portfolio item
Remove an item from a portfolio. Returns an empty data block.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**inline_object10** | [**InlineObject10**](InlineObject10.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## remove_members_for_portfolio
> crate::models::InlineResponse2001 remove_members_for_portfolio(portfolio_gid, inline_object14, opt_pretty, opt_fields)
Remove users from a portfolio
Removes the specified list of users from members of the portfolio. Returns the updated portfolio record.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**inline_object14** | [**InlineObject14**](InlineObject14.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2001**](inline_response_200_1.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
## update_portfolio
> crate::models::InlineResponse2013 update_portfolio(portfolio_gid, inline_object8, opt_pretty, opt_fields)
Update a portfolio
An existing portfolio can be updated by making a PUT request on the URL for that portfolio. Only the fields provided in the `data` block will be updated; any unspecified fields will remain unchanged. Returns the complete updated portfolio record.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**portfolio_gid** | **String** | Globally unique identifier for the portfolio. | [required] |
**inline_object8** | [**InlineObject8**](InlineObject8.md) | | [required] |
**opt_pretty** | Option<**bool**> | Provides “pretty” output. Provides the response in a “pretty” format. In the case of JSON this means doing proper line breaking and indentation to make it readable. This will take extra time and increase the response size so it is advisable only to use this during debugging. | |
**opt_fields** | Option<[**Vec<String>**](String.md)> | Defines fields to return. Some requests return *compact* representations of objects in order to conserve resources and complete the request more efficiently. Other times requests return more information than you may need. This option allows you to list the exact set of fields that the API should be sure to return for the objects. The field names should be provided as paths, described below. The id of included objects will always be returned, regardless of the field options. | |
### Return type
[**crate::models::InlineResponse2013**](inline_response_201_3.md)
### Authorization
[oauth2](../README.md#oauth2), [personalAccessToken](../README.md#personalAccessToken)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)