python-argocd

Python client for ArgoCD


Keywords
Swagger, ArgoCD
Install
pip install python-argocd==0.0.1

Documentation

swagger-client

Description of all APIs

This Python package is automatically generated by the Swagger Codegen project:

  • API version: version not set
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen

Requirements.

Python 2.7 and 3.4+

Installation & Usage

pip install

If the python package is hosted on Github, you can install directly from Github

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import argocd 

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 argocd

Getting Started

Please follow the installation procedure and then run the following:

from __future__ import print_function
import time
import argocd
from argocd.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = argocd.AccountServiceApi(argocd.ApiClient(configuration))
resource = 'resource_example' # str | 
action = 'action_example' # str | 
subresource = 'subresource_example' # str | 

try:
    # CanI checks if the current account has permission to perform an action
    api_response = api_instance.account_service_can_i(resource, action, subresource)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountServiceApi->account_service_can_i: %s\n" % e)

# create an instance of the API class
api_instance = argocd.AccountServiceApi(argocd.ApiClient(configuration))
body = argocd.AccountCreateTokenRequest() # AccountCreateTokenRequest | 
name = 'name_example' # str | 

try:
    # CreateToken creates a token
    api_response = api_instance.account_service_create_token(body, name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountServiceApi->account_service_create_token: %s\n" % e)

# create an instance of the API class
api_instance = argocd.AccountServiceApi(argocd.ApiClient(configuration))
name = 'name_example' # str | 
id = 'id_example' # str | 

try:
    # DeleteToken deletes a token
    api_response = api_instance.account_service_delete_token(name, id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountServiceApi->account_service_delete_token: %s\n" % e)

# create an instance of the API class
api_instance = argocd.AccountServiceApi(argocd.ApiClient(configuration))
name = 'name_example' # str | 

try:
    # GetAccount returns an account
    api_response = api_instance.account_service_get_account(name)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountServiceApi->account_service_get_account: %s\n" % e)

# create an instance of the API class
api_instance = argocd.AccountServiceApi(argocd.ApiClient(configuration))

try:
    # ListAccounts returns the list of accounts
    api_response = api_instance.account_service_list_accounts()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountServiceApi->account_service_list_accounts: %s\n" % e)

# create an instance of the API class
api_instance = argocd.AccountServiceApi(argocd.ApiClient(configuration))
body = argocd.AccountUpdatePasswordRequest() # AccountUpdatePasswordRequest | 

try:
    # UpdatePassword updates an account's password to a new value
    api_response = api_instance.account_service_update_password(body)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling AccountServiceApi->account_service_update_password: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to /

Class Method HTTP request Description
AccountServiceApi account_service_can_i GET /api/v1/account/can-i/{resource}/{action}/{subresource} CanI checks if the current account has permission to perform an action
AccountServiceApi account_service_create_token POST /api/v1/account/{name}/token CreateToken creates a token
AccountServiceApi account_service_delete_token DELETE /api/v1/account/{name}/token/{id} DeleteToken deletes a token
AccountServiceApi account_service_get_account GET /api/v1/account/{name} GetAccount returns an account
AccountServiceApi account_service_list_accounts GET /api/v1/account ListAccounts returns the list of accounts
AccountServiceApi account_service_update_password PUT /api/v1/account/password UpdatePassword updates an account's password to a new value
ApplicationServiceApi application_service_create POST /api/v1/applications Create creates an application
ApplicationServiceApi application_service_delete DELETE /api/v1/applications/{name} Delete deletes an application
ApplicationServiceApi application_service_delete_resource DELETE /api/v1/applications/{name}/resource DeleteResource deletes a single application resource
ApplicationServiceApi application_service_get GET /api/v1/applications/{name} Get returns an application by name
ApplicationServiceApi application_service_get_application_sync_windows GET /api/v1/applications/{name}/syncwindows Get returns sync windows of the application
ApplicationServiceApi application_service_get_manifests GET /api/v1/applications/{name}/manifests GetManifests returns application manifests
ApplicationServiceApi application_service_get_manifests_with_files POST /api/v1/applications/manifestsWithFiles GetManifestsWithFiles returns application manifests using provided files to generate them
ApplicationServiceApi application_service_get_resource GET /api/v1/applications/{name}/resource GetResource returns single application resource
ApplicationServiceApi application_service_list GET /api/v1/applications List returns list of applications
ApplicationServiceApi application_service_list_links GET /api/v1/applications/{name}/links ListLinks returns the list of all application deep links
ApplicationServiceApi application_service_list_resource_actions GET /api/v1/applications/{name}/resource/actions ListResourceActions returns list of resource actions
ApplicationServiceApi application_service_list_resource_events GET /api/v1/applications/{name}/events ListResourceEvents returns a list of event resources
ApplicationServiceApi application_service_list_resource_links GET /api/v1/applications/{name}/resource/links ListResourceLinks returns the list of all resource deep links
ApplicationServiceApi application_service_managed_resources GET /api/v1/applications/{applicationName}/managed-resources ManagedResources returns list of managed resources
ApplicationServiceApi application_service_patch PATCH /api/v1/applications/{name} Patch patch an application
ApplicationServiceApi application_service_patch_resource POST /api/v1/applications/{name}/resource PatchResource patch single application resource
ApplicationServiceApi application_service_pod_logs GET /api/v1/applications/{name}/pods/{podName}/logs PodLogs returns stream of log entries for the specified pod. Pod
ApplicationServiceApi application_service_pod_logs2 GET /api/v1/applications/{name}/logs PodLogs returns stream of log entries for the specified pod. Pod
ApplicationServiceApi application_service_resource_tree GET /api/v1/applications/{applicationName}/resource-tree ResourceTree returns resource tree
ApplicationServiceApi application_service_revision_chart_details GET /api/v1/applications/{name}/revisions/{revision}/chartdetails Get the chart metadata (description, maintainers, home) for a specific revision of the application
ApplicationServiceApi application_service_revision_metadata GET /api/v1/applications/{name}/revisions/{revision}/metadata Get the meta-data (author, date, tags, message) for a specific revision of the application
ApplicationServiceApi application_service_rollback POST /api/v1/applications/{name}/rollback Rollback syncs an application to its target state
ApplicationServiceApi application_service_run_resource_action POST /api/v1/applications/{name}/resource/actions RunResourceAction run resource action
ApplicationServiceApi application_service_sync POST /api/v1/applications/{name}/sync Sync syncs an application to its target state
ApplicationServiceApi application_service_terminate_operation DELETE /api/v1/applications/{name}/operation TerminateOperation terminates the currently running operation
ApplicationServiceApi application_service_update PUT /api/v1/applications/{application.metadata.name} Update updates an application
ApplicationServiceApi application_service_update_spec PUT /api/v1/applications/{name}/spec UpdateSpec updates an application spec
ApplicationServiceApi application_service_watch GET /api/v1/stream/applications Watch returns stream of application change events
ApplicationServiceApi application_service_watch_resource_tree GET /api/v1/stream/applications/{applicationName}/resource-tree Watch returns stream of application resource tree
ApplicationSetServiceApi application_set_service_create POST /api/v1/applicationsets Create creates an applicationset
ApplicationSetServiceApi application_set_service_delete DELETE /api/v1/applicationsets/{name} Delete deletes an application set
ApplicationSetServiceApi application_set_service_get GET /api/v1/applicationsets/{name} Get returns an applicationset by name
ApplicationSetServiceApi application_set_service_list GET /api/v1/applicationsets List returns list of applicationset
CertificateServiceApi certificate_service_create_certificate POST /api/v1/certificates Creates repository certificates on the server
CertificateServiceApi certificate_service_delete_certificate DELETE /api/v1/certificates Delete the certificates that match the RepositoryCertificateQuery
CertificateServiceApi certificate_service_list_certificates GET /api/v1/certificates List all available repository certificates
ClusterServiceApi cluster_service_create POST /api/v1/clusters Create creates a cluster
ClusterServiceApi cluster_service_delete DELETE /api/v1/clusters/{id.value} Delete deletes a cluster
ClusterServiceApi cluster_service_get GET /api/v1/clusters/{id.value} Get returns a cluster by server address
ClusterServiceApi cluster_service_invalidate_cache POST /api/v1/clusters/{id.value}/invalidate-cache InvalidateCache invalidates cluster cache
ClusterServiceApi cluster_service_list GET /api/v1/clusters List returns list of clusters
ClusterServiceApi cluster_service_rotate_auth POST /api/v1/clusters/{id.value}/rotate-auth RotateAuth rotates the bearer token used for a cluster
ClusterServiceApi cluster_service_update PUT /api/v1/clusters/{id.value} Update updates a cluster
GPGKeyServiceApi g_pg_key_service_create POST /api/v1/gpgkeys Create one or more GPG public keys in the server's configuration
GPGKeyServiceApi g_pg_key_service_delete DELETE /api/v1/gpgkeys Delete specified GPG public key from the server's configuration
GPGKeyServiceApi g_pg_key_service_get GET /api/v1/gpgkeys/{keyID} Get information about specified GPG public key from the server
GPGKeyServiceApi g_pg_key_service_list GET /api/v1/gpgkeys List all available repository certificates
NotificationServiceApi notification_service_list_services GET /api/v1/notifications/services List returns list of services
NotificationServiceApi notification_service_list_templates GET /api/v1/notifications/templates List returns list of templates
NotificationServiceApi notification_service_list_triggers GET /api/v1/notifications/triggers List returns list of triggers
ProjectServiceApi project_service_create POST /api/v1/projects Create a new project
ProjectServiceApi project_service_create_token POST /api/v1/projects/{project}/roles/{role}/token Create a new project token
ProjectServiceApi project_service_delete DELETE /api/v1/projects/{name} Delete deletes a project
ProjectServiceApi project_service_delete_token DELETE /api/v1/projects/{project}/roles/{role}/token/{iat} Delete a new project token
ProjectServiceApi project_service_get GET /api/v1/projects/{name} Get returns a project by name
ProjectServiceApi project_service_get_detailed_project GET /api/v1/projects/{name}/detailed GetDetailedProject returns a project that include project, global project and scoped resources by name
ProjectServiceApi project_service_get_global_projects GET /api/v1/projects/{name}/globalprojects Get returns a virtual project by name
ProjectServiceApi project_service_get_sync_windows_state GET /api/v1/projects/{name}/syncwindows GetSchedulesState returns true if there are any active sync syncWindows
ProjectServiceApi project_service_list GET /api/v1/projects List returns list of projects
ProjectServiceApi project_service_list_events GET /api/v1/projects/{name}/events ListEvents returns a list of project events
ProjectServiceApi project_service_list_links GET /api/v1/projects/{name}/links ListLinks returns all deep links for the particular project
ProjectServiceApi project_service_update PUT /api/v1/projects/{project.metadata.name} Update updates a project
RepoCredsServiceApi repo_creds_service_create_repository_credentials POST /api/v1/repocreds CreateRepositoryCredentials creates a new repository credential set
RepoCredsServiceApi repo_creds_service_delete_repository_credentials DELETE /api/v1/repocreds/{url} DeleteRepositoryCredentials deletes a repository credential set from the configuration
RepoCredsServiceApi repo_creds_service_list_repository_credentials GET /api/v1/repocreds ListRepositoryCredentials gets a list of all configured repository credential sets
RepoCredsServiceApi repo_creds_service_update_repository_credentials PUT /api/v1/repocreds/{creds.url} UpdateRepositoryCredentials updates a repository credential set
RepositoryServiceApi repository_service_create_repository POST /api/v1/repositories CreateRepository creates a new repository configuration
RepositoryServiceApi repository_service_delete_repository DELETE /api/v1/repositories/{repo} DeleteRepository deletes a repository from the configuration
RepositoryServiceApi repository_service_get GET /api/v1/repositories/{repo} Get returns a repository or its credentials
RepositoryServiceApi repository_service_get_app_details POST /api/v1/repositories/{source.repoURL}/appdetails GetAppDetails returns application details by given path
RepositoryServiceApi repository_service_get_helm_charts GET /api/v1/repositories/{repo}/helmcharts GetHelmCharts returns list of helm charts in the specified repository
RepositoryServiceApi repository_service_list_apps GET /api/v1/repositories/{repo}/apps ListApps returns list of apps in the repo
RepositoryServiceApi repository_service_list_refs GET /api/v1/repositories/{repo}/refs
RepositoryServiceApi repository_service_list_repositories GET /api/v1/repositories ListRepositories gets a list of all configured repositories
RepositoryServiceApi repository_service_update_repository PUT /api/v1/repositories/{repo.repo} UpdateRepository updates a repository configuration
RepositoryServiceApi repository_service_validate_access POST /api/v1/repositories/{repo}/validate ValidateAccess validates access to a repository with given parameters
SessionServiceApi session_service_create POST /api/v1/session Create a new JWT for authentication and set a cookie if using HTTP
SessionServiceApi session_service_delete DELETE /api/v1/session Delete an existing JWT cookie if using HTTP
SessionServiceApi session_service_get_user_info GET /api/v1/session/userinfo Get the current user's info
SettingsServiceApi settings_service_get GET /api/v1/settings Get returns Argo CD settings
SettingsServiceApi settings_service_get_plugins GET /api/v1/settings/plugins Get returns Argo CD plugins
VersionServiceApi version_service_version GET /api/version Version returns version information of the API server

Documentation For Models

Documentation For Authorization

All endpoints do not require authorization.

Author