All URIs are relative to https://127.0.0.1:4646/v1
Method | HTTP request | Description |
---|---|---|
GetRegions | GET /regions |
List<string> GetRegions ()
using System.Collections.Generic;
using System.Diagnostics;
using Fermyon.Nomad.Api;
using Fermyon.Nomad.Client;
using Fermyon.Nomad.Model;
namespace Example
{
public class GetRegionsExample
{
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 RegionsApi(config);
try
{
List<string> result = apiInstance.GetRegions();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling RegionsApi.GetRegions: " + 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<List<string>> response = apiInstance.GetRegionsWithHttpInfo();
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 RegionsApi.GetRegionsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
List
- 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]