Logz.io Connection
The following guide shows you how to manage Logz.io connections in your Lumar account. Logz.io connections allow Lumar to import log data for log file analysis reports.
Creating a Logz.io connection
To create a connection, provide a label and your Logz.io API token:
- Mutation
- Variables
- Response
- cURL
mutation CreateLogzioConnection($input: CreateLogzioConnectionInput!) {
createLogzioConnection(input: $input) {
logzioConnection {
id
label
isWorking
}
}
}
{
"input": {
"label": "Production Logz.io",
"token": "your-logzio-api-token"
}
}
{
"data": {
"createLogzioConnection": {
"logzioConnection": {
"id": "TjAxOExvZ3ppb0Nvbm5lY3Rpb24x",
"label": "Production Logz.io",
"isWorking": true
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation CreateLogzioConnection($input: CreateLogzioConnectionInput!) { createLogzioConnection(input: $input) { logzioConnection { id label isWorking } } }","variables":{"input":{"label":"Production Logz.io","token":"your-logzio-api-token"}}}' https://api.lumar.io/graphql
Querying connections
Retrieve all Logz.io connections for an account:
- Query
- Variables
- Response
- cURL
query GetLogzioConnections {
me {
logzioConnections(first: 10) {
nodes {
id
label
isWorking
createdAt
createdByUser {
id
username
}
}
totalCount
}
}
}
{}
{
"data": {
"me": {
"logzioConnections": {
"nodes": [
{
"id": "TjAxOExvZ3ppb0Nvbm5lY3Rpb24x",
"label": "Production Logz.io",
"isWorking": true,
"createdAt": "2025-01-10T08:00:00.000Z",
"createdByUser": {
"id": "TjAwOFVzZXIxMjM",
"username": "admin@example.com"
}
}
],
"totalCount": 1
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"query GetLogzioConnections { me { logzioConnections(first: 10) { nodes { id label isWorking createdAt createdByUser { id username } } totalCount } } }","variables":{}}' https://api.lumar.io/graphql
The isWorking field indicates whether the connection is currently functional. If it is false, the API token may be invalid or expired.
Updating a connection
Update the label or token of an existing connection:
- Mutation
- Variables
- Response
- cURL
mutation UpdateLogzioConnection($input: UpdateLogzioConnectionInput!) {
updateLogzioConnection(input: $input) {
logzioConnection {
id
label
isWorking
}
}
}
{
"input": {
"logzioConnectionId": "TjAxOExvZ3ppb0Nvbm5lY3Rpb24x",
"label": "Updated Logz.io Connection"
}
}
{
"data": {
"updateLogzioConnection": {
"logzioConnection": {
"id": "TjAxOExvZ3ppb0Nvbm5lY3Rpb24x",
"label": "Updated Logz.io Connection",
"isWorking": true
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation UpdateLogzioConnection($input: UpdateLogzioConnectionInput!) { updateLogzioConnection(input: $input) { logzioConnection { id label isWorking } } }","variables":{"input":{"logzioConnectionId":"TjAxOExvZ3ppb0Nvbm5lY3Rpb24x","label":"Updated Logz.io Connection"}}}' https://api.lumar.io/graphql
Deleting a connection
Remove a Logz.io connection when it is no longer needed:
- Mutation
- Variables
- Response
- cURL
mutation DeleteLogzioConnection($input: DeleteLogzioConnectionInput!) {
deleteLogzioConnection(input: $input) {
logzioConnection {
id
}
}
}
{
"input": {
"logzioConnectionId": "TjAxOExvZ3ppb0Nvbm5lY3Rpb24x"
}
}
{
"data": {
"deleteLogzioConnection": {
"logzioConnection": {
"id": "TjAxOExvZ3ppb0Nvbm5lY3Rpb24x"
}
}
}
}
curl -X POST -H "Content-Type: application/json" -H "apollographql-client-name: docs-example-client" -H "apollographql-client-version: 1.0.0" -H "x-auth-token: YOUR_API_SESSION_TOKEN" --data '{"query":"mutation DeleteLogzioConnection($input: DeleteLogzioConnectionInput!) { deleteLogzioConnection(input: $input) { logzioConnection { id } } }","variables":{"input":{"logzioConnectionId":"TjAxOExvZ3ppb0Nvbm5lY3Rpb24x"}}}' https://api.lumar.io/graphql
Project queries
After creating a connection, you can set up project-level queries using createLogzioProjectQuery to define which log data Lumar should fetch for a specific project. Project queries allow you to configure:
baseUrl-- the base URL to match in log entries.dateRange-- the number of days of log data to import.- User agent regex patterns for desktop, mobile, and AI bot detection.
See CreateLogzioProjectQueryInput for the full list of configuration options.