POST https://api.ap1.datadoghq.com/api/v2/org_connections https://api.ap2.datadoghq.com/api/v2/org_connections https://api.datadoghq.eu/api/v2/org_connections https://api.ddog-gov.com/api/v2/org_connections https://api.datadoghq.com/api/v2/org_connections https://api.us3.datadoghq.com/api/v2/org_connections https://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
Org connection creation data.
Attributes for creating an org connection.
connection_types [required ]
List of connection types to establish.
Relationships for org connection creation.
The definition of OrgConnectionOrgRelationshipData
object.
The type of the organization relationship.
Allowed enum values: orgs
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
Org connection attributes.
connection_types [required ]
List of connection types.
Timestamp when the connection was created.
The unique identifier of the org connection.
Related organizations and user.
The data for a user relationship.
The type of the user relationship.
Allowed enum values: users
The definition of OrgConnectionOrgRelationshipData
object.
The type of the organization relationship.
Allowed enum values: orgs
The definition of OrgConnectionOrgRelationshipData
object.
The type of the organization relationship.
Allowed enum values: orgs
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
{
"errors" : [
"Bad Request"
]
}
Unauthorized
{
"errors" : [
"Bad Request"
]
}
Forbidden
{
"errors" : [
"Bad Request"
]
}
Not Found
{
"errors" : [
"Bad Request"
]
}
Conflict
{
"errors" : [
"Bad Request"
]
}
Too many requests
{
"errors" : [
"Bad Request"
]
}
Ejemplo de código Copia
# 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