Skip to content

Latest commit

 

History

History
205 lines (153 loc) · 5.83 KB

File metadata and controls

205 lines (153 loc) · 5.83 KB

Itofinity.Appveyor.Refit.Api.DeploymentApi

All URIs are relative to https://ci.appveyor.com/api

Method HTTP request Description
CancelDeployment Delete /deployments/stop Cancel deployment
GetDeployment Get /deployments/{deploymentId} Get deployment
StartDeployment Post /deployments Start deployment

CancelDeployment

void CancelDeployment (DeploymentCancellation body)

Cancel deployment

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class CancelDeploymentExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DeploymentApi();
            var body = new DeploymentCancellation(); // DeploymentCancellation | 

            try
            {
                // Cancel deployment
                apiInstance.CancelDeployment(body);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeploymentApi.CancelDeployment: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body DeploymentCancellation

Return type

void (empty response body)

Authorization

apiToken

HTTP request headers

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

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

GetDeployment

ProjectDeployment GetDeployment (int? deploymentId)

Get deployment

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class GetDeploymentExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DeploymentApi();
            var deploymentId = 56;  // int? | Deployment ID (`deploymentId` property of `Deployment`)

            try
            {
                // Get deployment
                ProjectDeployment result = apiInstance.GetDeployment(deploymentId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeploymentApi.GetDeployment: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
deploymentId int? Deployment ID (`deploymentId` property of `Deployment`)

Return type

ProjectDeployment

Authorization

apiToken

HTTP request headers

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

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

StartDeployment

Deployment StartDeployment (DeploymentStartRequest body)

Start deployment

Example

using System;
using System.Diagnostics;
using Itofinity.Appveyor.Refit.Api;
using Itofinity.Appveyor.Refit.Client;
using Itofinity.Appveyor.Refit.Model;

namespace Example
{
    public class StartDeploymentExample
    {
        public void main()
        {
            
            // Configure API key authorization: apiToken
            Configuration.Default.ApiKey.Add("Authorization", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.ApiKeyPrefix.Add("Authorization", "Bearer");

            var apiInstance = new DeploymentApi();
            var body = new DeploymentStartRequest(); // DeploymentStartRequest | 

            try
            {
                // Start deployment
                Deployment result = apiInstance.StartDeployment(body);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DeploymentApi.StartDeployment: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
body DeploymentStartRequest

Return type

Deployment

Authorization

apiToken

HTTP request headers

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

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