Skip to content

Latest commit

 

History

History
486 lines (386 loc) · 13.6 KB

IsoApi.md

File metadata and controls

486 lines (386 loc) · 13.6 KB

Org.OpenAPITools.Api.IsoApi

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

Method HTTP request Description
CreateIso POST /iso Create ISO
DeleteIso DELETE /iso/{iso-id} Delete ISO
IsoGet GET /iso/{iso-id} Get ISO
ListIsos GET /iso List ISOs
ListPublicIsos GET /iso-public List Public ISOs

CreateIso

CreateIso201Response CreateIso (CreateIsoRequest? createIsoRequest = null)

Create ISO

Create a new ISO in your account from url.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class CreateIsoExample
    {
        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 IsoApi(config);
            var createIsoRequest = new CreateIsoRequest?(); // CreateIsoRequest? | Include a JSON object in the request body with a content type of **application/json**. (optional) 

            try
            {
                // Create ISO
                CreateIso201Response result = apiInstance.CreateIso(createIsoRequest);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IsoApi.CreateIso: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the CreateIsoWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Create ISO
    ApiResponse<CreateIso201Response> response = apiInstance.CreateIsoWithHttpInfo(createIsoRequest);
    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 IsoApi.CreateIsoWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
createIsoRequest CreateIsoRequest? Include a JSON object in the request body with a content type of application/json. [optional]

Return type

CreateIso201Response

Authorization

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

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Created -
400 Bad Request -
401 Unauthorized -
404 Not Found -

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

DeleteIso

void DeleteIso (string isoId)

Delete ISO

Delete an ISO.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class DeleteIsoExample
    {
        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 IsoApi(config);
            var isoId = "isoId_example";  // string | The [ISO id](#operation/list-isos).

            try
            {
                // Delete ISO
                apiInstance.DeleteIso(isoId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IsoApi.DeleteIso: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the DeleteIsoWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Delete ISO
    apiInstance.DeleteIsoWithHttpInfo(isoId);
}
catch (ApiException e)
{
    Debug.Print("Exception when calling IsoApi.DeleteIsoWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
isoId string The ISO id.

Return type

void (empty response body)

Authorization

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

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
204 No Content -
400 Bad Request -
401 Unauthorized -
404 Not Found -

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

IsoGet

CreateIso201Response IsoGet (string isoId)

Get ISO

Get information for an ISO.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class IsoGetExample
    {
        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 IsoApi(config);
            var isoId = "isoId_example";  // string | The [ISO id](#operation/list-isos).

            try
            {
                // Get ISO
                CreateIso201Response result = apiInstance.IsoGet(isoId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IsoApi.IsoGet: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the IsoGetWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // Get ISO
    ApiResponse<CreateIso201Response> response = apiInstance.IsoGetWithHttpInfo(isoId);
    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 IsoApi.IsoGetWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

Name Type Description Notes
isoId string The ISO id.

Return type

CreateIso201Response

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 -
400 Bad Request -
401 Unauthorized -
404 Not Found -

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

ListIsos

ListIsos200Response ListIsos (int? perPage = null, string? cursor = null)

List ISOs

Get the ISOs in your account.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ListIsosExample
    {
        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 IsoApi(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 ISOs
                ListIsos200Response result = apiInstance.ListIsos(perPage, cursor);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IsoApi.ListIsos: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ListIsosWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List ISOs
    ApiResponse<ListIsos200Response> response = apiInstance.ListIsosWithHttpInfo(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 IsoApi.ListIsosWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

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]

Return type

ListIsos200Response

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 -
400 Bad Request -
401 Unauthorized -
404 Not Found -

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

ListPublicIsos

ListPublicIsos200Response ListPublicIsos ()

List Public ISOs

List all Vultr Public ISOs.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;

namespace Example
{
    public class ListPublicIsosExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.BasePath = "https://api.vultr.com/v2";
            var apiInstance = new IsoApi(config);

            try
            {
                // List Public ISOs
                ListPublicIsos200Response result = apiInstance.ListPublicIsos();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling IsoApi.ListPublicIsos: " + e.Message);
                Debug.Print("Status Code: " + e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Using the ListPublicIsosWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

try
{
    // List Public ISOs
    ApiResponse<ListPublicIsos200Response> response = apiInstance.ListPublicIsosWithHttpInfo();
    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 IsoApi.ListPublicIsosWithHttpInfo: " + e.Message);
    Debug.Print("Status Code: " + e.ErrorCode);
    Debug.Print(e.StackTrace);
}

Parameters

This endpoint does not need any parameter.

Return type

ListPublicIsos200Response

Authorization

No authorization required

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
401 Unauthorized -

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