All URIs are relative to https://127.0.0.1:4646/v1
Method | HTTP request | Description |
---|---|---|
GetMetricsSummary | GET /metrics |
MetricsSummary GetMetricsSummary (string? format = null)
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetMetricsSummaryExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://127.0.0.1:4646/v1";
// Configure API key authorization: X-Nomad-Token
config.AddApiKey("X-Nomad-Token", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("X-Nomad-Token", "Bearer");
var apiInstance = new MetricsApi(config);
var format = "format_example"; // string? | The format the user requested for the metrics summary (e.g. prometheus) (optional)
try
{
MetricsSummary result = apiInstance.GetMetricsSummary(format);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MetricsApi.GetMetricsSummary: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<MetricsSummary> response = apiInstance.GetMetricsSummaryWithHttpInfo(format);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MetricsApi.GetMetricsSummaryWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
format | string? | The format the user requested for the metrics summary (e.g. prometheus) | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | - | |
400 | Bad request | - |
403 | Forbidden | - |
405 | Method not allowed | - |
500 | Internal server error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]