Skip to content

Latest commit

 

History

History
1093 lines (849 loc) · 36 KB

ApplicationsApi.md

File metadata and controls

1093 lines (849 loc) · 36 KB

PollinationSDK.Api.ApplicationsApi

All URIs are relative to http://localhost

Method HTTP request Description
CreateApplication POST /applications/{owner} Create an Application
DeleteApplication DELETE /applications/{owner}/{slug} Delete a Application
DeleteApplicationOrgPermission DELETE /applications/{owner}/{slug}/permissions Remove a Application permissions
DeleteApplicationVersion DELETE /applications/{owner}/{slug}/versions/{tag} Remove a Application version
GetApplication GET /applications/{owner}/{slug} Get an application
GetApplicationAccessPermissions GET /applications/{owner}/{slug}/permissions Get application access permissions
GetApplicationDeployment GET /applications/{owner}/{slug}/deployment Get application deployment
GetApplicationVersions GET /applications/{owner}/{slug}/versions Get application versions
ListApplications GET /applications List Applications
UpdateApplication PUT /applications/{owner}/{slug} Update a Application
UpsertApplicationPermission PATCH /applications/{owner}/{slug}/permissions Upsert a new permission to a application
UpsertApplicationVersion PATCH /applications/{owner}/{slug}/versions Upsert a new version to a application

CreateApplication

Application CreateApplication (string owner, ApplicationCreate applicationCreate)

Create an Application

Example

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

namespace Example
{
    public class CreateApplicationExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var applicationCreate = new ApplicationCreate(); // ApplicationCreate | 

