All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
GetAccount | GET /account | Get Account Info |
GetAccount200Response GetAccount ()
Get Account Info
Get your Vultr account, permission, and billing information.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetAccountExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.vultr.com/v2";
// Configure Bearer token for authorization: API Key
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new AccountApi(config);
try
{
// Get Account Info
GetAccount200Response result = apiInstance.GetAccount();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling AccountApi.GetAccount: " + 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
{
// Get Account Info
ApiResponse<GetAccount200Response> response = apiInstance.GetAccountWithHttpInfo();
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 AccountApi.GetAccountWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
[API Key](../README.md#API Key)
- 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]