Update a log forwarder.

PATCH /groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}

Path parameters

application/json

Body Required

A log forwarder configuration

  • name string Required
  • disabled boolean Required
  • log_types array[string] Required

    Values are auth, endpoint, function, graphql, push, schema, service, sync, trigger, or trigger_error_handler.

  • log_statuses array[string] Required

    Values are error or success.

  • policy object Required
    Hide policy attribute Show policy attribute object
    • type string

      Values are single or batch.

  • action object Required
    Hide action attributes Show action attributes object
    • type string

      Values are collection or function.

    • name string
    • data_source string
    • database string
    • collection string

Responses

  • 200 application/json

    OK

    Hide response attributes Show response attributes object
    • _id string
    • name string Required
    • disabled boolean Required
    • log_types array[string] Required

      Values are auth, endpoint, function, graphql, push, schema, service, sync, trigger, or trigger_error_handler.

    • log_statuses array[string] Required

      Values are error or success.

    • policy object Required
      Hide policy attribute Show policy attribute object
      • type string

        Values are single or batch.

    • action object Required
      Hide action attributes Show action attributes object
      • type string

        Values are collection or function.

      • name string
      • data_source string
      • database string
      • collection string
PATCH /groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}
curl \
 --request PATCH 'https://services.cloud.mongodb.com/api/admin/v3.0/groups/{groupId}/apps/{appId}/log_forwarders/{forwarderId}' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"name":"string","disabled":true,"log_types":["auth"],"log_statuses":["error"],"policy":{"type":"single"},"action":{"type":"collection","name":"string","data_source":"string","database":"string","collection":"string"}}'
Request examples
{
  "name": "string",
  "disabled": true,
  "log_types": [
    "auth"
  ],
  "log_statuses": [
    "error"
  ],
  "policy": {
    "type": "single"
  },
  "action": {
    "type": "collection",
    "name": "string",
    "data_source": "string",
    "database": "string",
    "collection": "string"
  }
}
Response examples (200)
{
  "_id": "string",
  "name": "string",
  "disabled": true,
  "log_types": [
    "auth"
  ],
  "log_statuses": [
    "error"
  ],
  "policy": {
    "type": "single"
  },
  "action": {
    "type": "collection",
    "name": "string",
    "data_source": "string",
    "database": "string",
    "collection": "string"
  }
}