Skip to content

System Logs

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/system-logs/ List System Logs
GET /api/system-logs/{id}/ Retrieve
Other Actions
GET /api/system-logs/instances/ List system log instances
GET /api/system-logs/stats/ Get system log statistics

Core CRUD

List System Logs

1
2
3
4
http \
  GET \
  https://api.example.com/api/system-logs/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_log_level_enum import SystemLogLevelEnum # (1)
from waldur_api_client.models.system_log_o_enum import SystemLogOEnum # (2)
from waldur_api_client.models.system_log_source_enum import SystemLogSourceEnum # (3)
from waldur_api_client.api.system_logs import system_logs_list # (4)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = system_logs_list.sync(client=client)

for item in response:
    print(item)
  1. Model Source: SystemLogLevelEnum
  2. Model Source: SystemLogOEnum
  3. Model Source: SystemLogSourceEnum
  4. API Source: system_logs_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { systemLogsList } from 'waldur-js-client';

try {
  const response = await systemLogsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
created_from number
created_to number
instance string
level string Enum: CRITICAL, ERROR, INFO, WARNING
level_gte integer Min level: 20=INFO, 30=WARNING, 40=ERROR, 50=CRITICAL
logger_name string
message string
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
source string Enum: api, worker, beat

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
id integer
created string (date-time)
source any
instance string Pod name (K8s) or container name (Docker)
level string
level_number integer
logger_name string
message string
context any

Retrieve

1
2
3
4
http \
  GET \
  https://api.example.com/api/system-logs/123/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.system_logs import system_logs_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = system_logs_retrieve.sync(
    id=123,
    client=client
)

print(response)
  1. API Source: system_logs_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { systemLogsRetrieve } from 'waldur-js-client';

try {
  const response = await systemLogsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "id": 123
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required Description
id integer A unique integer value identifying this system log.

200 -

Field Type Description
id integer
created string (date-time)
source any
instance string Pod name (K8s) or container name (Docker)
level string
level_number integer
logger_name string
message string
context any

Other Actions

List system log instances

List all known instances (pods/containers) with their last activity.

1
2
3
4
http \
  GET \
  https://api.example.com/api/system-logs/instances/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.system_log_level_enum import SystemLogLevelEnum # (1)
from waldur_api_client.models.system_log_o_enum import SystemLogOEnum # (2)
from waldur_api_client.models.system_log_source_enum import SystemLogSourceEnum # (3)
from waldur_api_client.api.system_logs import system_logs_instances_list # (4)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = system_logs_instances_list.sync(client=client)

for item in response:
    print(item)
  1. Model Source: SystemLogLevelEnum
  2. Model Source: SystemLogOEnum
  3. Model Source: SystemLogSourceEnum
  4. API Source: system_logs_instances_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { systemLogsInstancesList } from 'waldur-js-client';

try {
  const response = await systemLogsInstancesList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
created_from number
created_to number
instance string
level string Enum: CRITICAL, ERROR, INFO, WARNING
level_gte integer Min level: 20=INFO, 30=WARNING, 40=ERROR, 50=CRITICAL
logger_name string
message string
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
source string Enum: api, worker, beat

200 -

The response body is an array of objects, where each object has the following structure:

Field Type
source string
instance string
last_seen string (date-time)
count integer

Get system log statistics

Return log count statistics per source and instance, plus total table size.

1
2
3
4
http \
  GET \
  https://api.example.com/api/system-logs/stats/ \
  Authorization:"Token YOUR_API_TOKEN"
1
2
3
4
5
6
7
8
9
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.system_logs import system_logs_stats_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = system_logs_stats_retrieve.sync(client=client)

print(response)
  1. API Source: system_logs_stats_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { systemLogsStatsRetrieve } from 'waldur-js-client';

try {
  const response = await systemLogsStatsRetrieve({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}

200 -

Field Type
instances array of objects
instances.source string
instances.instance string
instances.count integer
total_size_bytes integer
total_size_mb number (double)