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.

Org Connections

Manage connections between organizations. Org connections allow for controlled sharing of data between different Datadog organizations. See the Cross-Organization Visibiltiy page for more information.

GET https://api.ap1.datadoghq.com/api/v2/org_connectionshttps://api.ap2.datadoghq.com/api/v2/org_connectionshttps://api.datadoghq.eu/api/v2/org_connectionshttps://api.ddog-gov.com/api/v2/org_connectionshttps://api.datadoghq.com/api/v2/org_connectionshttps://api.us3.datadoghq.com/api/v2/org_connectionshttps://api.us5.datadoghq.com/api/v2/org_connections

Información general

Returns a list of org connections. This endpoint requires the org_connections_read permission.

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

Respuesta

OK

Response containing a list of org connections.

Expand All

Campo

Tipo

Descripción

data [required]

[object]

List of org connections.

attributes [required]

object

Org connection attributes.

connection_types [required]

[string]

List of connection types.

created_at [required]

date-time

Timestamp when the connection was created.

id [required]

uuid

The unique identifier of the org connection.

relationships [required]

object

Related organizations and user.

created_by

object

User relationship.

data

object

The data for a user relationship.

id

string

User UUID.

name

string

User name.

type

enum

The type of the user relationship. Allowed enum values: users

sink_org

object

Org relationship.

data

object

The definition of OrgConnectionOrgRelationshipData object.

id

string

Org UUID.

name

string

Org name.

type

enum

The type of the organization relationship. Allowed enum values: orgs

source_org

object

Org relationship.

data

object

The definition of OrgConnectionOrgRelationshipData object.

id

string

Org UUID.

name

string

Org name.

type

enum

The type of the organization relationship. Allowed enum values: orgs

type [required]

enum

Org connection type. Allowed enum values: org_connection

meta

object

Pagination metadata.

page

object

Page information.

total_count

int64

Total number of org connections.

total_filtered_count

int64

Total number of org connections matching the filter.

{
  "data": [
    {
      "attributes": {
        "connection_types": [
          "logs",
          "metrics"
        ],
        "created_at": "2023-01-01T12:00:00Z"
      },
      "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
      "relationships": {
        "created_by": {
          "data": {
            "id": "usr123abc456",
            "name": "John Doe",
            "type": "users"
          }
        },
        "sink_org": {
          "data": {
            "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
            "name": "Example Org",
            "type": "orgs"
          }
        },
        "source_org": {
          "data": {
            "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
            "name": "Example Org",
            "type": "orgs"
          }
        }
      },
      "type": "org_connection"
    }
  ],
  "meta": {
    "page": {
      "total_count": 0,
      "total_filtered_count": 0
    }
  }
}

Unauthorized

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/org_connections" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

POST https://api.ap1.datadoghq.com/api/v2/org_connectionshttps://api.ap2.datadoghq.com/api/v2/org_connectionshttps://api.datadoghq.eu/api/v2/org_connectionshttps://api.ddog-gov.com/api/v2/org_connectionshttps://api.datadoghq.com/api/v2/org_connectionshttps://api.us3.datadoghq.com/api/v2/org_connectionshttps://api.us5.datadoghq.com/api/v2/org_connections

Información general

Create a new org connection between the current org and a target org. This endpoint requires the org_connections_write permission.

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

Solicitud

Body Data (required)

Expand All

Campo

Tipo

Descripción

data [required]

object

Org connection creation data.

attributes [required]

object

Attributes for creating an org connection.

connection_types [required]

[string]

List of connection types to establish.

relationships [required]

object

Relationships for org connection creation.

sink_org [required]

object

Org relationship.

data

object

The definition of OrgConnectionOrgRelationshipData object.

id

string

Org UUID.

name

string

Org name.

type

enum

The type of the organization relationship. Allowed enum values: orgs

type [required]

enum

Org connection type. Allowed enum values: org_connection

{
  "data": {
    "type": "org_connection",
    "relationships": {
      "sink_org": {
        "data": {
          "type": "orgs",
          "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85"
        }
      }
    },
    "attributes": {
      "connection_types": [
        "logs"
      ]
    }
  }
}

Respuesta

OK

Response containing a single org connection.

Expand All

Campo

Tipo

Descripción

data [required]

object

An org connection.

attributes [required]

object

Org connection attributes.

connection_types [required]

[string]

List of connection types.

created_at [required]

date-time

Timestamp when the connection was created.

id [required]

uuid

The unique identifier of the org connection.

relationships [required]

object

Related organizations and user.

created_by

object

User relationship.

data

object

The data for a user relationship.

id

string

User UUID.

name

string

User name.

type

enum

The type of the user relationship. Allowed enum values: users

sink_org

object

Org relationship.

data

object

The definition of OrgConnectionOrgRelationshipData object.

id

string

Org UUID.

name

string

Org name.

type

enum

The type of the organization relationship. Allowed enum values: orgs

source_org

object

Org relationship.

data

object

The definition of OrgConnectionOrgRelationshipData object.

id

string

Org UUID.

name

string

Org name.

type

enum

The type of the organization relationship. Allowed enum values: orgs

type [required]

enum

Org connection type. Allowed enum values: org_connection

