All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
CreateArtifact | POST /projects/{owner}/{name}/artifacts | Get an Artifact upload link. |
DeleteArtifact | DELETE /projects/{owner}/{name}/artifacts | Delete one or many artifacts by key/prefix |
DownloadArtifact | GET /projects/{owner}/{name}/artifacts/download | Download an artifact from the project folder |
ListArtifacts | GET /projects/{owner}/{name}/artifacts | List artifacts in a project folder |
S3UploadRequest CreateArtifact (string owner, string name, KeyRequest keyRequest)
Get an Artifact upload link.
using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;
namespace Example
{
public class CreateArtifactExample
{
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 ArtifactsApi(Configuration.Default);
var owner = owner_example; // string |
var name = name_example; // string |
var keyRequest = new KeyRequest(); // KeyRequest |
try
{
// Get an Artifact upload link.
S3UploadRequest result = apiInstance.CreateArtifact(owner, name, keyRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ArtifactsApi.CreateArtifact: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
owner | string | ||
name | string | ||
keyRequest | KeyRequest |
- Content-Type: application/json
- Accept: application/json
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]
void DeleteArtifact (string owner, string name, List path = null, int? page = null, int? perPage = null)
Delete one or many artifacts by key/prefix
using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;
namespace Example
{
public class DeleteArtifactExample
{
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 ArtifactsApi(Configuration.Default);
var owner = owner_example; // string |
var name = name_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
{
// Delete one or many artifacts by key/prefix
apiInstance.DeleteArtifact(owner, name, path, page, perPage);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ArtifactsApi.DeleteArtifact: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
owner | string | ||
name | 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] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
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]
AnyType DownloadArtifact (string owner, string name, string path = null)
Download an artifact from the project folder
using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;
namespace Example
{
public class DownloadArtifactExample
{
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 ArtifactsApi(Configuration.Default);
var owner = owner_example; // string |
var name = name_example; // string |
var path = path_example; // string | The path to an file within a project folder (optional)
try
{
// Download an artifact from the project folder
AnyType result = apiInstance.DownloadArtifact(owner, name, path);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ArtifactsApi.DownloadArtifact: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
owner | string | ||
name | string | ||
path | string | The path to an file within a project folder | [optional] |
- Content-Type: Not defined
- Accept: application/json
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]
FileMetaList ListArtifacts (string owner, string name, List path = null, int? page = null, int? perPage = null)
List artifacts in a project folder
using System.Collections.Generic;
using System.Diagnostics;
using PollinationSDK.Api;
using PollinationSDK.Client;
using PollinationSDK.Model;
namespace Example
{
public class ListArtifactsExample
{
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 ArtifactsApi(Configuration.Default);
var owner = owner_example; // string |
var name = name_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 project folder
FileMetaList result = apiInstance.ListArtifacts(owner, name, path, page, perPage);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling ArtifactsApi.ListArtifacts: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
owner | string | ||
name | 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] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Retrieved | - |
422 | Validation Error | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]