Esta página aún no está disponible en español. Estamos trabajando en su traducción.
Si tienes alguna pregunta o comentario sobre nuestro actual proyecto de traducción, no dudes en ponerte en contacto con nosotros.

Team Connections

View and manage relationships between Datadog teams and teams from external sources, such as GitHub.

Note: This endpoint is in Preview. To request access, fill out this form. If you have any feedback, contact Datadog support.

GET https://api.ap1.datadoghq.com/api/v2/team/connectionshttps://api.ap2.datadoghq.com/api/v2/team/connectionshttps://api.datadoghq.eu/api/v2/team/connectionshttps://api.ddog-gov.com/api/v2/team/connectionshttps://api.datadoghq.com/api/v2/team/connectionshttps://api.us3.datadoghq.com/api/v2/team/connectionshttps://api.us5.datadoghq.com/api/v2/team/connections

Información general

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

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

Argumentos

Cadenas de consulta

Nombre

Tipo

Descripción

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.

Respuesta

OK

Response containing information about multiple team connections.

Expand All

Campo

Tipo

Descripción

data

[object]

Array of team connections.

attributes

object

Attributes of the team connection.

managed_by

string

The entity that manages this team connection.

source

string

The name of the external source.

id [required]

string

The unique identifier of the team connection.

relationships

object

Relationships of the team connection.

connected_team

object

Reference to a team from an external system.

data

object

Reference to connected external team.

id [required]

string

The connected team ID as it is referenced throughout the Datadog ecosystem.

type [required]

enum

External team resource type. Allowed enum values: github_team

default: github_team

team

object

Reference to a Datadog team.

data

object

Reference to a Datadog team.

id [required]

string

The Datadog team ID.

type [required]

enum

Datadog team resource type. Allowed enum values: team

default: team

type [required]

enum

Team connection resource type. Allowed enum values: team_connection

default: team_connection

meta

object

Connections response metadata.

page

object

Page-based pagination metadata.

first_number

int64

The first page number.

last_number

int64

The last page number.

next_number

int64

The next page number.

number

int64

The current page number.

prev_number

int64

The previous page number.

size

int64

The page size.

total

int64

Total connections matching request.

type

string

Pagination type.

{
  "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"
    }
  }
}

Bad Request

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Ejemplo de código

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

Note: This endpoint is in Preview. To request access, fill out this form. If you have any feedback, contact Datadog support.

POST https://api.ap1.datadoghq.com/api/v2/team/connectionshttps://api.ap2.datadoghq.com/api/v2/team/connectionshttps://api.datadoghq.eu/api/v2/team/connectionshttps://api.ddog-gov.com/api/v2/team/connectionshttps://api.datadoghq.com/api/v2/team/connectionshttps://api.us3.datadoghq.com/api/v2/team/connectionshttps://api.us5.datadoghq.com/api/v2/team/connections

Información general

Create multiple team connections. This endpoint requires the teams_read permission.

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

Solicitud

Body Data (required)

Expand All

Campo

Tipo

Descripción

data [required]

[object]

Array of team connections to create.

attributes

object

Attributes of the team connection.

managed_by

string

The entity that manages this team connection.

source

string

The name of the external source.

relationships

object

Relationships of the team connection.

connected_team

object

Reference to a team from an external system.

data

object

Reference to connected external team.

id [required]

string

The connected team ID as it is referenced throughout the Datadog ecosystem.

type [required]

enum

External team resource type. Allowed enum values: github_team

default: github_team

team

object

Reference to a Datadog team.

data

object

Reference to a Datadog team.

id [required]

string

The Datadog team ID.

type [required]

enum

Datadog team resource type. Allowed enum values: team

default: team

type [required]

enum

Team connection resource type. Allowed enum values: team_connection

default: team_connection

{
  "data": [
    {
      "attributes": {
        "managed_by": "github_sync",
        "source": "github"
      },
      "relationships": {
        "connected_team": {
          "data": {
            "id": "@GitHubOrg/team-handle",
            "type": "github_team"
          }
        },
        "team": {
          "data": {
            "id": "87654321-4321-8765-dcba-210987654321",
            "type": "team"
          }
        }
      },
      "type": "team_connection"
    }
  ]
}

Respuesta

Created

Response containing information about multiple team connections.

Expand All

Campo

Tipo

Descripción

data

[object]

Array of team connections.

attributes

object

Attributes of the team connection.

managed_by

string

The entity that manages this team connection.

source

string

The name of the external source.

id [required]

string

The unique identifier of the team connection.

relationships

object

Relationships of the team connection.

connected_team

object

Reference to a team from an external system.

data

object

Reference to connected external team.

id [required]

string

The connected team ID as it is referenced throughout the Datadog ecosystem.

type [required]

enum

External team resource type. Allowed enum values: github_team

default: github_team

team

object

Reference to a Datadog team.

data

object

Reference to a Datadog team.

id [required]

string

The Datadog team ID.

type [required]

enum

Datadog team resource type. Allowed enum values: team

default: team

type [required]

enum

Team connection resource type. Allowed enum values: team_connection

default: team_connection

meta

object

Connections response metadata.

page

object

Page-based pagination metadata.

first_number

int64

The first page number.

last_number

int64

The last page number.

next_number

int64

The next page number.

number

int64

The current page number.

prev_number

int64

The previous page number.

size

int64

The page size.

total

int64

Total connections matching request.

type

string

Pagination type.

{
  "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"
    }
  }
}

Bad Request

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Conflict

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Ejemplo de código

                  # Curl command
curl -X POST "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/team/connections" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": [ { "relationships": { "connected_team": { "data": { "id": "@GitHubOrg/team-handle", "type": "github_team" } }, "team": { "data": { "id": "87654321-4321-8765-dcba-210987654321", "type": "team" } } }, "type": "team_connection" } ] } EOF

Note: This endpoint is in Preview. To request access, fill out this form. If you have any feedback, contact Datadog support.

DELETE https://api.ap1.datadoghq.com/api/v2/team/connectionshttps://api.ap2.datadoghq.com/api/v2/team/connectionshttps://api.datadoghq.eu/api/v2/team/connectionshttps://api.ddog-gov.com/api/v2/team/connectionshttps://api.datadoghq.com/api/v2/team/connectionshttps://api.us3.datadoghq.com/api/v2/team/connectionshttps://api.us5.datadoghq.com/api/v2/team/connections

Información general

Delete multiple team connections. This endpoint requires the teams_read permission.

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

Solicitud

Body Data (required)

Expand All

Campo

Tipo

Descripción

data [required]

[object]

Array of team connection IDs to delete.

id [required]

string

The unique identifier of the team connection to delete.

type [required]

enum

Team connection resource type. Allowed enum values: team_connection

default: team_connection

{
  "data": [
    {
      "id": "12345678-1234-5678-9abc-123456789012",
      "type": "team_connection"
    }
  ]
}

Respuesta

No Content

Bad Request

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Ejemplo de código

                  # Curl command
curl -X DELETE "https://api.ap1.datadoghq.com"https://api.ap2.datadoghq.com"https://api.datadoghq.eu"https://api.ddog-gov.com"https://api.datadoghq.com"https://api.us3.datadoghq.com"https://api.us5.datadoghq.com/api/v2/team/connections" \ -H "Content-Type: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \ -d @- << EOF { "data": [ { "id": "12345678-1234-5678-9abc-123456789012", "type": "team_connection" } ] } EOF