Skip to content

Latest commit

 

History

History
1022 lines (787 loc) · 31.3 KB

RunsApi.md

File metadata and controls

1022 lines (787 loc) · 31.3 KB

PollinationSDK.Api.RunsApi

All URIs are relative to http://localhost

Method HTTP request Description
CancelRun PUT /projects/{owner}/{name}/runs/{run_id}/cancel Cancel a run
DownloadRunArtifact GET /projects/{owner}/{name}/runs/{run_id}/artifacts/download Download an artifact from the run folder
GetAllRunSteps GET /projects/{owner}/{name}/runs/{run_id}/all-steps Query the steps of a run
GetRun GET /projects/{owner}/{name}/runs/{run_id} Get a Run
GetRunOutput GET /projects/{owner}/{name}/runs/{run_id}/outputs/{output_name} Get run output by name
GetRunStepLogs GET /projects/{owner}/{name}/runs/{run_id}/steps/{step_id}/logs Get the logs of a specific step of the run
GetRunSteps GET /projects/{owner}/{name}/runs/{run_id}/steps Query the steps of a run
ListRunArtifacts GET /projects/{owner}/{name}/runs/{run_id}/artifacts List artifacts in a run folder
ListRuns GET /projects/{owner}/{name}/runs List runs
QueryResults GET /projects/{owner}/{name}/results Query run results
RetryRun PUT /projects/{owner}/{name}/runs/{run_id}/retry Retry a run

CancelRun

Run CancelRun (string owner, string name, string runId)

Cancel a run

Stop a run.

Example

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

namespace Example
{
    public class CancelRunExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 

            try
            {
                // Cancel a run
                Run result = apiInstance.CancelRun(owner, name, runId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.CancelRun: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string

Return type

Run

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
202 Accepted -
422 Validation Error -

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

DownloadRunArtifact

AnyType DownloadRunArtifact (string owner, string name, string runId, string path = null)

Download an artifact from the run folder

Get a download link for an artifact in a run folder

Example

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

namespace Example
{
    public class DownloadRunArtifactExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 
            var path = path_example;  // string | The path to an file within a project folder (optional) 

            try
            {
                // Download an artifact from the run folder
                AnyType result = apiInstance.DownloadRunArtifact(owner, name, runId, path);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.DownloadRunArtifact: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string
path string The path to an file within a project folder [optional]

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 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]

GetAllRunSteps

List<StepStatus> GetAllRunSteps (string owner, string name, string runId)

Query the steps of a run

list all run steps

Example

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

namespace Example
{
    public class GetAllRunStepsExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 

            try
            {
                // Query the steps of a run
                List<StepStatus> result = apiInstance.GetAllRunSteps(owner, name, runId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.GetAllRunSteps: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string

Return type

List<StepStatus>

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]

GetRun

Run GetRun (string owner, string name, string runId)

Get a Run

Retrieve a run.

Example

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

namespace Example
{
    public class GetRunExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 

            try
            {
                // Get a Run
                Run result = apiInstance.GetRun(owner, name, runId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.GetRun: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string

Return type

Run

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]

GetRunOutput

AnyType GetRunOutput (string owner, string name, string runId, string outputName)

Get run output by name

get run output by name

Example

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

namespace Example
{
    public class GetRunOutputExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 
            var outputName = outputName_example;  // string | 

            try
            {
                // Get run output by name
                AnyType result = apiInstance.GetRunOutput(owner, name, runId, outputName);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.GetRunOutput: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string
outputName string

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 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]

GetRunStepLogs

string GetRunStepLogs (string owner, string name, string runId, string stepId)

Get the logs of a specific step of the run

get run step logs

Example

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

namespace Example
{
    public class GetRunStepLogsExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 
            var stepId = stepId_example;  // string | 

            try
            {
                // Get the logs of a specific step of the run
                string result = apiInstance.GetRunStepLogs(owner, name, runId, stepId);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.GetRunStepLogs: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string
stepId string

Return type

string

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]

GetRunSteps

StepList GetRunSteps (string owner, string name, string runId, StepStatusEnum? status = null, List stepId = null, string untilGeneration = null, string sinceGeneration = null, int? page = null, int? perPage = null)

Query the steps of a run

list run steps

Example

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

namespace Example
{
    public class GetRunStepsExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 
            var status = ;  // StepStatusEnum? |  (optional) 
            var stepId = new List<string>(); // List<string> |  (optional) 
            var untilGeneration = untilGeneration_example;  // string |  (optional) 
            var sinceGeneration = sinceGeneration_example;  // string |  (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
            {
                // Query the steps of a run
                StepList result = apiInstance.GetRunSteps(owner, name, runId, status, stepId, untilGeneration, sinceGeneration, page, perPage);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.GetRunSteps: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string
status StepStatusEnum? [optional]
stepId List<string> [optional]
untilGeneration string [optional]
sinceGeneration string [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

StepList

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]

ListRunArtifacts

FileMetaList ListRunArtifacts (string owner, string name, string runId, List path = null, int? page = null, int? perPage = null)

List artifacts in a run folder

Retrieve a list of artifacts in a run folder

Example

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

namespace Example
{
    public class ListRunArtifactsExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 
            var path = new List<string>(); // List<string> | The path to an file within a project folder (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 artifacts in a run folder
                FileMetaList result = apiInstance.ListRunArtifacts(owner, name, runId, path, page, perPage);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.ListRunArtifacts: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string
path List<string> The path to an file within a project folder [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

FileMetaList

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]

ListRuns

RunList ListRuns (string owner, string name, List jobId = null, RunStatusEnum? status = null, int? page = null, int? perPage = null)

List runs

Retrieve a list of runs.

Example

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

namespace Example
{
    public class ListRunsExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var jobId = new List<string>(); // List<string> |  (optional) 
            var status = ;  // RunStatusEnum? |  (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 runs
                RunList result = apiInstance.ListRuns(owner, name, jobId, status, page, perPage);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.ListRuns: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
jobId List<string> [optional]
status RunStatusEnum? [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

RunList

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]

QueryResults

RunResultList QueryResults (string owner, string name, List jobId = null, RunStatusEnum? status = null, int? page = null, int? perPage = null)

Query run results

Retrieve a list of run results.

Example

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

namespace Example
{
    public class QueryResultsExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var jobId = new List<string>(); // List<string> |  (optional) 
            var status = ;  // RunStatusEnum? |  (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
            {
                // Query run results
                RunResultList result = apiInstance.QueryResults(owner, name, jobId, status, page, perPage);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.QueryResults: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
jobId List<string> [optional]
status RunStatusEnum? [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

RunResultList

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]

RetryRun

Run RetryRun (string owner, string name, string runId, RetryConfig retryConfig)

Retry a run

Retry a run.

Example

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

namespace Example
{
    public class RetryRunExample
    {
        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 RunsApi(Configuration.Default);
            var owner = owner_example;  // string | 
            var name = name_example;  // string | 
            var runId = runId_example;  // string | 
            var retryConfig = new RetryConfig(); // RetryConfig | 

            try
            {
                // Retry a run
                Run result = apiInstance.RetryRun(owner, name, runId, retryConfig);
                Debug.WriteLine(result);
            }
            catch (ApiException e)
            {
                Debug.Print("Exception when calling RunsApi.RetryRun: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
owner string
name string
runId string
retryConfig RetryConfig

Return type

Run

Authorization

APIKeyAuth, JWTAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
202 Accepted -
422 Validation Error -

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