---
title: List team connections
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: Docs > API Reference > Teams
---

# List team connections{% #list-team-connections %}
Copy pageCopied
{% tab title="v2" %}

| Datadog site      | API endpoint                                              |
| ----------------- | --------------------------------------------------------- |
| ap1.datadoghq.com | GET https://api.ap1.datadoghq.com/api/v2/team/connections |
| ap2.datadoghq.com | GET https://api.ap2.datadoghq.com/api/v2/team/connections |
| app.datadoghq.eu  | GET https://api.datadoghq.eu/api/v2/team/connections      |
| app.ddog-gov.com  | GET https://api.ddog-gov.com/api/v2/team/connections      |
| us2.ddog-gov.com  | GET https://api.us2.ddog-gov.com/api/v2/team/connections  |
| app.datadoghq.com | GET https://api.datadoghq.com/api/v2/team/connections     |
| us3.datadoghq.com | GET https://api.us3.datadoghq.com/api/v2/team/connections |
| us5.datadoghq.com | GET https://api.us5.datadoghq.com/api/v2/team/connections |

### Overview

Returns all team connections. This endpoint requires the `teams_read` permission.

OAuth apps require the `teams_read` authorization [scope](https://docs.datadoghq.com/api/latest/scopes.md#teams) to access this endpoint.



### Arguments

#### Query Strings

| Name                       | Type    | Description                                                          |
| -------------------------- | ------- | -------------------------------------------------------------------- |
| page[size]                 | integer | Size for a given page. The maximum allowed value is 100.             |
| page[number]               | integer | Specific page number to return.                                      |
| filter[sources]            | array   | Filter team connections by external source systems.                  |
| filter[team_ids]           | array   | Filter team connections by Datadog team IDs.                         |
| filter[connected_team_ids] | array   | Filter team connections by connected team IDs from external systems. |
| filter[connection_ids]     | array   | Filter team connections by connection IDs.                           |

### Response

{% tab title="200" %}
OK
{% tab title="Model" %}
Response containing information about multiple team connections.

| Parent field   | Field                  | Type     | Description                                                                 |
| -------------- | ---------------------- | -------- | --------------------------------------------------------------------------- |
|                | data                   | [object] | Array of team connections.                                                  |
| data           | attributes             | object   | Attributes of the team connection.                                          |
| attributes     | managed_by             | string   | The entity that manages this team connection.                               |
| attributes     | source                 | string   | The name of the external source.                                            |
| data           | id [*required*]   | string   | The unique identifier of the team connection.                               |
| data           | relationships          | object   | Relationships of the team connection.                                       |
| relationships  | connected_team         | object   | Reference to a team from an external system.                                |
| connected_team | data                   | object   | Reference to connected external team.                                       |
| data           | id [*required*]   | string   | The connected team ID as it is referenced throughout the Datadog ecosystem. |
| data           | type [*required*] | enum     | External team resource type. Allowed enum values: `github_team`             |
| relationships  | team                   | object   | Reference to a Datadog team.                                                |
| team           | data                   | object   | Reference to a Datadog team.                                                |
| data           | id [*required*]   | string   | The Datadog team ID.                                                        |
| data           | type [*required*] | enum     | Datadog team resource type. Allowed enum values: `team`                     |
| data           | type [*required*] | enum     | Team connection resource type. Allowed enum values: `team_connection`       |
|                | meta                   | object   | Connections response metadata.                                              |
| meta           | page                   | object   | Page-based pagination metadata.                                             |
| page           | first_number           | int64    | The first page number.                                                      |
| page           | last_number            | int64    | The last page number.                                                       |
| page           | next_number            | int64    | The next page number.                                                       |
| page           | number                 | int64    | The current page number.                                                    |
| page           | prev_number            | int64    | The previous page number.                                                   |
| page           | size                   | int64    | The page size.                                                              |
| page           | total                  | int64    | Total connections matching request.                                         |
| page           | type                   | string   | Pagination type.                                                            |

{% /tab %}

{% tab title="Example" %}

```json
{
  "data": [
    {
      "attributes": {
        "managed_by": "github_sync",
        "source": "github"
      },
      "id": "12345678-1234-5678-9abc-123456789012",
      "relationships": {
        "connected_team": {
          "data": {
            "id": "@GitHubOrg/team-handle",
            "type": "github_team"
          }
        },
        "team": {
          "data": {
            "id": "87654321-4321-8765-dcba-210987654321",
            "type": "team"
          }
        }
      },
      "type": "team_connection"
    }
  ],
  "meta": {
    "page": {
      "first_number": "integer",
      "last_number": "integer",
      "next_number": "integer",
      "number": "integer",
      "prev_number": "integer",
      "size": "integer",
      "total": "integer",
      "type": "number_size"
    }
  }
}
```

{% /tab %}

{% /tab %}

{% tab title="400" %}
Bad Request
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="403" %}
Forbidden
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