            try
            {
                // Create an Application
                Application result = apiInstance.CreateApplication(owner, applicationCreate);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.CreateApplication: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
applicationCreate ApplicationCreate

Return type

Application

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Success -
403 Access forbidden -
500 Server error -
400 Invalid request -
202 Accepted -
422 Validation Error -

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

DeleteApplication

void DeleteApplication (string owner, string slug)

Delete a Application

Example

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

namespace Example
{
    public class DeleteApplicationExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 

            try
            {
                // Delete a Application
                apiInstance.DeleteApplication(owner, slug);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.DeleteApplication: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug 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 Accepted -
403 Access forbidden -
500 Server error -
400 Invalid request -
422 Validation Error -

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

DeleteApplicationOrgPermission

void DeleteApplicationOrgPermission (string owner, string slug, ApplicationPolicySubject applicationPolicySubject)

Remove a Application permissions

Example

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

namespace Example
{
    public class DeleteApplicationOrgPermissionExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 
            var applicationPolicySubject = new ApplicationPolicySubject(); // ApplicationPolicySubject | 

            try
            {
                // Remove a Application permissions
                apiInstance.DeleteApplicationOrgPermission(owner, slug, applicationPolicySubject);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.DeleteApplicationOrgPermission: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string
applicationPolicySubject ApplicationPolicySubject

Return type

void (empty response body)

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Accepted -
403 Access forbidden -
500 Server error -
400 Invalid request -
422 Validation Error -

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

DeleteApplicationVersion

void DeleteApplicationVersion (string owner, string slug, string tag)

Remove a Application version

Example

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

namespace Example
{
    public class DeleteApplicationVersionExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 
            var tag = tag_example;  // string | 

            try
            {
                // Remove a Application version
                apiInstance.DeleteApplicationVersion(owner, slug, tag);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.DeleteApplicationVersion: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string
tag 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 Accepted -
403 Access forbidden -
500 Server error -
400 Invalid request -
422 Validation Error -

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

GetApplication

Application GetApplication (string owner, string slug)

Get an application

Example

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

namespace Example
{
    public class GetApplicationExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 

            try
            {
                // Get an application
                Application result = apiInstance.GetApplication(owner, slug);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.GetApplication: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string

Return type

Application

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Retrieved -
403 Access forbidden -
500 Server error -
400 Invalid request -
404 Not found -
422 Validation Error -

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

GetApplicationAccessPermissions

ApplicationAccessPolicyList GetApplicationAccessPermissions (string owner, string slug, int? page = null, int? perPage = null, List subjectType = null, List permission = null)

Get application access permissions

Example

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

namespace Example
{
    public class GetApplicationAccessPermissionsExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 
            var page = 56;  // int? | Page number starting from 1 (optional)  (default to 1)
            var perPage = 56;  // int? | Number of items per page (optional)  (default to 25)
            var subjectType = new List<string>(); // List<string> | The type of access policy subject (optional) 
            var permission = new List<string>(); // List<string> | An access policy permission string (optional) 

            try
            {
                // Get application access permissions
                ApplicationAccessPolicyList result = apiInstance.GetApplicationAccessPermissions(owner, slug, page, perPage, subjectType, permission);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.GetApplicationAccessPermissions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string
page int? Page number starting from 1 [optional] [default to 1]
perPage int? Number of items per page [optional] [default to 25]
subjectType List<string> The type of access policy subject [optional]
permission List<string> An access policy permission string [optional]

Return type

ApplicationAccessPolicyList

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Retrieved -
403 Access forbidden -
500 Server error -
400 Invalid request -
422 Validation Error -

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

GetApplicationDeployment

ApplicationDeployment GetApplicationDeployment (string owner, string slug)

Get application deployment

Example

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

namespace Example
{
    public class GetApplicationDeploymentExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 

            try
            {
                // Get application deployment
                ApplicationDeployment result = apiInstance.GetApplicationDeployment(owner, slug);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.GetApplicationDeployment: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string

Return type

ApplicationDeployment

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

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

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

GetApplicationVersions

ApplicationVersionList GetApplicationVersions (string owner, string slug, int? page = null, int? perPage = null)

Get application versions

Example

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

namespace Example
{
    public class GetApplicationVersionsExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 
            var page = 56;  // int? | Page number starting from 1 (optional)  (default to 1)
            var perPage = 56;  // int? | Number of items per page (optional)  (default to 25)

            try
            {
                // Get application versions
                ApplicationVersionList result = apiInstance.GetApplicationVersions(owner, slug, page, perPage);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.GetApplicationVersions: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string
page int? Page number starting from 1 [optional] [default to 1]
perPage int? Number of items per page [optional] [default to 25]

Return type

ApplicationVersionList

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Retrieved -
403 Access forbidden -
500 Server error -
400 Invalid request -
422 Validation Error -

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

ListApplications

ApplicationList ListApplications (string search = null, List ids = null, List names = null, List owner = null, bool? _public = null, bool? deployed = null, List permissions = null, List keywords = null, ApplicationSortKey? sortBy = null, SortEnum? sortOrder = null, int? page = null, int? perPage = null)

List Applications

Example

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

namespace Example
{
    public class ListApplicationsExample
    {
        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 ApplicationsApi(Configuration.Default);
            var search = search_example;  // string | Search string to find applications (optional) 
            var ids = new List<string>(); // List<string> | The ID of a application to search for (optional) 
            var names = new List<string>(); // List<string> | The name of the application (optional) 
            var owner = new List<string>(); // List<string> | Owner of the application (optional) 
            var _public = true;  // bool? | Boolean check for public/private applications (optional) 
            var deployed = true;  // bool? | Filter by deployed applications (optional) 
            var permissions = new List<string>(); // List<string> | Filter by permission on given resource (optional) 
            var keywords = new List<string>(); // List<string> | Filter by keywords on given resource (optional) 
            var sortBy = ;  // ApplicationSortKey? | Key to sort the list by (optional) 
            var sortOrder = ;  // SortEnum? | The order to sort the list (optional) 
            var page = 56;  // int? | Page number starting from 1 (optional)  (default to 1)
            var perPage = 56;  // int? | Number of items per page (optional)  (default to 25)

            try
            {
                // List Applications
                ApplicationList result = apiInstance.ListApplications(search, ids, names, owner, _public, deployed, permissions, keywords, sortBy, sortOrder, page, perPage);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.ListApplications: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
search string Search string to find applications [optional]
ids List<string> The ID of a application to search for [optional]
names List<string> The name of the application [optional]
owner List<string> Owner of the application [optional]
_public bool? Boolean check for public/private applications [optional]
deployed bool? Filter by deployed applications [optional]
permissions List<string> Filter by permission on given resource [optional]
keywords List<string> Filter by keywords on given resource [optional]
sortBy ApplicationSortKey? Key to sort the list by [optional]
sortOrder SortEnum? The order to sort the list [optional]
page int? Page number starting from 1 [optional] [default to 1]
perPage int? Number of items per page [optional] [default to 25]

Return type

ApplicationList

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Retrieved -
403 Access forbidden -
500 Server error -
400 Invalid request -
422 Validation Error -

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

UpdateApplication

UpdateAccepted UpdateApplication (string owner, string slug, ApplicationUpdate applicationUpdate)

Update a Application

Example

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

namespace Example
{
    public class UpdateApplicationExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 
            var applicationUpdate = new ApplicationUpdate(); // ApplicationUpdate | 

            try
            {
                // Update a Application
                UpdateAccepted result = apiInstance.UpdateApplication(owner, slug, applicationUpdate);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.UpdateApplication: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string
applicationUpdate ApplicationUpdate

Return type

UpdateAccepted

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
202 Accepted -
403 Access forbidden -
500 Server error -
400 Invalid request -
404 Not found -
422 Validation Error -

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

UpsertApplicationPermission

UpdateAccepted UpsertApplicationPermission (string owner, string slug, ApplicationAccessPolicy applicationAccessPolicy)

Upsert a new permission to a application

Example

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

namespace Example
{
    public class UpsertApplicationPermissionExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 
            var applicationAccessPolicy = new ApplicationAccessPolicy(); // ApplicationAccessPolicy | 

            try
            {
                // Upsert a new permission to a application
                UpdateAccepted result = apiInstance.UpsertApplicationPermission(owner, slug, applicationAccessPolicy);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.UpsertApplicationPermission: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string
applicationAccessPolicy ApplicationAccessPolicy

Return type

UpdateAccepted

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
202 Accepted -
403 Access forbidden -
500 Server error -
400 Invalid request -
404 Not found -
422 Validation Error -

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

UpsertApplicationVersion

S3UploadRequest UpsertApplicationVersion (string owner, string slug, NewApplicationVersion newApplicationVersion)

Upsert a new version to a application

Example

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

namespace Example
{
    public class UpsertApplicationVersionExample
    {
        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 ApplicationsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var slug = slug_example;  // string | 
            var newApplicationVersion = new NewApplicationVersion(); // NewApplicationVersion | 

            try
            {
                // Upsert a new version to a application
                S3UploadRequest result = apiInstance.UpsertApplicationVersion(owner, slug, newApplicationVersion);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling ApplicationsApi.UpsertApplicationVersion: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
slug string
newApplicationVersion NewApplicationVersion

Return type

S3UploadRequest

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
202 Accepted -
403 Access forbidden -
500 Server error -
400 Invalid request -
404 Not found -
422 Validation Error -

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