Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Cosmo-Tech/cosmotech-api-java-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cosmotech-api-java-client

Cosmo Tech Platform API

  • API version: 4.0.3-SNAPSHOT
    • Build date: 2024-07-17T08:55:58.989708539Z[Etc/UTC]

Cosmo Tech Platform API

For more information, please visit https://github.com/Cosmo-Tech/cosmotech-api

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.cosmotech</groupId>
  <artifactId>cosmotech-api-java-client</artifactId>
  <version>4.0.3-SNAPSHOT</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'cosmotech-api-java-client' jar has been published to maven central.
    mavenLocal()       // Needed if the 'cosmotech-api-java-client' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.cosmotech:cosmotech-api-java-client:4.0.3-SNAPSHOT"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/cosmotech-api-java-client-4.0.3-SNAPSHOT.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import com.cosmotech.client.ApiClient;
import com.cosmotech.client.ApiException;
import com.cosmotech.client.Configuration;
import com.cosmotech.client.auth.*;
import com.cosmotech.client.models.*;
import com.cosmotech.client.api.ConnectorApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://dev.api.cosmotech.com");
    
    // Configure OAuth2 access token for authorization: oAuth2AuthCode
    OAuth oAuth2AuthCode = (OAuth) defaultClient.getAuthentication("oAuth2AuthCode");
    oAuth2AuthCode.setAccessToken("YOUR ACCESS TOKEN");

    ConnectorApi apiInstance = new ConnectorApi(defaultClient);
    Integer page = 56; // Integer | page number to query
    Integer size = 56; // Integer | amount of result by page
    try {
      List<Connector> result = apiInstance.findAllConnectors(page, size);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling ConnectorApi#findAllConnectors");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

All URIs are relative to https://dev.api.cosmotech.com

Class Method HTTP request Description
ConnectorApi findAllConnectors GET /connectors List all Connectors
ConnectorApi findConnectorById GET /connectors/{connector_id} Get the details of a connector
ConnectorApi registerConnector POST /connectors Register a new connector
ConnectorApi unregisterConnector DELETE /connectors/{connector_id} Unregister a connector
DatasetApi addDatasetAccessControl POST /organizations/{organization_id}/datasets/{dataset_id}/security/access Add a control access to the Dataset
DatasetApi addOrReplaceDatasetCompatibilityElements POST /organizations/{organization_id}/datasets/{dataset_id}/compatibility Add Dataset Compatibility elements.
DatasetApi copyDataset POST /organizations/{organization_id}/datasets/copy Copy a Dataset to another Dataset.
DatasetApi createDataset POST /organizations/{organization_id}/datasets Create a new Dataset
DatasetApi createSubDataset POST /organizations/{organization_id}/datasets/{dataset_id}/subdataset Create a sub-dataset from the dataset in parameter
DatasetApi createTwingraphEntities POST /organizations/{organization_id}/datasets/{dataset_id}/twingraph/{type} Create new entities in a graph instance
DatasetApi deleteDataset DELETE /organizations/{organization_id}/datasets/{dataset_id} Delete a dataset
DatasetApi deleteTwingraphEntities DELETE /organizations/{organization_id}/datasets/{dataset_id}/twingraph/{type} Delete entities in a graph instance
DatasetApi downloadTwingraph GET /organizations/{organization_id}/datasets/twingraph/download/{hash} Download a graph as a zip file
DatasetApi findAllDatasets GET /organizations/{organization_id}/datasets List all Datasets
DatasetApi findDatasetById GET /organizations/{organization_id}/datasets/{dataset_id} Get the details of a Dataset
DatasetApi getDatasetAccessControl GET /organizations/{organization_id}/datasets/{dataset_id}/security/access/{identity_id} Get a control access for the Dataset
DatasetApi getDatasetSecurity GET /organizations/{organization_id}/datasets/{dataset_id}/security Get the Dataset security information
DatasetApi getDatasetSecurityUsers GET /organizations/{organization_id}/datasets/{dataset_id}/security/users Get the Dataset security users list
DatasetApi getDatasetTwingraphStatus GET /organizations/{organization_id}/datasets/{dataset_id}/status Get the dataset's refresh job status
DatasetApi getTwingraphEntities GET /organizations/{organization_id}/datasets/{dataset_id}/twingraph/{type} Get entities in a graph instance
DatasetApi linkWorkspace POST /organizations/{organization_id}/datasets/{dataset_id}/link
DatasetApi refreshDataset POST /organizations/{organization_id}/datasets/{dataset_id}/refresh Refresh data on dataset from dataset's source
DatasetApi removeAllDatasetCompatibilityElements DELETE /organizations/{organization_id}/datasets/{dataset_id}/compatibility Remove all Dataset Compatibility elements from the Dataset specified
DatasetApi removeDatasetAccessControl DELETE /organizations/{organization_id}/datasets/{dataset_id}/security/access/{identity_id} Remove the specified access from the given Dataset
DatasetApi rollbackRefresh POST /organizations/{organization_id}/datasets/{dataset_id}/refresh/rollback Rollback the dataset after a failed refresh
DatasetApi searchDatasets POST /organizations/{organization_id}/datasets/search Search Datasets by tags
DatasetApi setDatasetDefaultSecurity POST /organizations/{organization_id}/datasets/{dataset_id}/security/default Set the Dataset default security
DatasetApi twingraphBatchQuery POST /organizations/{organization_id}/datasets/{dataset_id}/batch-query Run a query on a graph instance and return the result as a zip file in async mode
DatasetApi twingraphBatchUpdate POST /organizations/{organization_id}/datasets/{dataset_id}/batch Async batch update by loading a CSV file on a graph instance
DatasetApi twingraphQuery POST /organizations/{organization_id}/datasets/{dataset_id}/twingraph Return the result of a query made on the graph instance as a json
DatasetApi unlinkWorkspace POST /organizations/{organization_id}/datasets/{dataset_id}/unlink
DatasetApi updateDataset PATCH /organizations/{organization_id}/datasets/{dataset_id} Update a dataset
DatasetApi updateDatasetAccessControl PATCH /organizations/{organization_id}/datasets/{dataset_id}/security/access/{identity_id} Update the specified access to User for a Dataset
DatasetApi updateTwingraphEntities PATCH /organizations/{organization_id}/datasets/{dataset_id}/twingraph/{type} Update entities in a graph instance
DatasetApi uploadTwingraph POST /organizations/{organization_id}/datasets/{dataset_id} Upload data from zip file to dataset's twingraph
OrganizationApi addOrganizationAccessControl POST /organizations/{organization_id}/security/access Add a control access to the Organization
OrganizationApi findAllOrganizations GET /organizations List all Organizations
OrganizationApi findOrganizationById GET /organizations/{organization_id} Get the details of an Organization
OrganizationApi getAllPermissions GET /organizations/permissions Get all permissions per components
OrganizationApi getOrganizationAccessControl GET /organizations/{organization_id}/security/access/{identity_id} Get a control access for the Organization
OrganizationApi getOrganizationPermissions GET /organizations/{organization_id}/permissions/{role} Get the Organization permissions by given role
OrganizationApi getOrganizationSecurity GET /organizations/{organization_id}/security Get the Organization security information
OrganizationApi getOrganizationSecurityUsers GET /organizations/{organization_id}/security/users Get the Organization security users list
OrganizationApi registerOrganization POST /organizations Register a new organization
OrganizationApi removeOrganizationAccessControl DELETE /organizations/{organization_id}/security/access/{identity_id} Remove the specified access from the given Organization
OrganizationApi setOrganizationDefaultSecurity POST /organizations/{organization_id}/security/default Set the Organization default security
OrganizationApi unregisterOrganization DELETE /organizations/{organization_id} Unregister an organization
OrganizationApi updateOrganization PATCH /organizations/{organization_id} Update an Organization
OrganizationApi updateOrganizationAccessControl PATCH /organizations/{organization_id}/security/access/{identity_id} Update the specified access to User for an Organization
RunApi deleteRun DELETE /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/runs/{run_id} Delete a run
RunApi getRun GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/runs/{run_id} Get the details of a run
RunApi getRunLogs GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/runs/{run_id}/logs get the logs for the Run
RunApi getRunStatus GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/runs/{run_id}/status get the status for the Run
RunApi listRuns GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/runs get the list of Runs for the Runner
RunApi queryRunData POST /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/runs/{run_id}/data/query query the run data
RunApi sendRunData POST /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/runs/{run_id}/data/send Send data associated to a run
RunnerApi addRunnerAccessControl POST /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access Add a control access to the Runner
RunnerApi createRunner POST /organizations/{organization_id}/workspaces/{workspace_id}/runners Create a new Runner
RunnerApi deleteRunner DELETE /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id} Delete a runner
RunnerApi getRunner GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id} Get the details of an runner
RunnerApi getRunnerAccessControl GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access/{identity_id} Get a control access for the Runner
RunnerApi getRunnerPermissions GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/permissions/{role} Get the Runner permission by given role
RunnerApi getRunnerSecurity GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security Get the Runner security information
RunnerApi getRunnerSecurityUsers GET /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/users Get the Runner security users list
RunnerApi listRunners GET /organizations/{organization_id}/workspaces/{workspace_id}/runners List all Runners
RunnerApi removeRunnerAccessControl DELETE /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access/{identity_id} Remove the specified access from the given Organization Runner
RunnerApi setRunnerDefaultSecurity POST /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/default Set the Runner default security
RunnerApi startRun POST /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/start Start a run with runner parameters
RunnerApi stopRun POST /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/stop Stop the last run
RunnerApi updateRunner PATCH /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id} Update a runner
RunnerApi updateRunnerAccessControl PATCH /organizations/{organization_id}/workspaces/{workspace_id}/runners/{runner_id}/security/access/{identity_id} Update the specified access to User for a Runner
SolutionApi addOrReplaceParameterGroups POST /organizations/{organization_id}/solutions/{solution_id}/parameterGroups Add Parameter Groups. Any item with the same ID will be overwritten
SolutionApi addOrReplaceParameters POST /organizations/{organization_id}/solutions/{solution_id}/parameters Add Parameters. Any item with the same ID will be overwritten
SolutionApi addOrReplaceRunTemplates POST /organizations/{organization_id}/solutions/{solution_id}/runTemplates Add Run Templates. Any item with the same ID will be overwritten
SolutionApi addSolutionAccessControl POST /organizations/{organization_id}/solutions/{solution_id}/security/access Add a control access to the Solution
SolutionApi createSolution POST /organizations/{organization_id}/solutions Register a new solution
SolutionApi deleteSolution DELETE /organizations/{organization_id}/solutions/{solution_id} Delete a solution
SolutionApi deleteSolutionRunTemplate DELETE /organizations/{organization_id}/solutions/{solution_id}/runTemplates/{run_template_id} Remove the specified Solution Run Template
SolutionApi findAllSolutions GET /organizations/{organization_id}/solutions List all Solutions
SolutionApi findSolutionById GET /organizations/{organization_id}/solutions/{solution_id} Get the details of a solution
SolutionApi getSolutionAccessControl GET /organizations/{organization_id}/solutions/{solution_id}/security/access/{identity_id} Get a control access for the Solution
SolutionApi getSolutionSecurity GET /organizations/{organization_id}/solutions/{solution_id}/security Get the Solution security information
SolutionApi getSolutionSecurityUsers GET /organizations/{organization_id}/solutions/{solution_id}/security/users Get the Solution security users list
SolutionApi removeAllRunTemplates DELETE /organizations/{organization_id}/solutions/{solution_id}/runTemplates Remove all Run Templates from the Solution specified
SolutionApi removeAllSolutionParameterGroups DELETE /organizations/{organization_id}/solutions/{solution_id}/parameterGroups Remove all Parameter Groups from the Solution specified
SolutionApi removeAllSolutionParameters DELETE /organizations/{organization_id}/solutions/{solution_id}/parameters Remove all Parameters from the Solution specified
SolutionApi removeSolutionAccessControl DELETE /organizations/{organization_id}/solutions/{solution_id}/security/access/{identity_id} Remove the specified access from the given Organization Solution
SolutionApi setSolutionDefaultSecurity POST /organizations/{organization_id}/solutions/{solution_id}/security/default Set the Solution default security
SolutionApi updateSolution PATCH /organizations/{organization_id}/solutions/{solution_id} Update a solution
SolutionApi updateSolutionAccessControl PATCH /organizations/{organization_id}/solutions/{solution_id}/security/access/{identity_id} Update the specified access to User for a Solution
SolutionApi updateSolutionRunTemplate PATCH /organizations/{organization_id}/solutions/{solution_id}/runTemplates/{run_template_id} Update the specified Solution Run Template
WorkspaceApi addWorkspaceAccessControl POST /organizations/{organization_id}/workspaces/{workspace_id}/security/access Add a control access to the Workspace
WorkspaceApi createSecret POST /organizations/{organization_id}/workspaces/{workspace_id}/secret Create a secret for the Workspace
WorkspaceApi createWorkspace POST /organizations/{organization_id}/workspaces Create a new workspace
WorkspaceApi deleteAllWorkspaceFiles DELETE /organizations/{organization_id}/workspaces/{workspace_id}/files Delete all Workspace files
WorkspaceApi deleteWorkspace DELETE /organizations/{organization_id}/workspaces/{workspace_id} Delete a workspace
WorkspaceApi deleteWorkspaceFile DELETE /organizations/{organization_id}/workspaces/{workspace_id}/files/delete Delete a workspace file
WorkspaceApi downloadWorkspaceFile GET /organizations/{organization_id}/workspaces/{workspace_id}/files/download Download the Workspace File specified
WorkspaceApi findAllWorkspaceFiles GET /organizations/{organization_id}/workspaces/{workspace_id}/files List all Workspace files
WorkspaceApi findAllWorkspaces GET /organizations/{organization_id}/workspaces List all Workspaces
WorkspaceApi findWorkspaceById GET /organizations/{organization_id}/workspaces/{workspace_id} Get the details of an workspace
WorkspaceApi getWorkspaceAccessControl GET /organizations/{organization_id}/workspaces/{workspace_id}/security/access/{identity_id} Get a control access for the Workspace
WorkspaceApi getWorkspacePermissions GET /organizations/{organization_id}/workspaces/{workspace_id}/permissions/{role} Get the Workspace permission by given role
WorkspaceApi getWorkspaceSecurity GET /organizations/{organization_id}/workspaces/{workspace_id}/security Get the Workspace security information
WorkspaceApi getWorkspaceSecurityUsers GET /organizations/{organization_id}/workspaces/{workspace_id}/security/users Get the Workspace security users list
WorkspaceApi linkDataset POST /organizations/{organization_id}/workspaces/{workspace_id}/link
WorkspaceApi removeWorkspaceAccessControl DELETE /organizations/{organization_id}/workspaces/{workspace_id}/security/access/{identity_id} Remove the specified access from the given Organization Workspace
WorkspaceApi setWorkspaceDefaultSecurity POST /organizations/{organization_id}/workspaces/{workspace_id}/security/default Set the Workspace default security
WorkspaceApi unlinkDataset POST /organizations/{organization_id}/workspaces/{workspace_id}/unlink
WorkspaceApi updateWorkspace PATCH /organizations/{organization_id}/workspaces/{workspace_id} Update a workspace
WorkspaceApi updateWorkspaceAccessControl PATCH /organizations/{organization_id}/workspaces/{workspace_id}/security/access/{identity_id} Update the specified access to User for a Workspace
WorkspaceApi uploadWorkspaceFile POST /organizations/{organization_id}/workspaces/{workspace_id}/files Upload a file for the Workspace

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

oAuth2AuthCode

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

platform@cosmotech.com