All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
ListOs | GET /os | List OS |
ListOs200Response ListOs (int? perPage = null, string? cursor = null)
List OS
List the OS images available for installation at Vultr.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListOsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
var apiInstance = new OsApi(config);
var perPage = 56; // int? | Number of items requested per page. Default is 100 and Max is 500. (optional)
var cursor = "cursor_example"; // string? | Cursor for paging. See [Meta and Pagination](#section/Introduction/Meta-and-Pagination). (optional)
try
{
// List OS
ListOs200Response result = apiInstance.ListOs(perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OsApi.ListOs: " + 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
{
// List OS
ApiResponse<ListOs200Response> response = apiInstance.ListOsWithHttpInfo(perPage, cursor);
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 OsApi.ListOsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
perPage | int? | Number of items requested per page. Default is 100 and Max is 500. | [optional] |
cursor | string? | Cursor for paging. See Meta and Pagination. | [optional] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]