# List effective teams

Section: PVP statistics

```
GET https://ba.joexyz.online/api/v1/pvp/stats/teams?season=11&role=attack&minimumBattles=10&sort=confidence&exclude=&limit=20&cursor=
```

Lists the most effective attack or defense teams of a season. Results are paginated: follow `pagination.nextCursor` while `pagination.hasMore` is `true`.

**Parameters**

- `season`: The season number.
- `role`: `attack` or `defense`.
- `minimumBattles`: Only teams with at least this many recorded battles. Defaults to 10.
- `sort`: `confidence` (default), `winRateDesc`, `winRateAsc` or `battles`.
- `exclude`: Comma-separated student ids; teams with any of them are left out.
- `limit`: Page size, 1–100. Defaults to 50.
- `cursor`: The `pagination.nextCursor` of the previous page.

## Authentication

None

## Query parameters

| Name | Value |
| --- | --- |
| `season` | `11` |
| `role` | `attack` |
| `minimumBattles` | `10` |
| `sort` | `confidence` |
| `exclude` |  |
| `limit` | `20` |
| `cursor` |  |

## Example responses

### 200 OK

```json
{
  "data": [
    {
      "formationKey": "d5b198487f28cb35",
      "team": [
        {
          "studentId": "hanako_swimsuit"
        },
        {
          "studentId": "kurumi"
        },
        {
          "studentId": "kanoe"
        },
        {
          "studentId": "tsubaki"
        },
        {
          "studentId": "michiru_dress"
        },
        {
          "studentId": "yakumo"
        }
      ],
      "wins": 26,
      "losses": 0,
      "total": 26,
      "successRate": 1,
      "confidenceScore": 0.8712669561953783,
      "confidenceUpper": 1
    }
  ],
  "pagination": {
    "hasMore": true,
    "nextCursor": "…"
  }
}
```

## Examples

### cURL

```bash
curl 'https://ba.joexyz.online/api/v1/pvp/stats/teams?season=11&role=attack&minimumBattles=10&sort=confidence&exclude=&limit=20&cursor='
```

### JavaScript

```javascript
const response = await fetch("https://ba.joexyz.online/api/v1/pvp/stats/teams?season=11&role=attack&minimumBattles=10&sort=confidence&exclude=&limit=20&cursor=");

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://ba.joexyz.online/api/v1/pvp/stats/teams?season=11&role=attack&minimumBattles=10&sort=confidence&exclude=&limit=20&cursor="

response = requests.get(url)
print(response.json())
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
)

func main() {
	req, err := http.NewRequest("GET", "https://ba.joexyz.online/api/v1/pvp/stats/teams?season=11&role=attack&minimumBattles=10&sort=confidence&exclude=&limit=20&cursor=", nil)
	if err != nil {
		panic(err)
	}

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()

	data, _ := io.ReadAll(res.Body)
	fmt.Println(string(data))
}
```
