Setup Server for Monitoring
This API endpoint allows you to set up a new server for monitoring within your organization's infrastructure. By creating a new server monitoring resource, you can track the performance and availability of specific servers. To set up the server, provide essential details such as the service_id, name, description, and timezone.

Utilizing this endpoint helps organizations ensure their infrastructure operates optimally, with real-time insights into performance metrics through data visualizations.

Common use cases:

  • Infrastructure setup and management: Easily register and monitor multiple servers across various regions or time zones, ensuring comprehensive tracking of performance and availability with relevant data visualizations.
  • Historical performance analysis: Track and visualize performance metrics over time to identify trends, recurring issues, or periods of underperformance, facilitating better resource allocation and proactive problem resolution.


Authorization: Bearer YOUR_TOKEN

Request Body Parameters
  • service_id string
    The unique service ID associated with the server resource. Example: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98'
  • name string
  • description string
  • timezone string
  • chart_type_default string
  • os string
  • metric_types_basic array
  • metric_types_advanced array
  • metric_types_complex array
  • interval integer
  • enabled boolean
JavaScript
Response codes
const axios = require('axios');

const url = 'https://resource-cmd.api.pinghome.io/v1/server-resource';
const data = {
  service_id: 'ed45b14d-e3ea-4f40-9a4e-16c175afad98',
  name: 'Resource name',
  description: 'Resource description',
  timezone: 'Europe/Berlin',
  chart_type_default: 'line',
  os: 'ubuntu',
  metric_types_basic: ['cpu-total-usage'],
  metric_types_advanced: ['disk-io-unified'],
  metric_types_complex: ['processes-unified'],
  interval: 60,
  enabled: true
};

axios.post(url, data, {
  headers: {
    'Authorization': 'Bearer YOUR_TOKEN',
    'Content-Type': 'application/json'
  }
})
.then(response => {
  console.log(response.data);
})
.catch(error => {
  console.error(error);
});
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).