Skip to content

Latest commit

 

History

History
339 lines (255 loc) · 10.6 KB

File metadata and controls

339 lines (255 loc) · 10.6 KB

FilesApi

All URIs are relative to https://api.cloudsmith.io

Method HTTP request Description
filesAbort POST /files/{owner}/{repo}/{identifier}/abort/ Abort a multipart file upload.
filesComplete POST /files/{owner}/{repo}/{identifier}/complete/ Complete a multipart file upload.
filesCreate POST /files/{owner}/{repo}/ Request URL(s) to upload new package file upload(s) to.
filesInfo GET /files/{owner}/{repo}/{identifier}/info/ Get upload information to perform a multipart file upload.
filesValidate POST /files/{owner}/{repo}/validate/ Validate parameters used for create.

filesAbort

filesAbort(owner, repo, identifier, data)

Abort a multipart file upload.

Abort a multipart file upload.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.FilesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

FilesApi apiInstance = new FilesApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
PackageFileUploadRequest data = new PackageFileUploadRequest(); // PackageFileUploadRequest | 
try {
    apiInstance.filesAbort(owner, repo, identifier, data);
} catch (ApiException e) {
    System.err.println("Exception when calling FilesApi#filesAbort");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String
data PackageFileUploadRequest [optional]

Return type

null (empty response body)

Authorization

apikey, basic

HTTP request headers

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

filesComplete

PackageFileUpload filesComplete(owner, repo, identifier, data)

Complete a multipart file upload.

Complete a multipart file upload.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.FilesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

FilesApi apiInstance = new FilesApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
PackageFileUploadRequest data = new PackageFileUploadRequest(); // PackageFileUploadRequest | 
try {
    PackageFileUpload result = apiInstance.filesComplete(owner, repo, identifier, data);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FilesApi#filesComplete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String
data PackageFileUploadRequest [optional]

Return type

PackageFileUpload

Authorization

apikey, basic

HTTP request headers

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

filesCreate

PackageFileUpload filesCreate(owner, repo, data)

Request URL(s) to upload new package file upload(s) to.

Request URL(s) to upload new package file upload(s) to.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.FilesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

FilesApi apiInstance = new FilesApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
PackageFileUploadRequest data = new PackageFileUploadRequest(); // PackageFileUploadRequest | 
try {
    PackageFileUpload result = apiInstance.filesCreate(owner, repo, data);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FilesApi#filesCreate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
data PackageFileUploadRequest [optional]

Return type

PackageFileUpload

Authorization

apikey, basic

HTTP request headers

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

filesInfo

PackageFilePartsUpload filesInfo(owner, repo, identifier, filename, partNumber)

Get upload information to perform a multipart file upload.

Get upload information to perform a multipart file upload.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.FilesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

FilesApi apiInstance = new FilesApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
String identifier = "identifier_example"; // String | 
String filename = "filename_example"; // String | The filename of the file being uploaded
java.math.BigInteger partNumber = new java.math.BigInteger(); // java.math.BigInteger | The part number to be uploaded next
try {
    PackageFilePartsUpload result = apiInstance.filesInfo(owner, repo, identifier, filename, partNumber);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling FilesApi#filesInfo");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
identifier String
filename String The filename of the file being uploaded
partNumber java.math.BigInteger The part number to be uploaded next [optional]

Return type

PackageFilePartsUpload

Authorization

apikey, basic

HTTP request headers

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

filesValidate

filesValidate(owner, repo, data)

Validate parameters used for create.

Validate parameters used for create.

Example

// Import classes:
//import io.cloudsmith.api.ApiClient;
//import io.cloudsmith.api.ApiException;
//import io.cloudsmith.api.Configuration;
//import io.cloudsmith.api.auth.*;
//import io.cloudsmith.api.apis.FilesApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: apikey
ApiKeyAuth apikey = (ApiKeyAuth) defaultClient.getAuthentication("apikey");
apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//apikey.setApiKeyPrefix("Token");

// Configure HTTP basic authorization: basic
HttpBasicAuth basic = (HttpBasicAuth) defaultClient.getAuthentication("basic");
basic.setUsername("YOUR USERNAME");
basic.setPassword("YOUR PASSWORD");

FilesApi apiInstance = new FilesApi();
String owner = "owner_example"; // String | 
String repo = "repo_example"; // String | 
PackageFileUploadRequest data = new PackageFileUploadRequest(); // PackageFileUploadRequest | 
try {
    apiInstance.filesValidate(owner, repo, data);
} catch (ApiException e) {
    System.err.println("Exception when calling FilesApi#filesValidate");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
owner String
repo String
data PackageFileUploadRequest [optional]

Return type

null (empty response body)

Authorization

apikey, basic

HTTP request headers

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