Log Management

The Log Management API enables you to organize, store, and access application logs within structured log groups. This module provides endpoints for creating, updating, and deleting log groups, as well as sending and retrieving logs associated with specific groups.

Each log group serves as a container for related log events, allowing teams to logically separate and query logs by environment, application, or service. Log data sent via this API can include structured fields such as log level, timestamp, trace identifiers, and additional metadata that enhance searchability and monitoring.

By leveraging this API, developers, DevOps engineers, and observability teams can build their own centralized logging system or integrate this with their existing dashboards and alerting pipelines.

Authorization: Bearer YOUR_TOKEN
ENDPOINTS
Expand all
  • Log Groups
    GET/log-group/${id}
    POST/log-group
    PUT/log-group/{id}/
    DELETE/log-group/{id}/
  • Logs
Get Log Group
This endpoint retrieves detailed metadata about a specific log group by providing its unique id in the URL path. The returned information includes the log group's name, service association, description, retention policy, creation and update timestamps, and whether it is currently enabled.

This is useful for inspecting configuration settings of an individual log group, verifying retention settings, or integrating log group metadata into monitoring dashboards.

Authorization: Bearer YOUR_TOKEN
Path Parameters
  • id string
    The unique ID of the log group. Example: '906a3444-15ce-4410-8041-89a238e9e91f'
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Create New Log Group
This endpoint allows you to create a new log group, which serves as a container for storing and organizing structured logs related to a specific service or application. Log groups help separate and manage logs by context (e.g., environment, service name, or component), enabling better traceability and control over log data.

Each log group can be assigned a custom name, retention policy, and linked to a specific service using its service_id. The enabled flag allows you to control whether the log group is active upon creation.

Typical Use Cases:
  • Set up log grouping for new cloud functions, microservices, or components
  • Enable organized log collection for specific environments (e.g., production vs staging)
  • Configure log retention policy per group

Authorization: Bearer YOUR_TOKEN

Request Body Parameters
  • name string
    The name of the log group. Example: '/aws/lambda/my-function'
  • service_id string
  • description string
  • retention integer
  • enabled boolean
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Update Log Group
This endpoint allows you to update an existing log group’s metadata and configuration. You can modify fields such as the name, description, retention policy, service association, and enable/disable status of the log group.

This endpoint is useful for adjusting how logs are categorized, managed, or retained without needing to delete and recreate the log group.

Common Use Cases:
  • Renaming a log group for clarity or convention changes
  • Adjusting retention settings as per audit policy
  • Enabling or disabling logging temporarily
  • Reassigning a log group to a different service

Authorization: Bearer YOUR_TOKEN

Path Parameters
  • id string
    The unique ID of the log group to be updated. Example: '6766163a-568d-47b4-a1fa-91a0957e06d4'
Request Body Parameters
  • name string
    The new name for the log group. Example: '/aws/lambda/my-function'
  • service_id string
  • description string
  • retention integer
  • enabled boolean
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Delete Log Group
This endpoint allows you to delete an existing log group by specifying its unique id in the URL path. Deleting a log group will remove its configuration and metadata, but it may or may not affect previously stored logs depending on system settings.

Use this endpoint when decommissioning a service or cleaning up unused monitoring structures. Deletion actions are permanent and cannot be undone.

Important: Ensure you have the correct log group ID and that deletion complies with your data retention policies.

Authorization: Bearer YOUR_TOKEN
Path Parameters
  • id string
    The unique ID of the log group to delete. Example: '6766163a-568d-47b4-a1fa-91a0957e06d4'
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Get Logs
This endpoint retrieves application logs stored in the system. You can filter logs by time, severity level, service name, host, environment, trace identifiers, user ID, and more. Results can also be paginated and sorted by timestamp.

This API is ideal for observability dashboards, debugging tools, incident investigations, and user-specific log analysis. Supports advanced search patterns like partial message match and structured metadata filtering.

Authorization: Bearer YOUR_TOKEN
Query Parameters
  • limit integer
    Maximum number of logs to return. Default: 50. Example: 100
  • offset integer
  • from_time string($date-time)
  • to_time string($date-time)
  • level string
  • service string
  • host string
  • environment string
  • trace_id string
  • span_id string
  • user_id string
  • message_like string
  • log_group_id string
  • order string
ResponseThis section is used to view the possible HTTP response codes returned by the API. These codes indicate the status of a request, such as 201 (Created), 401 (Unauthorized), 409 (Conflict), or 422 (Unprocessable Entity).
Send Logs

Send Application Logs to Pinghome


Pinghome allows you to collect, monitor, and analyze structured logs from any application in real-time. Whether you're running services in production or debugging locally, centralized logging helps you gain visibility into your system’s behavior and track important events.



This section provides implementation guides for sending logs to Pinghome using HTTP-based log ingestion. Each guide shows how to configure your logging tool, format and structure log data, and authenticate requests using secure Bearer tokens.



Supported Environments


  • .NET using NLog with NLog.Targets.Http for direct API log forwarding
  • Node.js (integration support coming soon)
  • Python (integration support coming soon)
  • Java (integration support coming soon)


Key Features


  • 🔐 Secure log delivery using Bearer token authentication
  • 📦 Support for structured JSON logs
  • 🧩 Enrich logs with metadata such as user_id, context, or extra
  • 📄 Fully customizable logging format and log level control


Choose your language from the left navigation menu to get started.

Send Logs to Pinghome using NLog (.NET)

This guide shows how to send logs to Pinghome from your .NET application using NLog. You'll use HTTP targets to push logs with structured context like extra, user_id, and any other fields.


🧰 Requirements


  • .NET version 5 or later
  • Pinghome API Token
  • Log Group URL from the Pinghome Dashboard

📦 Install Packages

⚙️ Configure NLog

🚀 Log Example

✅ Sample JSON Output

🧪 Troubleshooting

IssueSolution
No logs in PinghomeCheck if your token and log group URL are correct.
Invalid layout or JSONEnsure extra is serialized correctly with JsonSerializer.Serialize or proper serialization.
Nothing is sent to HTTPCheck internal-nlog.log for errors.
Config not workingEnsure NLog.config is set to CopyToOutputDirectory.

📘 See Also