PATCH/servers/{uuid}/log-drains

Update server log drain settings

Updates New Relic, Axiom, CloudWatch, or custom log drain settings for a server owned by the authenticated team. Use the relevant fields to configure or enable a log drain; updating settings requires a token with the write and deploy permissions. Custom configurations cannot use the lua, wasm, exec, exec_wasi, or file plugins, @INCLUDE, or plugins_file; parser files can contain only [PARSER] and [MULTILINE_PARSER] sections.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 13 body fields
uuidstringrequired
The UUID of the server whose log drain settings you want to update.

Settings for New Relic, Axiom, CloudWatch, and custom log drains.

is_logdrain_axiom_enabledbooleanoptional
Whether the Axiom log drain is enabled.
is_logdrain_cloudwatch_enabledbooleanoptional
Whether the CloudWatch log drain is enabled.
is_logdrain_custom_enabledbooleanoptional
Whether the custom log drain is enabled.
is_logdrain_newrelic_enabledbooleanoptional
Whether the New Relic log drain is enabled.
logdrain_axiom_api_keystringoptional
The API key used to authenticate with Axiom.
logdrain_axiom_dataset_namestringoptional
The Axiom dataset name to send logs to.
logdrain_cloudwatch_groupstringoptional
The CloudWatch log group name, or null.
logdrain_cloudwatch_regionstringoptional
The CloudWatch region, or null.
logdrain_cloudwatch_stream_prefixstringoptional
Prepended to the container name to form the log stream name.
logdrain_custom_configstringoptional
The custom log drain configuration. It cannot use the `lua`, `wasm`, `exec`, `exec_wasi`, or `file` plugins, `@INCLUDE`, or `plugins_file`.
logdrain_custom_config_parserstringoptional
The custom parser configuration. It can contain only `[PARSER]` and `[MULTILINE_PARSER]` sections.
logdrain_newrelic_base_uristringoptional
The base URI for the New Relic log drain.
logdrain_newrelic_license_keystringoptional
The license key used to authenticate with New Relic.

6 status codes
200Returns confirmation that the server's log drain settings were updated.
400Returned when the token is invalid.
messagestringoptional
401Returned when the request is unauthenticated.
messagestringoptional
403Returned when the token lacks the `write` or `deploy` permission.
404Returned when the server resource is not found.
messagestringoptional
422Returned when the request fails validation.
errorsobjectoptional
messagestringoptional

Error handling

A 400 is returned for an invalid token, and a 401 is returned when the request is unauthenticated. A 403 is returned if the token lacks the write or deploy permission; a 404 indicates the server resource was not found, and a 422 indicates validation errors. The uuid path parameter must identify a server, and custom configurations must follow the documented plugin and parser restrictions.