Skip to content

inohmonton99/python-sdk

 
 

Repository files navigation

onepanel-sdk

Onepanel API

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 0.14.1
  • Package version: v0.14.1
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://github.com/onepanelio/core

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install onepanel-sdk

(you may need to run pip with root permission: sudo pip install onepanel-sdk)

Then import the package:

import onepanel.core.api

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import onepanel.core.api

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function

import time
import onepanel.core.api
from onepanel.core.api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://localhost:8888
# See configuration.py for a list of all supported configuration parameters.
configuration = onepanel.core.api.Configuration(
    host = "http://localhost:8888"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: Bearer
configuration = onepanel.core.api.Configuration(
    host = "http://localhost:8888",
    api_key = {
        'authorization': 'YOUR_API_KEY'
    }
)
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['authorization'] = 'Bearer'


# Enter a context with an instance of the API client
with onepanel.core.api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = onepanel.core.api.AuthServiceApi(api_client)
    body = onepanel.core.api.IsAuthorized() # IsAuthorized | 

    try:
        api_response = api_instance.is_authorized(body)
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling AuthServiceApi->is_authorized: %s\n" % e)
    

Documentation for API Endpoints

All URIs are relative to http://localhost:8888

Class Method HTTP request Description
AuthServiceApi is_authorized POST /apis/v1beta1/auth
AuthServiceApi is_valid_token POST /apis/v1beta1/auth/token
ConfigServiceApi get_config GET /apis/v1beta1/config
CronWorkflowServiceApi create_cron_workflow POST /apis/v1beta1/{namespace}/cron_workflow
CronWorkflowServiceApi delete_cron_workflow DELETE /apis/v1beta1/{namespace}/cron_workflows/{uid}
CronWorkflowServiceApi get_cron_workflow GET /apis/v1beta1/{namespace}/cron_workflow/{uid}
CronWorkflowServiceApi list_cron_workflows GET /apis/v1beta1/{namespace}/cron_workflows
CronWorkflowServiceApi list_cron_workflows2 GET /apis/v1beta1/{namespace}/cron_workflows/{workflow_template_name}
CronWorkflowServiceApi update_cron_workflow PUT /apis/v1beta1/{namespace}/cron_workflow/{uid}
LabelServiceApi add_labels POST /apis/v1beta1/{namespace}/{resource}/{uid}/labels
LabelServiceApi delete_label DELETE /apis/v1beta1/{namespace}/{resource}/{uid}/labels/{key}
LabelServiceApi get_labels GET /apis/v1beta1/{namespace}/{resource}/{uid}/labels
LabelServiceApi replace_labels PUT /apis/v1beta1/{namespace}/{resource}/{uid}/labels
NamespaceServiceApi create_namespace POST /apis/v1beta1/namespaces
NamespaceServiceApi list_namespaces GET /apis/v1beta1/namespaces
SecretServiceApi add_secret_key_value POST /apis/v1beta1/{namespace}/secrets/{secret.name}
SecretServiceApi create_secret POST /apis/v1beta1/{namespace}/secrets
SecretServiceApi delete_secret DELETE /apis/v1beta1/{namespace}/secrets/{name}
SecretServiceApi delete_secret_key DELETE /apis/v1beta1/{namespace}/secrets/{secretName}/keys/{key}
SecretServiceApi get_secret GET /apis/v1beta1/{namespace}/secrets/{name}
SecretServiceApi list_secrets GET /apis/v1beta1/{namespace}/secrets
SecretServiceApi secret_exists GET /apis/v1beta1/{namespace}/secrets/{name}/exists
SecretServiceApi update_secret_key_value PATCH /apis/v1beta1/{namespace}/secrets/{secret.name}
ServiceServiceApi get_service GET /apis/v1beta1/{namespace}/service/{name}
ServiceServiceApi list_services GET /apis/v1beta1/{namespace}/service
WorkflowServiceApi add_workflow_execution_statistics POST /apis/v1beta1/{namespace}/workflow_executions/{uid}/statistics
WorkflowServiceApi clone_workflow_execution POST /apis/v1beta1/{namespace}/workflow_executions/{uid}
WorkflowServiceApi create_workflow_execution POST /apis/v1beta1/{namespace}/workflow_executions
WorkflowServiceApi cron_start_workflow_execution_statistic POST /apis/v1beta1/{namespace}/workflow_executions/{uid}/cron_start_statistics
WorkflowServiceApi get_artifact GET /apis/v1beta1/{namespace}/workflow_executions/{uid}/artifacts/{key}
WorkflowServiceApi get_workflow_execution GET /apis/v1beta1/{namespace}/workflow_executions/{uid}
WorkflowServiceApi get_workflow_execution_logs GET /apis/v1beta1/{namespace}/workflow_executions/{uid}/pods/{podName}/containers/{containerName}/logs
WorkflowServiceApi get_workflow_execution_metrics GET /apis/v1beta1/{namespace}/workflow_executions/{uid}/pods/{podName}/metrics
WorkflowServiceApi get_workflow_execution_statistics_for_namespace GET /apis/v1beta1/{namespace}/workflow_executions/statistics
WorkflowServiceApi list_files GET /apis/v1beta1/{namespace}/workflow_executions/{uid}/files/{path}
WorkflowServiceApi list_workflow_executions GET /apis/v1beta1/{namespace}/workflow_executions
WorkflowServiceApi resubmit_workflow_execution PUT /apis/v1beta1/{namespace}/workflow_executions/{uid}/resubmit
WorkflowServiceApi terminate_workflow_execution PUT /apis/v1beta1/{namespace}/workflow_executions/{uid}/terminate
WorkflowServiceApi update_workflow_execution_status PUT /apis/v1beta1/{namespace}/workflow_executions/{uid}/status
WorkflowServiceApi watch_workflow_execution GET /apis/v1beta1/{namespace}/workflow_executions/{uid}/watch
WorkflowTemplateServiceApi archive_workflow_template PUT /apis/v1beta1/{namespace}/workflow_templates/{uid}/archive
WorkflowTemplateServiceApi clone_workflow_template GET /apis/v1beta1/{namespace}/workflow_templates/{uid}/clone/{name}
WorkflowTemplateServiceApi clone_workflow_template2 GET /apis/v1beta1/{namespace}/workflow_templates/{uid}/clone/{name}/{version}
WorkflowTemplateServiceApi create_workflow_template POST /apis/v1beta1/{namespace}/workflow_templates
WorkflowTemplateServiceApi create_workflow_template_version POST /apis/v1beta1/{namespace}/workflow_templates/{workflowTemplate.uid}/versions
WorkflowTemplateServiceApi get_workflow_template GET /apis/v1beta1/{namespace}/workflow_templates/{uid}
WorkflowTemplateServiceApi get_workflow_template2 GET /apis/v1beta1/{namespace}/workflow_templates/{uid}/versions/{version}
WorkflowTemplateServiceApi list_workflow_template_versions GET /apis/v1beta1/{namespace}/workflow_templates/{uid}/versions
WorkflowTemplateServiceApi list_workflow_templates GET /apis/v1beta1/{namespace}/workflow_templates
WorkspaceServiceApi create_workspace POST /apis/v1beta1/{namespace}/workspaces
WorkspaceServiceApi delete_workspace DELETE /apis/v1beta1/{namespace}/workspaces/{uid}
WorkspaceServiceApi get_workspace GET /apis/v1beta1/{namespace}/workspaces/{uid}
WorkspaceServiceApi get_workspace_statistics_for_namespace GET /apis/v1beta1/{namespace}/workspace/statistics
WorkspaceServiceApi list_workspaces GET /apis/v1beta1/{namespace}/workspaces
WorkspaceServiceApi pause_workspace PUT /apis/v1beta1/{namespace}/workspaces/{uid}/pause
WorkspaceServiceApi resume_workspace PUT /apis/v1beta1/{namespace}/workspaces/{uid}/resume
WorkspaceServiceApi retry_last_workspace_action PUT /apis/v1beta1/{namespace}/workspaces/{uid}/retry
WorkspaceServiceApi update_workspace PUT /apis/v1beta1/{namespace}/workspaces/{uid}
WorkspaceServiceApi update_workspace_status PUT /apis/v1beta1/{namespace}/workspaces/{uid}/status
WorkspaceTemplateServiceApi archive_workspace_template PUT /apis/v1beta1/{namespace}/workspace_templates/{uid}/archive
WorkspaceTemplateServiceApi create_workspace_template POST /apis/v1beta1/{namespace}/workspace_templates
WorkspaceTemplateServiceApi generate_workspace_template_workflow_template POST /apis/v1beta1/{namespace}/workspace_templates/{uid}/workflow_template
WorkspaceTemplateServiceApi get_workspace_template GET /apis/v1beta1/{namespace}/workspace_templates/{uid}
WorkspaceTemplateServiceApi list_workspace_template_versions GET /apis/v1beta1/{namespace}/workspace_templates/{uid}/versions
WorkspaceTemplateServiceApi list_workspace_templates GET /apis/v1beta1/{namespace}/workspace_templates
WorkspaceTemplateServiceApi update_workspace_template PUT /apis/v1beta1/{namespace}/workspace_templates/{uid}

Documentation For Models

Documentation For Authorization

Bearer

  • Type: API key
  • API key parameter name: authorization
  • Location: HTTP header

Author

Packages

No packages published

Languages

  • Python 99.9%
  • Other 0.1%