All URIs are relative to https://api.vultr.com/v2
Method | HTTP request | Description |
---|---|---|
GetBackup | GET /backups/{backup-id} | Get a Backup |
ListBackups | GET /backups | List Backups |
GetBackup200Response GetBackup (string backupId)
Get a Backup
Get the information for the Backup.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class GetBackupExample
{
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 BackupApi(config);
var backupId = "backupId_example"; // string | The [Backup id](#operation/list-backups).
try
{
// Get a Backup
GetBackup200Response result = apiInstance.GetBackup(backupId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BackupApi.GetBackup: " + 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 a Backup
ApiResponse<GetBackup200Response> response = apiInstance.GetBackupWithHttpInfo(backupId);
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 BackupApi.GetBackupWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
backupId | string | The Backup id. |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListBackups200Response ListBackups (string? instanceId = null, int? perPage = null, string? cursor = null)
List Backups
Get information about Backups in your account.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ListBackupsExample
{
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 BackupApi(config);
var instanceId = "instanceId_example"; // string? | Filter the backup list by [Instance id](#operation/list-instances). (optional)
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 Backups
ListBackups200Response result = apiInstance.ListBackups(instanceId, perPage, cursor);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling BackupApi.ListBackups: " + 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 Backups
ApiResponse<ListBackups200Response> response = apiInstance.ListBackupsWithHttpInfo(instanceId, 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 BackupApi.ListBackupsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
instanceId | string? | Filter the backup list by Instance id. | [optional] |
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] |
[API Key](../README.md#API Key)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
400 | Bad Request | - |
401 | Unauthorized | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]