# algorithmia-api-client
APIs for managing actions on the Algorithmia platform

This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 1.0.1
- Package version: 1.2.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
For more information, please visit [https://algorithmia.com/contact](https://algorithmia.com/contact)

## 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:

```sh
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:
```python
import algorithmia_api_client
```

### Setuptools

Install via [Setuptools](http://pypi.python.org/pypi/setuptools).

```sh
python setup.py install --user
```
(or `sudo python setup.py install` to install the package for all users)

Then import the package:
```python
import algorithmia_api_client
```

## Getting Started

Please follow the [installation procedure](#installation--usage) and then run the following:

```python
from __future__ import print_function
import time
import algorithmia_api_client
from algorithmia_api_client.rest import ApiException
from pprint import pprint

configuration = algorithmia_api_client.Configuration()
# Configure API key authorization: AdminApiKeyAuth
configuration.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'

# Defining host is optional and default to https://api.algorithmia.com/v1
configuration.host = "https://api.algorithmia.com/v1"
# Enter a context with an instance of the API client
with algorithmia_api_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = algorithmia_api_client.DefaultApi(api_client)
    org_name = 'org_name_example' # str | Organization name
username = 'username_example' # str | The user's username

    try:
        # Add a user as a member of a given organization
        api_instance.add_organization_member(org_name, username)
    except ApiException as e:
        print("Exception when calling DefaultApi->add_organization_member: %s\n" % e)
    
```

## Documentation for API Endpoints

All URIs are relative to *https://api.algorithmia.com/v1*

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*DefaultApi* | [**add_organization_member**](docs/DefaultApi.md#add_organization_member) | **PUT** /organizations/{orgName}/members/{username} | Add a user as a member of a given organization
*DefaultApi* | [**algo_username_algoname_algo_callable_version_post**](docs/DefaultApi.md#algo_username_algoname_algo_callable_version_post) | **POST** /algo/{username}/{algoname}/{algoCallableVersion} | Invoke Algorithm
*DefaultApi* | [**algorithms_username_algoname_compile_post**](docs/DefaultApi.md#algorithms_username_algoname_compile_post) | **POST** /algorithms/{username}/{algoname}/compile | Compile algorithm
*DefaultApi* | [**commit_log_for_repository**](docs/DefaultApi.md#commit_log_for_repository) | **GET** /algorithms/{username}/{algoname}/log | Gets the list of commits for a repository
*DefaultApi* | [**complete_scm_authorization**](docs/DefaultApi.md#complete_scm_authorization) | **GET** /scms/{scmId}/oauth/finish | Complete SCM Authorization
*DefaultApi* | [**connector_connector_id_connector_path_delete**](docs/DefaultApi.md#connector_connector_id_connector_path_delete) | **DELETE** /connector/{connectorId}/{connectorPath} | Delete Directory or File
*DefaultApi* | [**create_algorithm**](docs/DefaultApi.md#create_algorithm) | **POST** /algorithms/{username} | Create Algorithm
*DefaultApi* | [**create_directory**](docs/DefaultApi.md#create_directory) | **POST** /connector/{connectorId}/{connectorPath} | Create Directory
*DefaultApi* | [**create_organization**](docs/DefaultApi.md#create_organization) | **POST** /organizations | Creates an Organization owned by the caller
*DefaultApi* | [**create_scm**](docs/DefaultApi.md#create_scm) | **POST** /admin/scms | Create an SCM
*DefaultApi* | [**create_user**](docs/DefaultApi.md#create_user) | **POST** /users | Creates an Algorithmia user in the system
*DefaultApi* | [**delete_algorithm**](docs/DefaultApi.md#delete_algorithm) | **DELETE** /algorithms/{username}/{algoname} | Delete Algorithm
*DefaultApi* | [**delete_config_entry**](docs/DefaultApi.md#delete_config_entry) | **DELETE** /config/frontend/{keyname} | Delete a config entry represented by the provided keyname
*DefaultApi* | [**delete_favicon**](docs/DefaultApi.md#delete_favicon) | **DELETE** /config/favicon | Delete favicon for the Algorithmia instance
*DefaultApi* | [**delete_logo**](docs/DefaultApi.md#delete_logo) | **DELETE** /config/logo | Delete logo for the Algorithmia instance
*DefaultApi* | [**delete_organization**](docs/DefaultApi.md#delete_organization) | **DELETE** /organizations/{orgName} | Delete an organization
*DefaultApi* | [**delete_scm**](docs/DefaultApi.md#delete_scm) | **DELETE** /admin/scms/{scmId} | Delete an SCM
*DefaultApi* | [**delete_user**](docs/DefaultApi.md#delete_user) | **DELETE** /users/{username} | Delete a user represented by the provided username
*DefaultApi* | [**get_algorithm**](docs/DefaultApi.md#get_algorithm) | **GET** /algorithms/{username}/{algoname} | Get Algorithm
*DefaultApi* | [**get_algorithm_build_by_id**](docs/DefaultApi.md#get_algorithm_build_by_id) | **GET** /algorithms/{username}/{algoname}/builds/{buildid} | Get individual algorithm build by ID
*DefaultApi* | [**get_algorithm_build_logs**](docs/DefaultApi.md#get_algorithm_build_logs) | **GET** /algorithms/{username}/{algoname}/builds/{buildid}/logs | Get Algorithm build logs
*DefaultApi* | [**get_algorithm_builds**](docs/DefaultApi.md#get_algorithm_builds) | **GET** /algorithms/{username}/{algoname}/builds | Get Algorithm builds
*DefaultApi* | [**get_algorithm_hash_version**](docs/DefaultApi.md#get_algorithm_hash_version) | **GET** /algorithms/{username}/{algoname}/versions/{algohash} | Get Algorithm by Hash Version
*DefaultApi* | [**get_algorithm_scm_connection_status**](docs/DefaultApi.md#get_algorithm_scm_connection_status) | **GET** /algorithms/{username}/{algoname}/scm/status | Get Algorithm SCM Connection Status
*DefaultApi* | [**get_algorithm_usage_result**](docs/DefaultApi.md#get_algorithm_usage_result) | **GET** /admin/usage/algorithms | 
*DefaultApi* | [**get_algorithm_versions**](docs/DefaultApi.md#get_algorithm_versions) | **GET** /algorithms/{username}/{algoname}/versions | Get Algorithm versions
*DefaultApi* | [**get_config_entry**](docs/DefaultApi.md#get_config_entry) | **GET** /config/frontend/{keyname} | Get a frontend config entry represeted by the provided keyname
*DefaultApi* | [**get_favicon**](docs/DefaultApi.md#get_favicon) | **GET** /config/favicon | Get favicon for the Algorithmia instance
*DefaultApi* | [**get_file_or_directory**](docs/DefaultApi.md#get_file_or_directory) | **GET** /connector/{connectorId}/{connectorPath} | Get Directory or File Contents
*DefaultApi* | [**get_frontend_config_entries**](docs/DefaultApi.md#get_frontend_config_entries) | **GET** /config/frontend | Lists all frontend configuration values
*DefaultApi* | [**get_full_usage**](docs/DefaultApi.md#get_full_usage) | **GET** /admin/usage | 
*DefaultApi* | [**get_logo**](docs/DefaultApi.md#get_logo) | **GET** /config/logo | Get logo for the Algorithmia instance
*DefaultApi* | [**get_organization**](docs/DefaultApi.md#get_organization) | **GET** /organizations/{orgName} | Get an organization represented by the provided orgName
*DefaultApi* | [**get_organizations**](docs/DefaultApi.md#get_organizations) | **GET** /organizations | Lists all organizations
*DefaultApi* | [**get_scm**](docs/DefaultApi.md#get_scm) | **GET** /scms/{scmId} | Get SCM
*DefaultApi* | [**get_scm_status**](docs/DefaultApi.md#get_scm_status) | **GET** /scms/{scmId}/oauth/status | Get SCM Authorization Status
*DefaultApi* | [**get_user**](docs/DefaultApi.md#get_user) | **GET** /users/{username} | Get a user represented by the provided username
*DefaultApi* | [**get_user_usage_result**](docs/DefaultApi.md#get_user_usage_result) | **GET** /admin/usage/users | 
*DefaultApi* | [**get_users**](docs/DefaultApi.md#get_users) | **GET** /users | Lists all managed users
*DefaultApi* | [**initiate_scm_authorization**](docs/DefaultApi.md#initiate_scm_authorization) | **GET** /scms/{scmId}/oauth/start | Initiate SCM Authorization
*DefaultApi* | [**list_members**](docs/DefaultApi.md#list_members) | **GET** /organizations/{orgName}/members | List of members with their roles in a given organization
*DefaultApi* | [**list_scms**](docs/DefaultApi.md#list_scms) | **GET** /scms | List SCMs
*DefaultApi* | [**publish_algorithm**](docs/DefaultApi.md#publish_algorithm) | **POST** /algorithms/{username}/{algoname}/versions | Publish Algorithm
*DefaultApi* | [**receive_scm_repository_event**](docs/DefaultApi.md#receive_scm_repository_event) | **POST** /algorithms/{username}/{algoname}/scm/webhook | Receiver of all SCM repository events
*DefaultApi* | [**remove_organization_member**](docs/DefaultApi.md#remove_organization_member) | **DELETE** /organizations/{orgName}/members/{username} | Remove a user from an organization
*DefaultApi* | [**revoke_scm_authorization**](docs/DefaultApi.md#revoke_scm_authorization) | **POST** /scms/{scmId}/oauth/revoke | Revoke SCM Authorization
*DefaultApi* | [**set_default_scm**](docs/DefaultApi.md#set_default_scm) | **POST** /admin/scms/{scmId}/default | Set Default SCM
*DefaultApi* | [**update_algorithm**](docs/DefaultApi.md#update_algorithm) | **PUT** /algorithms/{username}/{algoname} | Update Algorithm
*DefaultApi* | [**update_config_entry**](docs/DefaultApi.md#update_config_entry) | **PUT** /config/frontend/{keyname} | Update or insert a config entry represented by the provided keyname
*DefaultApi* | [**update_directory_acl**](docs/DefaultApi.md#update_directory_acl) | **PATCH** /connector/{connectorId}/{connectorPath} | Update Directory
*DefaultApi* | [**update_favicon**](docs/DefaultApi.md#update_favicon) | **POST** /config/favicon | Update favicon for the Algorithmia instance
*DefaultApi* | [**update_logo**](docs/DefaultApi.md#update_logo) | **POST** /config/logo | Update logo for the Algorithmia instance
*DefaultApi* | [**update_scm**](docs/DefaultApi.md#update_scm) | **PATCH** /admin/scms/{scmId} | Update an SCM
*DefaultApi* | [**update_user**](docs/DefaultApi.md#update_user) | **PUT** /users/{username} | Update a user represented by the provided username
*DefaultApi* | [**upload_file**](docs/DefaultApi.md#upload_file) | **PUT** /connector/{connectorId}/{connectorPath} | Upload File
*DefaultApi* | [**verify_file_existence**](docs/DefaultApi.md#verify_file_existence) | **HEAD** /connector/{connectorId}/{connectorPath} | Verify File Existence


## Documentation For Models

 - [AlgorithmAsynchronousInvocationResult](docs/AlgorithmAsynchronousInvocationResult.md)
 - [AlgorithmCallability](docs/AlgorithmCallability.md)
 - [AlgorithmSynchronousInvocationResult](docs/AlgorithmSynchronousInvocationResult.md)
 - [AlgorithmSynchronousInvocationResultError](docs/AlgorithmSynchronousInvocationResultError.md)
 - [AlgorithmSynchronousInvocationResultMetadata](docs/AlgorithmSynchronousInvocationResultMetadata.md)
 - [AlgorithmUsageResult](docs/AlgorithmUsageResult.md)
 - [AlgorithmUsageRow](docs/AlgorithmUsageRow.md)
 - [Build](docs/Build.md)
 - [BuildLogs](docs/BuildLogs.md)
 - [BuildVersionInfo](docs/BuildVersionInfo.md)
 - [Commit](docs/Commit.md)
 - [Compilation](docs/Compilation.md)
 - [CreateRequest](docs/CreateRequest.md)
 - [CreateRequestVersionInfo](docs/CreateRequestVersionInfo.md)
 - [Details](docs/Details.md)
 - [Directory](docs/Directory.md)
 - [DirectoryAcl](docs/DirectoryAcl.md)
 - [Environment](docs/Environment.md)
 - [Error](docs/Error.md)
 - [File](docs/File.md)
 - [FileType](docs/FileType.md)
 - [Folder](docs/Folder.md)
 - [FrontendConfigurationEntry](docs/FrontendConfigurationEntry.md)
 - [FullUsageResult](docs/FullUsageResult.md)
 - [FullUsageRow](docs/FullUsageRow.md)
 - [HashResponse](docs/HashResponse.md)
 - [InlineResponse200](docs/InlineResponse200.md)
 - [InlineResponse2001](docs/InlineResponse2001.md)
 - [InlineResponse2001Error](docs/InlineResponse2001Error.md)
 - [InlineResponse2002](docs/InlineResponse2002.md)
 - [InlineResponse202](docs/InlineResponse202.md)
 - [InlineResponse400](docs/InlineResponse400.md)
 - [Language](docs/Language.md)
 - [License](docs/License.md)
 - [NetworkAccess](docs/NetworkAccess.md)
 - [Organization](docs/Organization.md)
 - [OrganizationMember](docs/OrganizationMember.md)
 - [PagedBuildsList](docs/PagedBuildsList.md)
 - [PagedResultList](docs/PagedResultList.md)
 - [PagedVersionsList](docs/PagedVersionsList.md)
 - [RepositoryCommitLog](docs/RepositoryCommitLog.md)
 - [Scm](docs/Scm.md)
 - [ScmConnectionStatus](docs/ScmConnectionStatus.md)
 - [ScmOAuthConfiguration](docs/ScmOAuthConfiguration.md)
 - [ScmUrls](docs/ScmUrls.md)
 - [ScmUserOAuthStatus](docs/ScmUserOAuthStatus.md)
 - [ScmUserOAuthStatusScmOrganizations](docs/ScmUserOAuthStatusScmOrganizations.md)
 - [Settings](docs/Settings.md)
 - [SettingsMandatory](docs/SettingsMandatory.md)
 - [SettingsPublish](docs/SettingsPublish.md)
 - [Source](docs/Source.md)
 - [SourceCreate](docs/SourceCreate.md)
 - [SourceVisibility](docs/SourceVisibility.md)
 - [UpdateRequest](docs/UpdateRequest.md)
 - [User](docs/User.md)
 - [UserUsageResult](docs/UserUsageResult.md)
 - [UserUsageRow](docs/UserUsageRow.md)
 - [VersionInfo](docs/VersionInfo.md)
 - [VersionInfoPublish](docs/VersionInfoPublish.md)
 - [VersionRequest](docs/VersionRequest.md)
 - [VersionResponse](docs/VersionResponse.md)
 - [VersionType](docs/VersionType.md)


## Documentation For Authorization


## AdminApiKeyAuth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## ApiKeyAuth

- **Type**: API key
- **API key parameter name**: Authorization
- **Location**: HTTP header


## CookieAuth

- **Type**: API key
- **API key parameter name**: ALGO_SESSION{cookieNameSuffix}
- **Location**: 


## GithubAuth

- **Type**: API key
- **API key parameter name**: X-Hub-Signature
- **Location**: HTTP header


## GithubEventIdentification

- **Type**: API key
- **API key parameter name**: X-GitHub-Event
- **Location**: HTTP header


## Author

support@algorithmia.com


