This API is in preview. Breaking changes might be introduced before it is released. Don't use preview APIs in production.
Creates a new organization-level log integration configuration identified by a unique ID.
- Organization Owner
Path parameters
-
Unique 24-hexadecimal digit string that identifies the organization that contains your projects. Use the
/orgsendpoint to retrieve all organizations to which the authenticated user has access.Format should match the following pattern:
^([a-f0-9]{24})$.
Query parameters
-
Flag that indicates whether Application wraps the response in an
envelopeJSON object. Some API clients cannot access the HTTP response headers or status code. To remediate this, set envelope=true in the query. Endpoints that return a list of results use the results object as an envelope. Application adds the status parameter to the response body.Default value is
false. -
Flag that indicates whether the response body should be in the prettyprint format.
Default value is
false.Prettyprint
Body
Required
Log integration configuration to create.
-
Array of log types exported by this integration.
Not more than
1element. Value isEVENTS. -
Human-readable label that identifies the service to which you want to integrate with Atlas. The value must match the log integration type. This value cannot be modified after the integration is created.
Value is
OTEL_LOG_EXPORT. -
OpenTelemetry collector endpoint URL. Must be HTTPS and not exceed 2048 characters.
-
HTTP headers for authentication and configuration. Maximum 10 headers, total size limit 2KB.
At least
1but not more than10elements.
atlas api pushBasedLogExport createOrgLogIntegration --help
curl --include --header "Authorization: Bearer ${ACCESS_TOKEN}" \
--header "Accept: application/vnd.atlas.preview+json" \
--header "Content-Type: application/json" \
-X POST "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/logIntegrations" \
-d '{ <Payload> }'
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \
--digest --include \
--header "Accept: application/vnd.atlas.preview+json" \
--header "Content-Type: application/json" \
-X POST "https://cloud.mongodb.com/api/atlas/v2/orgs/{orgId}/logIntegrations" \
-d '{ <Payload> }'
{
"logTypes": [
"EVENTS"
],
"type": "OTEL_LOG_EXPORT",
"otelEndpoint": "https://otel-collector.example.com:4318/v1/logs",
"otelSuppliedHeaders": [
{
"name": "Authorization",
"value": "Bearer token123"
}
]
}
# Headers
# Payload
{
"id": "507f1f77bcf86cd799439011",
"logTypes": [
"EVENTS"
],
"type": "OTEL_LOG_EXPORT",
"otelEndpoint": "https://otel-collector.example.com:4318/v1/logs",
"otelSuppliedHeaders": [
{
"name": "Authorization",
"value": "Bearer token123"
}
]
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint) No provider AWS exists.",
"error": 400,
"errorCode": "VALIDATION_ERROR",
"reason": "Bad Request"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 401,
"errorCode": "NOT_ORG_GROUP_CREATOR",
"reason": "Unauthorized"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 403,
"errorCode": "CANNOT_CHANGE_GROUP_NAME",
"reason": "Forbidden"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint) Cannot find resource AWS",
"error": 404,
"errorCode": "RESOURCE_NOT_FOUND",
"reason": "Not Found"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 429,
"errorCode": "RATE_LIMITED",
"reason": "Too Many Requests"
}
{
"detail": "(This is just an example, the exception may not be related to this endpoint)",
"error": 500,
"errorCode": "UNEXPECTED_ERROR",
"reason": "Internal Server Error"
}