- 2 Minutes to read
- Print
- DarkLight
API: listTeams
- 2 Minutes to read
- Print
- DarkLight
- Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.).
- If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English.
- Tags are required unless specified.
Description
The listTeams method retrieves teams that meet the specified filters.
Who Has Access
- Users with the Manage Teams or View Teams account permission.
- Administrators and owners.
API Call XML Package
<SmarterU>
<AccountAPI><![CDATA[]]></AccountAPI>
<UserAPI><![CDATA[]]></UserAPI>
<Method>listTeams</Method>
<Parameters>
<Team>
<Page><![CDATA[]]></Page>
<Filters>
<TeamStatus><![CDATA[]]></TeamStatus>
<CreatedDate>
<CreatedDateFrom></CreatedDateFrom>
<CreatedDateTo></CreatedDateTo>
</CreatedDate>
<ModifiedDate>
<ModifiedDateFrom></ModifiedDateFrom>
<ModifiedDateTo></ModifiedDateTo>
</ModifiedDate>
</Filters>
</Team>
</Parameters>
</SmarterU>
Team Tag Group
The Team tag may group is a container for how the response is returned and the team filters.
<Team>
<Page><![CDATA[]]></Page>
<Filters>
<TeamStatus><![CDATA[]]></TeamStatus>
<CreatedDate>
<CreatedDateFrom></CreatedDateFrom>
<CreatedDateTo></CreatedDateTo>
</CreatedDate>
<ModifiedDate>
<ModifiedDateFrom></ModifiedDateFrom>
<ModifiedDateTo></ModifiedDateTo>
</ModifiedDate>
</Filters>
</Team>
Page (optional)
The page number to get. The default is 1.
Filters (optional)
A container for the team filters. Refer to Filters Tag Group.
Filters Tag Group
The Filters tag group is a container for team filters.
<Filters>
<TeamStatus><![CDATA[]]></TeamStatus>
<CreatedDate>
<CreatedDateFrom></CreatedDateFrom>
<CreatedDateTo></CreatedDateTo>
</CreatedDate>
<ModifiedDate>
<ModifiedDateFrom></ModifiedDateFrom>
<ModifiedDateTo></ModifiedDateTo>
</ModifiedDate>
</Filters>
The Filters tag may contain the following.
TeamStatus
The team's status. Acceptable values are Active, Inactive, or All.
CreatedDate
A container for filtering teams based on the UTC date it was created. This tag contains the following.
Tag | Description |
---|---|
CreatedDateFrom | The first date to include in the team's created date range filter in UTC format. |
CreatedDateTo | The last date to include in the team's created date range filter in UTC format. |
ModifiedDate
A container for filtering the teams based on the UTC date it was last modified. This tag contains the following.
Tag | Description |
---|---|
ModifiedDateFrom | The first date to include in the team's modified date range filter in UTC format. |
ModifiedDateTo | The last date to include in the team's modified date range filter in UTC format. |
API Response XML Package
The API response XML package will always include a Result, Info, and Errors tag.
<SmarterU>
<Result></Result>
<Info>
<Teams>
<Team>
<ID><![CDATA[]]></ID>
<Name><![CDATA[]]></Name>
<Status><![CDATA[]]></Status>
<CreatedDate><![CDATA[]]></CreatedDate>
<ModifiedDate><![CDATA[]]></ModifiedDate>
</Team>
</Teams>
</Info>
<Errors>
<Error>
<ErrorID></ErrorID>
<ErrorMessage></ErrorMessage>
</Error>
</Errors>
</SmarterU>
The Teams tag is a container for the teams returned by the listTeams method. Each team is contained in a Team tag and may contain the following.
ID
The team's system-generated identifier.
Name
The team's name.
Status
The team's status.
CreatedDate
The date the team was created.
ModifiedDate
The date the team was last updated.
Example API Response XML Package
Below is an example of an API response XML package.
<SmarterU>
<Result></Result>
<Info>
<Teams>
<Team>
<ID><![CDATA[694]]></ID>
<Name><![CDATA[Leadership]]></Name>
<Status><![CDATA[Active]]></Status>
<CreatedDate><![CDATA[2013-10-23 19:26:47.43]]></CreatedDate>
<ModifiedDate><![CDATA[2013-10-23 19:26:47.43]]></ModifiedDate>
</Team>
<Team>
<ID><![CDATA[696]]></ID>
<Name><![CDATA[Shipping]]></Name>
<Status><![CDATA[Active]]></Status>
<CreatedDate><![CDATA[2016-12-10 10:04:00.42]]></CreatedDate>
<ModifiedDate><![CDATA[2020-10-14 13:50:27.43]]></ModifiedDate>
</Team>
</Teams>
</Info>
</SmarterU>
Error Codes
Error Code | Message |
---|---|
LT:01 | The page number provided is not valid. |
LT:02 | The team status provided is invalid. |
LT:03 | The required permissions are not met to call the listTeams method. |
LT:04 | The created date provided is not valid. |
LT:05 | The modified date provided is not valid. |