Skip to content

Latest commit

 

History

History
671 lines (507 loc) · 20.2 KB

LicensesApi.md

File metadata and controls

671 lines (507 loc) · 20.2 KB

PollinationSDK.Api.LicensesApi

All URIs are relative to http://localhost

Method HTTP request Description
DeleteActivation DELETE /licenses/pools/{pool_id}/activations/{activation_id} Delete the activation
GetAvailablePools GET /licenses/pools Get license pools available to authenticated user
GetLicenseActivations GET /licenses/pools/{pool_id}/activations Get the activations for the license
GetPoolLicense GET /licenses/pools/{pool_id}/license Get the license associated with a pool
GrantAccessToPool PATCH /licenses/pools/{pool_id}/permissions Grant access to the license pool
RegenerateLicensePool POST /licenses/pools/{pool_id}/regenerate Regenerate the license associated with the pool
RevokeAccessToPool DELETE /licenses/pools/{pool_id}/permissions Revoke access to the license pool
UpdateLicensePool PUT /licenses/pools/{pool_id} Update the license pool

DeleteActivation

void DeleteActivation (string poolId, string activationId)

Delete the activation

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class DeleteActivationExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var poolId = poolId_example;  // string | 
            var activationId = activationId_example;  // string | 

            try
            {
                // Delete the activation
                apiInstance.DeleteActivation(poolId, activationId);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.DeleteActivation: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
poolId string
activationId string

Return type

void (empty response body)

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Successful Response -
422 Validation Error -

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

GetAvailablePools

LicensePoolList GetAvailablePools (List owner = null)

Get license pools available to authenticated user

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class GetAvailablePoolsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var owner = new List<string>(); // List<string> | Owner of the project (optional) 

            try
            {
                // Get license pools available to authenticated user
                LicensePoolList result = apiInstance.GetAvailablePools(owner);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.GetAvailablePools: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner List<string> Owner of the project [optional]

Return type

LicensePoolList

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

GetLicenseActivations

ActivationList GetLicenseActivations (string poolId)

Get the activations for the license

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class GetLicenseActivationsExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var poolId = poolId_example;  // string | 

            try
            {
                // Get the activations for the license
                ActivationList result = apiInstance.GetLicenseActivations(poolId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.GetLicenseActivations: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
poolId string

Return type

ActivationList

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

GetPoolLicense

LicensePublic GetPoolLicense (Guid poolId)

Get the license associated with a pool

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class GetPoolLicenseExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var poolId = new Guid(); // Guid | 

            try
            {
                // Get the license associated with a pool
                LicensePublic result = apiInstance.GetPoolLicense(poolId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.GetPoolLicense: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
poolId Guid

Return type

LicensePublic

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

GrantAccessToPool

LicensePoolPublic GrantAccessToPool (Guid poolId, LicensePoolAccessPolicyList licensePoolAccessPolicyList)

Grant access to the license pool

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class GrantAccessToPoolExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var poolId = new Guid(); // Guid | 
            var licensePoolAccessPolicyList = new LicensePoolAccessPolicyList(); // LicensePoolAccessPolicyList | 

            try
            {
                // Grant access to the license pool
                LicensePoolPublic result = apiInstance.GrantAccessToPool(poolId, licensePoolAccessPolicyList);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.GrantAccessToPool: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
poolId Guid
licensePoolAccessPolicyList LicensePoolAccessPolicyList

Return type

LicensePoolPublic

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

RegenerateLicensePool

AnyType RegenerateLicensePool (Guid poolId)

Regenerate the license associated with the pool

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class RegenerateLicensePoolExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var poolId = new Guid(); // Guid | 

            try
            {
                // Regenerate the license associated with the pool
                AnyType result = apiInstance.RegenerateLicensePool(poolId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.RegenerateLicensePool: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
poolId Guid

Return type

AnyType

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

RevokeAccessToPool

LicensePoolPublic RevokeAccessToPool (Guid poolId, LicensePoolPolicySubjectList licensePoolPolicySubjectList)

Revoke access to the license pool

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class RevokeAccessToPoolExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var poolId = new Guid(); // Guid | 
            var licensePoolPolicySubjectList = new LicensePoolPolicySubjectList(); // LicensePoolPolicySubjectList | 

            try
            {
                // Revoke access to the license pool
                LicensePoolPublic result = apiInstance.RevokeAccessToPool(poolId, licensePoolPolicySubjectList);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.RevokeAccessToPool: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
poolId Guid
licensePoolPolicySubjectList LicensePoolPolicySubjectList

Return type

LicensePoolPublic

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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

UpdateLicensePool

AnyType UpdateLicensePool (Guid poolId, LicensePoolUpdate licensePoolUpdate)

Update the license pool

Example

using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;

namespace Example
{
    public class UpdateLicensePoolExample
    {
        public static void Main()
        {
            Configuration.Default.BasePath = "http://localhost";
            // Configure API key authorization: APIKeyAuth
            Configuration.Default.AddApiKey("x-pollination-token", "YOUR_API_KEY");
            // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
            // Configuration.Default.AddApiKeyPrefix("x-pollination-token", "Bearer");
            // Configure HTTP bearer authorization: JWTAuth
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new LicensesApi(Configuration.Default);
            var poolId = new Guid(); // Guid | 
            var licensePoolUpdate = new LicensePoolUpdate(); // LicensePoolUpdate | 

            try
            {
                // Update the license pool
                AnyType result = apiInstance.UpdateLicensePool(poolId, licensePoolUpdate);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling LicensesApi.UpdateLicensePool: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
poolId Guid
licensePoolUpdate LicensePoolUpdate

Return type

AnyType

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Successful Response -
422 Validation Error -

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