# \TeamsApi
All URIs are relative to *https://app.asana.com/api/1.0*
Method | HTTP request | Description
------------- | ------------- | -------------
[**add_user_for_team**](TeamsApi.md#add_user_for_team) | **post** /teams/{team_gid}/addUser | Add a user to a team
[**create_team**](TeamsApi.md#create_team) | **post** /teams | Create a team
[**get_team**](TeamsApi.md#get_team) | **get** /teams/{team_gid} | Get a team
[**get_teams_for_organization**](TeamsApi.md#get_teams_for_organization) | **get** /organizations/{workspace_gid}/teams | Get teams in an organization
[**get_teams_for_user**](TeamsApi.md#get_teams_for_user) | **get** /users/{user_gid}/teams | Get teams for a user
[**remove_user_for_team**](TeamsApi.md#remove_user_for_team) | **post** /teams/{team_gid}/removeUser | Remove a user from a team
## add_user_for_team
> crate::models::InlineResponse20028 add_user_for_team(team_gid, inline_object51, opt_pretty, opt_fields)
Add a user to a team
The user making this call must be a member of the team in order to add others. The user being added must exist in the same organization as the team.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**team_gid** | **String** | Globally unique identifier for the team. | [required] |
**inline_object51** | [**InlineObject51**](InlineObject51.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::InlineResponse20028**](inline_response_200_28.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_team
> crate::models::InlineResponse2017 create_team(inline_object50, opt_pretty, opt_fields, limit, offset)
Create a team
Creates a team within the current workspace.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**inline_object50** | [**InlineObject50**](InlineObject50.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. | |
**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::InlineResponse2017**](inline_response_201_7.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)
## get_team
> crate::models::InlineResponse2017 get_team(team_gid, opt_pretty, opt_fields, limit, offset)
Get a team
Returns the full record for a single team.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**team_gid** | **String** | Globally unique identifier for the team. | [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::InlineResponse2017**](inline_response_201_7.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_teams_for_organization
> crate::models::InlineResponse20027 get_teams_for_organization(workspace_gid, opt_pretty, opt_fields, limit, offset)
Get teams in an organization
Returns the compact records for all teams in the organization visible to the authorized user.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**workspace_gid** | **String** | Globally unique identifier for the workspace or organization. | [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::InlineResponse20027**](inline_response_200_27.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_teams_for_user
> crate::models::InlineResponse20027 get_teams_for_user(user_gid, organization, opt_pretty, opt_fields, limit, offset)
Get teams for a user
Returns the compact records for all teams to which the given user is assigned.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**user_gid** | **String** | A string identifying a user. This can either be the string \"me\", an email, or the gid of a user. | [required] |
**organization** | **String** | The workspace or organization to filter teams on. | [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::InlineResponse20027**](inline_response_200_27.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_user_for_team
> crate::models::InlineResponse2001 remove_user_for_team(team_gid, inline_object52, opt_pretty, opt_fields)
Remove a user from a team
The user making this call must be a member of the team in order to remove themselves or others.
### Parameters
Name | Type | Description | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**team_gid** | **String** | Globally unique identifier for the team. | [required] |
**inline_object52** | [**InlineObject52**](InlineObject52.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)