{
  "data": {
    "attributes": {
      "connection_types": [
        "logs",
        "metrics"
      ],
      "created_at": "2023-01-01T12:00:00Z"
    },
    "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
    "relationships": {
      "created_by": {
        "data": {
          "id": "usr123abc456",
          "name": "John Doe",
          "type": "users"
        }
      },
      "sink_org": {
        "data": {
          "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
          "name": "Example Org",
          "type": "orgs"
        }
      },
      "source_org": {
        "data": {
          "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
          "name": "Example Org",
          "type": "orgs"
        }
      }
    },
    "type": "org_connection"
  }
}

Bad Request

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Unauthorized

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

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/org_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": { "type": "org_connection", "relationships": { "sink_org": { "data": { "type": "orgs", "id": "83999dcd-7f97-11f0-8de1-1ecf66f1aa85" } } }, "attributes": { "connection_types": [ "logs" ] } } } EOF

PATCH https://api.ap1.datadoghq.com/api/v2/org_connections/{connection_id}https://api.ap2.datadoghq.com/api/v2/org_connections/{connection_id}https://api.datadoghq.eu/api/v2/org_connections/{connection_id}https://api.ddog-gov.com/api/v2/org_connections/{connection_id}https://api.datadoghq.com/api/v2/org_connections/{connection_id}https://api.us3.datadoghq.com/api/v2/org_connections/{connection_id}https://api.us5.datadoghq.com/api/v2/org_connections/{connection_id}

Información general

Update an existing org connection. This endpoint requires the org_connections_write permission.

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

Argumentos

Parámetros de ruta

Nombre

Tipo

Descripción

connection_id [required]

string

The unique identifier of the org connection.

Solicitud

Body Data (required)

Expand All

Campo

Tipo

Descripción

data [required]

object

Org connection update data.

attributes [required]

object

Attributes for updating an org connection.

connection_types [required]

[string]

Updated list of connection types.

id [required]

uuid

The unique identifier of the org connection.

type [required]

enum

Org connection type. Allowed enum values: org_connection

{
  "data": {
    "type": "org_connection",
    "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
    "attributes": {
      "connection_types": [
        "logs",
        "metrics"
      ]
    }
  }
}

Respuesta

OK

Response containing a single org connection.

Expand All

Campo

Tipo

Descripción

data [required]

object

An org connection.

attributes [required]

object

Org connection attributes.

connection_types [required]

[string]

List of connection types.

created_at [required]

date-time

Timestamp when the connection was created.

id [required]

uuid

The unique identifier of the org connection.

relationships [required]

object

Related organizations and user.

created_by

object

User relationship.

data

object

The data for a user relationship.

id

string

User UUID.

name

string

User name.

type

enum

The type of the user relationship. Allowed enum values: users

sink_org

object

Org relationship.

data

object

The definition of OrgConnectionOrgRelationshipData object.

id

string

Org UUID.

name

string

Org name.

type

enum

The type of the organization relationship. Allowed enum values: orgs

source_org

object

Org relationship.

data

object

The definition of OrgConnectionOrgRelationshipData object.

id

string

Org UUID.

name

string

Org name.

type

enum

The type of the organization relationship. Allowed enum values: orgs

type [required]

enum

Org connection type. Allowed enum values: org_connection

{
  "data": {
    "attributes": {
      "connection_types": [
        "logs",
        "metrics"
      ],
      "created_at": "2023-01-01T12:00:00Z"
    },
    "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
    "relationships": {
      "created_by": {
        "data": {
          "id": "usr123abc456",
          "name": "John Doe",
          "type": "users"
        }
      },
      "sink_org": {
        "data": {
          "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
          "name": "Example Org",
          "type": "orgs"
        }
      },
      "source_org": {
        "data": {
          "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a",
          "name": "Example Org",
          "type": "orgs"
        }
      }
    },
    "type": "org_connection"
  }
}

Bad Request

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Unauthorized

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

                          # Path parameters
export connection_id="f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a"
# Curl command
curl -X PATCH "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/org_connections/${connection_id}" \ -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": { "type": "org_connection", "id": "f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a", "attributes": { "connection_types": [ "logs", "metrics" ] } } } EOF

DELETE https://api.ap1.datadoghq.com/api/v2/org_connections/{connection_id}https://api.ap2.datadoghq.com/api/v2/org_connections/{connection_id}https://api.datadoghq.eu/api/v2/org_connections/{connection_id}https://api.ddog-gov.com/api/v2/org_connections/{connection_id}https://api.datadoghq.com/api/v2/org_connections/{connection_id}https://api.us3.datadoghq.com/api/v2/org_connections/{connection_id}https://api.us5.datadoghq.com/api/v2/org_connections/{connection_id}

Información general

Delete an existing org connection. This endpoint requires the org_connections_write permission.

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

Argumentos

Parámetros de ruta

Nombre

Tipo

Descripción

connection_id [required]

string

The unique identifier of the org connection.

Respuesta

OK

Bad Request

API error response.

Expand All

Campo

Tipo

Descripción

errors [required]

[string]

A list of errors.

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

Unauthorized

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

                  # Path parameters
export connection_id="f9ec96b0-8c8a-4b0a-9b0a-1b2c3d4e5f6a"
# 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/org_connections/${connection_id}" \ -H "Accept: application/json" \ -H "DD-API-KEY: ${DD_API_KEY}" \ -H "DD-APPLICATION-KEY: ${DD_APP_KEY}"