{% tab title="429" %}
Too many requests
{% tab title="Model" %}
API error response.

| Field                    | Type     | Description       |
| ------------------------ | -------- | ----------------- |
| errors [*required*] | [string] | A list of errors. |

{% /tab %}

{% tab title="Example" %}

```json
{
  "errors": [
    "Bad Request"
  ]
}
```

{% /tab %}

{% /tab %}

### Code Example

##### 
                  \# Curl command curl -X GET "https://api.datadoghq.com/api/v2/team/connections" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" 
                
##### 

```ruby
# List team connections returns "OK" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::TeamsAPI.new
opts = {
  page_size: 10,
}
p api_instance.list_team_connections(opts)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=ruby) and then save the example to `example.rb` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" rb "example.rb"
##### 

```python
"""
List team connections returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.teams_api import TeamsApi

configuration = Configuration()
with ApiClient(configuration) as api_client:
    api_instance = TeamsApi(api_client)
    response = api_instance.list_team_connections(
        page_size=10,
    )

    print(response)
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=python) and then save the example to `example.py` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" python3 "example.py"
##### 

```go
// List team connections returns "OK" response

package main

import (
	"context"
	"encoding/json"
	"fmt"
	"os"

	"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
	"github.com/DataDog/datadog-api-client-go/v2/api/datadogV2"
)

func main() {
	ctx := datadog.NewDefaultContext(context.Background())
	configuration := datadog.NewConfiguration()
	apiClient := datadog.NewAPIClient(configuration)
	api := datadogV2.NewTeamsApi(apiClient)
	resp, r, err := api.ListTeamConnections(ctx, *datadogV2.NewListTeamConnectionsOptionalParameters().WithPageSize(10))

	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.ListTeamConnections`: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}

	responseContent, _ := json.MarshalIndent(resp, "", "  ")
	fmt.Fprintf(os.Stdout, "Response from `TeamsApi.ListTeamConnections`:\n%s\n", responseContent)
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=go) and then save the example to `main.go` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" go run "main.go"
##### 

```java
// List team connections returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.TeamsApi;
import com.datadog.api.client.v2.api.TeamsApi.ListTeamConnectionsOptionalParameters;
import com.datadog.api.client.v2.model.TeamConnectionsResponse;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = ApiClient.getDefaultApiClient();
    TeamsApi apiInstance = new TeamsApi(defaultClient);

    try {
      TeamConnectionsResponse result =
          apiInstance.listTeamConnections(
              new ListTeamConnectionsOptionalParameters().pageSize(10L));
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling TeamsApi#listTeamConnections");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=java) and then save the example to `Example.java` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
##### 

```rust
// List team connections returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_teams::ListTeamConnectionsOptionalParams;
use datadog_api_client::datadogV2::api_teams::TeamsAPI;

#[tokio::main]
async fn main() {
    let configuration = datadog::Configuration::new();
    let api = TeamsAPI::with_config(configuration);
    let resp = api
        .list_team_connections(ListTeamConnectionsOptionalParams::default().page_size(10))
        .await;
    if let Ok(value) = resp {
        println!("{:#?}", value);
    } else {
        println!("{:#?}", resp.unwrap_err());
    }
}
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=rust) and then save the example to `src/main.rs` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" cargo run
##### 

```typescript
/**
 * List team connections returns "OK" response
 */

import { client, v2 } from "@datadog/datadog-api-client";

const configuration = client.createConfiguration();
const apiInstance = new v2.TeamsApi(configuration);

const params: v2.TeamsApiListTeamConnectionsRequest = {
  pageSize: 10,
};

apiInstance
  .listTeamConnections(params)
  .then((data: v2.TeamConnectionsResponse) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));
```

#### Instructions

First [install the library and its dependencies](https://docs.datadoghq.com/api/latest.md?code-lang=typescript) and then save the example to `example.ts` and run following commands:
    DD_SITE="datadoghq.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" tsc "example.ts"
{% /tab %}
