For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/fr/api/latest/teams/create-team-connections.md. A documentation index is available at /llms.txt.
Language
Datadog site

Créer des connexions d'équipe

POSThttps://api.datadoghq.com/api/v2/team/connectionshttps://api.us3.datadoghq.com/api/v2/team/connectionshttps://api.us5.datadoghq.com/api/v2/team/connectionshttps://api.datadoghq.eu/api/v2/team/connectionshttps://api.ap1.datadoghq.com/api/v2/team/connectionshttps://api.ap2.datadoghq.com/api/v2/team/connectionshttps://api.uk1.datadoghq.com/api/v2/team/connectionshttps://api.ddog-gov.com/api/v2/team/connectionshttps://api.us2.ddog-gov.com/api/v2/team/connections

Présentation

Créer plusieurs connexions d'équipe.

This endpoint requires the teams_read permission.

OAuth apps require the teams_read authorization scope to access this endpoint.

Requête

Body Data (required)

Champ
Type
Description
data [required]
[object]

Requête de création de connexions d'équipe.

Réponse

Created

Response containing information about multiple team connections.

Champ
Type
Description
data
[object]

Array of team connections.

meta
object

Connections response metadata.

Exemple de code

Create team connections returns "Created" response
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF
# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/v2/team/connections" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
  "data": [
    {
      "type": "team_connection",
      "attributes": {
        "source": "github",
        "managed_by": "datadog"
      },
      "relationships": {
        "team": {
          "data": {
            "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
            "type": "team"
          }
        },
        "connected_team": {
          "data": {
            "id": "@MyGitHubAccount/my-team-name",
            "type": "github_team"
          }
        }
      }
    }
  ]
}
EOF