asana 0.1.1

asana bindings for rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# \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)