Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel, n'hésitez pas à nous contacter.

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

Présentation

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.

Arguments

Chaînes de requête

Nom

Type

Description

sink_org_id

string

The Org ID of the sink org.

source_org_id

string

The Org ID of the source org.

limit

integer

The limit of number of entries you want to return. Default is 1000.

offset

integer

The pagination offset which you want to query from. Default is 0.

Réponse

OK

Response containing a list of org connections.

Expand All

Champ

Type

Description

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

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

                  # 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

Présentation

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.

Requête

Body Data (required)

Expand All

Champ

Type

Description

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

Réponse

OK

Response containing a single org connection.

Expand All

Champ

Type

Description

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

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Conflict

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

                          # 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}

Présentation

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.

Arguments

Paramètres du chemin

Nom

Type

Description

connection_id [required]

string

The unique identifier of the org connection.

Requête

Body Data (required)

Expand All

Champ

Type

Description

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

Réponse

OK

Response containing a single org connection.

Expand All

Champ

Type

Description

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

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

                          # 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}

Présentation

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.

Arguments

Paramètres du chemin

Nom

Type

Description

connection_id [required]

string

The unique identifier of the org connection.

Réponse

OK

Bad Request

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Unauthorized

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Forbidden

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Not Found

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Too many requests

API error response.

Expand All

Champ

Type

Description

errors [required]

[string]

A list of errors.

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

Exemple de code

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