# Get a team (Legacy)

From **GitHub v3 REST API**.

`GET /teams/{team_id}`

**Deprecated.**

**Deprecation Notice:** This endpoint route is deprecated and will be removed from the Teams API. We recommend migrating your existing code to use the [Get a team by name](https://docs.github.com/enterprise-server@3.0/rest/reference/teams#get-a-team-by-name) endpoint.

## Parameters

### `team_id`

- Location: path
- Required: true
- Type: `integer`

## Responses

### `200`

Response

### `application/json`

- Type: `object`

Groups of organization members that gives permissions on specified repositories.

```json
{
  "created_at": "2017-07-14T16:53:42Z",
  "description": "A great team.",
  "html_url": "https://github.com/orgs/github/teams/justice-league",
  "id": 1,
  "ldap_dn": "uid=asdf,ou=users,dc=github,dc=com",
  "members_count": 3,
  "members_url": "https://api.github.com/teams/1/members{/member}",
  "name": "Justice League",
  "node_id": "MDQ6VGVhbTE=",
  "organization": {
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "blog": "https://github.com/blog",
    "company": "GitHub",
    "created_at": "2008-01-14T04:33:35Z",
    "description": "A great organization",
    "email": "octocat@github.com",
    "events_url": "https://api.github.com/orgs/github/events",
    "followers": 20,
    "following": 0,
    "has_organization_projects": true,
    "has_repository_projects": true,
    "hooks_url": "https://api.github.com/orgs/github/hooks",
    "html_url": "https://github.com/octocat",
    "id": 1,
    "issues_url": "https://api.github.com/orgs/github/issues",
    "location": "San Francisco",
    "login": "github",
    "members_url": "https://api.github.com/orgs/github/members{/member}",
    "name": "github",
    "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
    "public_gists": 1,
    "public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
    "public_repos": 2,
    "repos_url": "https://api.github.com/orgs/github/repos",
    "type": "Organization",
    "updated_at": "2017-08-17T12:37:15Z",
    "url": "https://api.github.com/orgs/github"
  },
  "permission": "admin",
  "privacy": "closed",
  "repos_count": 10,
  "repositories_url": "https://api.github.com/teams/1/repos",
  "slug": "justice-league",
  "updated_at": "2017-08-17T12:37:15Z",
  "url": "https://api.github.com/teams/1"
}
```

```json
{"description":"Groups of organization members that gives permissions on specified repositories.","properties":{"created_at":{"example":"2017-07-14T16:53:42Z","format":"date-time","type":"string"},"description":{"example":"A great team.","nullable":true,"type":"string"},"html_url":{"example":"https://github.com/orgs/rails/teams/core","format":"uri","type":"string"},"id":{"description":"Unique identifier of the team","example":42,"type":"integer"},"ldap_dn":{"description":"Distinguished Name (DN) that team maps to within LDAP environment","example":"uid=example,ou=users,dc=github,dc=com","type":"string"},"members_count":{"example":3,"type":"integer"},"members_url":{"example":"https://api.github.com/organizations/1/team/1/members{/member}","type":"string"},"name":{"description":"Name of the team","example":"Developers","type":"string"},"node_id":{"example":"MDQ6VGVhbTE=","type":"string"},"organization":{"$ref":"#/components/schemas/organization-full"},"parent":{"$ref":"#/components/schemas/nullable-team-simple"},"permission":{"description":"Permission that the team will have for its repositories","example":"push","type":"string"},"privacy":{"description":"The level of privacy this team should have","enum":["closed","secret"],"example":"closed","type":"string"},"repos_count":{"example":10,"type":"integer"},"repositories_url":{"example":"https://api.github.com/organizations/1/team/1/repos","format":"uri","type":"string"},"slug":{"example":"justice-league","type":"string"},"updated_at":{"example":"2017-08-17T12:37:15Z","format":"date-time","type":"string"},"url":{"description":"URL for the team","example":"https://api.github.com/organizations/1/team/1","format":"uri","type":"string"}},"required":["id","node_id","url","members_url","name","description","permission","html_url","repositories_url","slug","created_at","updated_at","members_count","repos_count","organization"],"title":"Full Team","type":"object"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/teams/{team_id}
```
