v1
Double column
API
CLI
JS Client

Integrations /

Update log sink

Updates the settings for a log sink.

Required permission

Account > Sinks > General > Update

Path parameters

    • logSinkId

      string required
      ID of the log sink

Request body

  • {object}
    • restricted

      boolean
      If `true`, only logs from the projects in `projects` will be sent to the log sink.
    • projects

      [array]
      If `restricted` is `true`, only logs from these projects will be sent to the log sink.
      • string
        The ID of a project.
        pattern
        ^[A-Za-z0-9-]+$
    • options

      {object}
      • useCustomLabels

        boolean
        If `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labels
      • forwardCdnLogs

        boolean
        Forward CDN logs from your workloads
      • forwardIngressLogs

        boolean
        Forward ingress logs from your workloads
      • forwardMeshLogs

        boolean
        Forward mesh logs from your workloads
    • sinkData

      (multiple options: oneOf)
      Data about the log sink.
      • {object}
        Details about the Loki log sink.
        • endpoint

          string
          The endpoint of the Loki log sink.
        • auth

          {object}
          Object containing authentication data for the log sink.
          • strategy

            string
            The authentication method.
            one of
            basic
          • user

            string
            The username for the log sink.
          • password

            string
            The password for the log sink.

        OR

      • {object}
        Details about the Datadog log sink.
        • default_api_key

          string
          The Datadog API key.
        • region

          string
          The Datadog region.
          one of
          eu, us, us3, us5

        OR

      • (multiple options: oneOf)
        Papertrail Sink Schema.
        • {object}
          Authenticate with a host/port
          • authenticationStrategy

            string required
            The authentication strategy.
            one of
            port
          • host

            string required
            The host for the Papertrail log destination.
          • port

            number required
            The port for the Papertrail log destination.

          OR

        • {object}
          Authenticate with a token.
          • authenticationStrategy

            string required
            The authentication strategy.
            one of
            token
          • uri

            string required
            The uri for the Papertrail log destination.
          • token

            string required
            The HTTP Token for the Papertrail log destination.

        OR

      • {object}
        Details about the HTTP log sink.
        • uri

          string required
          Uri to send logs to.
        • encoding

          {object}
          Encoding options
          • codec

            string required
            Codec to encode logs in
            one of
            text, json
        • batch

          {object}
          • maxEvents

            number
            The max number of events in a batch before sending
          • maxBytes

            number
            The max size of a batch in bytes before sending
        • auth

          (multiple options: oneOf) required
          Auth information.
          • {object}
            No authentication strategy
            • strategy

              string required
              No authentication strategy
              one of
              none

            OR

          • {object}
            Authenticate with a basic http strategy.
            • strategy

              string required
              Basic HTTP authentication strategy.
              one of
              basic
            • user

              string
              Username for basic http authentication.
            • password

              string required
              Password for basic http authentication.

            OR

          • {object}
            Authenticate with a bearer token strategy.
            • strategy

              string required
              Bearer token authentication strategy.
              one of
              bearer
            • token

              string
              Token for bearer token authentication.

        OR

      • {object}
        Details about the AWS S3 log sink.
        • endpoint

          string required
          Endpoint for the AWS S3 or compatible API bucket.
        • region

          string required
          Region of the S3 bucket.
          one of
          eu-west-1, eu-west-2, eu-west-3, eu-central-1, eu-south-1, eu-north-1, us-west-1, us-west-2, us-east-1, us-east2
        • auth

          {object}
          Authentication object.
          • accessKeyId

            string required
            Access key id for the bucket.
          • secretAccessKey

            string required
            Secret access key for the bucket.
        • bucket

          string required
          Name of the S3 Bucket.
        • compression

          string required
          Log file compression method.
          one of
          gzip, none

        OR

      • {object}
        Details about the Better Stack log sink.
        • token

          string required
          Better Stack Source Token

        OR

      • {object}
        Details about the LogDNA log sink.
        • api_key

          string required
          Ingestion Key

        OR

      • {object}
        Details about the Honeycomb log sink.
        • api_key

          string required
          Honeycomb API Key
        • dataset

          string required
          Name of the dataset

        OR

      • {object}
        Details about the Axiom log sink.
        • dataset

          string required
          Name of the data
        • token

          string required
          Axiom API/Personal token
        • tokenType

          string required
          Using a personal token
          one of
          personal, api
        • orgId

          string
          The ID of the organisation, required if using a personal token
        • url

          string
          The Axiom url to use. Only change if self hosting axiom.
    • resumeLogSink

      boolean
      If `true`, and the log sink is currently paused, the log sink will be resumed after updating.

Response body

  • {object}
    Response object.
    • data

      {object} required
      Result data.
    API
    CLI
    JS Client

    POST /v1/integrations/log-sinks/{logSinkId}/settings

    Example request

    Request body
    curl
    curl --header "Content-Type: application/json" \
      --header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
      --request POST \
      --data '{"restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkData":{"endpoint":"https://logs.example.com","auth":{"strategy":"basic","user":"admin","password":"password1234"}},"resumeLogSink":false}' \
      https://api.northflank.com/v1/integrations/log-sinks/{logSinkId}/settings

    Example response

    200 OK

    The operation was performed successfully.

    JSON

    {
      "data": {}
    }

    © 2024 Northflank Ltd. All rights reserved.