cli
Managing Microsoft Teams With Office 365 CLI Commands
Office 365 CLI is a handy and useful PnP open source project which allows Office 365 administrators to perform administrative tasks on our Office 365 tenant. If you want to get a basic understanding, I would suggest you to go through this link.
https://www.c-sharpcorner.com/article/managing-microsoft-teams-with-office-365-cli-commands/

rest api
team resource type - Microsoft Graph v1.0
Namespace: microsoft.graph A team in Microsoft Teams is a collection of channel objects. A channel represents a topic, and therefore a logical isolation of discussion, within a team. Every team is associated with a group. The group has the same ID as the team - for example, /groups/{id}/team is the same as /teams/{id}.
https://docs.microsoft.com/en-us/graph/api/resources/team?view=graph-rest-1.0


Seonglae Cho