Integrations /
Create log sink
Required permission
Account > Sinks > General > Create
Request body
- {object}Create a log sink using Loki
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one oflokisinkData
{object} requiredDetails about the Loki log sink.endpoint
string requiredThe endpoint of the Loki log sink.encoding
{object}Encoding optionscodec
string requiredCodec to encode logs inone oftext, jsonauth
{object}Object containing authentication data for the log sink.strategy
stringThe authentication strategy.one ofbasicuser
stringThe username for the log sink.password
stringThe password for the log sink.
- {object}Create a log sink using Datadog
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofdatadog_logssinkData
{object} requiredDetails about the Datadog log sink.default_api_key
string requiredThe Datadog API key.region
string requiredThe Datadog region.one ofeu, us, us3, us5
- {object}Create a log sink using Papertrail
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofpapertrailsinkData
(multiple options: oneOf) requiredPapertrail Sink Schema.- {object}Authenticate with a host/port
authenticationStrategy
string requiredThe authentication strategy.one ofporthost
string requiredThe host for the Papertrail log destination.port
number requiredThe port for the Papertrail log destination.- {object}Authenticate with a token.
authenticationStrategy
string requiredThe authentication strategy.one oftokenuri
string requiredThe uri for the Papertrail log destination.token
string requiredThe HTTP Token for the Papertrail log destination.
OR
- {object}Create a log sink using AWS S3
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofaws_s3sinkData
{object} requiredDetails about the AWS S3 log sink.endpoint
string requiredEndpoint for the AWS S3 or compatible API bucket.region
string requiredRegion of the S3 bucket.one ofeu-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-east2auth
{object}Authentication object.accessKeyId
string requiredAccess key id for the bucket.secretAccessKey
string requiredSecret access key for the bucket.bucket
string requiredName of the S3 Bucket.compression
string requiredLog file compression method.one ofgzip, none
- {object}Create a log sink using HTTP
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofhttpsinkData
{object} requiredDetails about the HTTP log sink.uri
string requiredUri to send logs to.encoding
{object}Encoding optionscodec
string requiredCodec to encode logs inone oftext, jsonbatch
{object}maxEvents
numberThe max number of events in a batch before sendingmaxBytes
numberThe max size of a batch in bytes before sendingauth
(multiple options: oneOf) requiredAuth information.- {object}No authentication strategy
strategy
string requiredNo authentication strategyone ofnone- {object}Authenticate with a basic http strategy.
strategy
string requiredBasic HTTP authentication strategy.one ofbasicuser
stringUsername for basic http authentication.password
string requiredPassword for basic http authentication.- {object}Authenticate with a bearer token strategy.
strategy
string requiredBearer token authentication strategy.one ofbearertoken
stringToken for bearer token authentication.
OR
OR
- {object}Create a log sink using LogDNA
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one oflogdnasinkData
{object} requiredDetails about the LogDNA log sink.api_key
string requiredIngestion Key
- {object}Create a log sink using Better Stack
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofbetterStacksinkData
{object} requiredDetails about the Better Stack log sink.token
string requiredBetter Stack Source Token
- {object}Create a log sink using Honeycomb
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofhoneycombsinkData
{object} requiredDetails about the Honeycomb log sink.api_key
string requiredHoneycomb API Keydataset
string requiredName of the dataset
- {object}Create a log sink using Logz.io
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one oflogziosinkData
{object} requiredDetails about the Logz.io log sink.region
string requiredYour Logzio region codeone ofeu, uk, us, ca, au, nl, watoken
string requiredThe Log Shipping Token of the account you want to ship to
- {object}Create a log sink using Axiom
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofaxiomsinkData
{object} requiredDetails about the Axiom log sink.dataset
string requiredName of the datatoken
string requiredAxiom API/Personal tokentokenType
string requiredUsing a personal tokenone ofpersonal, apiorgId
stringThe ID of the organisation, required if using a personal tokenurl
stringThe Axiom url to use. Only change if self hosting axiom.
- {object}Create a log sink using New Relic
name
string requiredName of the log sink.description
stringDescription of the log sink.max length200pattern^[a-zA-Z0-9.,?\s\\/'"()[\];`%^&*\-_:!]+$restricted
booleanIf `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.- stringThe ID of a project.pattern^[A-Za-z0-9-]+$
options
{object}useCustomLabels
booleanIf `true`, we will do additional parsing on your JSON formatted log lines and your extract custom labelsforwardCdnLogs
booleanForward CDN logs from your workloadsforwardIngressLogs
booleanForward ingress logs from your workloadsforwardMeshLogs
booleanForward mesh logs from your workloadssinkType
string requiredThe type of the log sink.one ofnewRelicsinkData
{object} requiredDetails about the New Relic log sink.accountId
string requiredNew Relic Account IDlicenseKey
string requiredNew Relic License Keyregion
string requiredone ofeu, us
Response body
- {object}Response object.
data
{object} requiredResult data.id
string requiredThe ID of the new log sink.
POST /v1/integrations/log-sinks
Example request
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"loki","sinkData":{"endpoint":"https://logs.example.com","encoding":{"codec":"json"},"auth":{"strategy":"basic","user":"admin","password":"password1234"}}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"datadog_logs","sinkData":{"default_api_key":"abcdef12345678900000000000000000","region":"eu"}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"papertrail","sinkData":{"authenticationStrategy":"port","host":"logs1.papertrailapp.com:","port":8000}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"aws_s3","sinkData":{"endpoint":"my.bucket.com","region":"eu-west-2","auth":{"accessKeyId":"PMSACIHNUIASDBWQDS","secretAccessKey":"HA1PLMNOEAEYUHAJQMSDUJQS"},"bucket":"northflank-logs","compression":"gzip"}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"http","sinkData":{"uri":"my.log-collector.com","encoding":{"codec":"json"},"batch":{"maxEvents":"10","maxBytes":"1e+7"},"auth":{"strategy":"none"}}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"logdna","sinkData":{"api_key":"b1dd3feb585asd1a3e9edpo9kmn5e590hg9"}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"betterStack","sinkData":{"token":"vhnqrLygVQ5GnSQUTZamKvAq"}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"honeycomb","sinkData":{"api_key":"b1dd3feb585asd1a3e9","dataset":"staging-logs"}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"logzio","sinkData":{"region":"eu","token":"sNFijNFgNFoNFrMsNFbNFObNFcgNFqoa"}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"axiom","sinkData":{"dataset":"staging","token":"b1dd3feb585asd1a3e9edpo9kmn5e590hg9","tokenType":"api"}}' \
https://api.northflank.com/v1/integrations/log-sinks
curl --header "Content-Type: application/json" \
--header "Authorization: Bearer NORTHFLANK_API_TOKEN" \
--request POST \
--data '{"name":"example-log-sink","description":"This is an example log sink.","restricted":true,"projects":["default-project"],"options":{"useCustomLabels":true,"forwardCdnLogs":true,"forwardIngressLogs":true,"forwardMeshLogs":true},"sinkType":"newRelic","sinkData":{"accountId":"b1dd3feb585asd1a3e9","licenseKey":"b1dd3feb585asd1a3e9","region":"eu"}}' \
https://api.northflank.com/v1/integrations/log-sinks
Example response
200 OK
JSON
{
"data": {
"id": "example-log-sink"
}
}