Skip to content

Latest commit

 

History

History
97 lines (76 loc) · 2.64 KB

AccountApi.md

File metadata and controls

97 lines (76 loc) · 2.64 KB

Org.OpenAPITools.Api.AccountApi

All URIs are relative to https://api.vultr.com/v2

Method HTTP request Description
GetAccount GET /account Get Account Info

GetAccount

GetAccount200Response GetAccount ()

Get Account Info

Get your Vultr account, permission, and billing information.

Example

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);
            }
        }
    }
}

Using the GetAccountWithHttpInfo variant

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);
}

Parameters

This endpoint does not need any parameter.

Return type

GetAccount200Response

Authorization

[API Key](../README.md#API Key)

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK -

[Back to top] [Back to API list] [Back to Model list] [Back to README]