# GraphDB Python API

No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)

This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:

- API version: 2.0
- Package version: 1.0.0
- Build package: io.swagger.codegen.languages.PythonClientCodegen

## Requirements.

Python 2.7 and 3.4+

## Installation & Usage
### pip install


```sh
pip install git+https://github.com/patzomir/graphdb-python-api.git
```
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/patzomir/graphdb-python-api.git`)

Then import the package:
```python
import graphdb
```

### 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 graphdb
```

## Getting Started

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

### RDF4J API

```python
from __future__ import print_function
import time
from graphdb import rdf4j
from graphdb.rdf4j.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = rdf4j.ContextsApi(rdf4j.ApiClient(configuration))
repository_id = 'repository_id_example' # str | The repository ID

try:
    # Gets a list of resources that are used as context identifiers.
    api_response = api_instance.get_repository_contexts(repository_id)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ContextsApi->get_repository_contexts: %s\n" % e)

```

### GraphDB Workbench API
```python
from __future__ import print_function
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.ClusterManagementControllerApi(swagger_client.ApiClient(configuration))
bean = swagger_client.WorkerCloneBean() # WorkerCloneBean | bean

try:
    # Clone a worker
    api_response = api_instance.clone_worker_using_post(bean)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ClusterManagementControllerApi->clone_worker_using_post: %s\n" % e)

```
## Documentation for API Endpoints

All URIs are relative to *https://localhost*

### RDF4J

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ContextsApi* | [**get_repository_contexts**](docs/rdf4j/ContextsApi.md#get_repository_contexts) | **GET** /repositories/{repositoryID}/contexts | Gets a list of resources that are used as context identifiers.
*GraphStoreApi* | [**add_statements_to_indirect_namedgraph**](docs/rdf4j/GraphStoreApi.md#add_statements_to_indirect_namedgraph) | **POST** /repositories/{repositoryID}/rdf-graphs/service | Add statements to an INDIRECTLY referenced named graph
*GraphStoreApi* | [**add_statements_to_namedgraph**](docs/rdf4j/GraphStoreApi.md#add_statements_to_namedgraph) | **POST** /repositories/{repositoryID}/rdf-graphs/{graph} | Add statements to a DIRECTLY referenced named graph
*GraphStoreApi* | [**delete_statements_from_indirect_namedgraph**](docs/rdf4j/GraphStoreApi.md#delete_statements_from_indirect_namedgraph) | **DELETE** /repositories/{repositoryID}/rdf-graphs/service | Clear an INDIRECTLY referenced named graph
*GraphStoreApi* | [**delete_statements_from_namedgraph**](docs/rdf4j/GraphStoreApi.md#delete_statements_from_namedgraph) | **DELETE** /repositories/{repositoryID}/rdf-graphs/{graph} | Clear a DIRECTLY referenced named graph
*GraphStoreApi* | [**get_all_statements_from_indirect_namedgraph**](docs/rdf4j/GraphStoreApi.md#get_all_statements_from_indirect_namedgraph) | **GET** /repositories/{repositoryID}/rdf-graphs/service | Fetch all statements from an INDIRECTLY referenced named graph
*GraphStoreApi* | [**get_all_statements_from_namedgraph**](docs/rdf4j/GraphStoreApi.md#get_all_statements_from_namedgraph) | **GET** /repositories/{repositoryID}/rdf-graphs/{graph} | Fetch all statements from a DIRECTLY referenced named graph
*NamespacesApi* | [**delete_namespace_for_prefix**](docs/rdf4j/NamespacesApi.md#delete_namespace_for_prefix) | **DELETE** /repositories/{repositoryID}/namespaces/{namespacesPrefix} | Remove namespace for a particular prefix
*NamespacesApi* | [**get_namespace_for_prefix**](docs/rdf4j/NamespacesApi.md#get_namespace_for_prefix) | **GET** /repositories/{repositoryID}/namespaces/{namespacesPrefix} | Get namespace for a particular prefix
*NamespacesApi* | [**set_namespace_for_prefix**](docs/rdf4j/NamespacesApi.md#set_namespace_for_prefix) | **PUT** /repositories/{repositoryID}/namespaces/{namespacesPrefix} | Set namespace for a particular prefix
*ProtocolApi* | [**get_protocol_version**](docs/rdf4j/ProtocolApi.md#get_protocol_version) | **GET** /protocol | Fetch the protocol version
*RepositoriesApi* | [**delete_repository**](docs/rdf4j/RepositoriesApi.md#delete_repository) | **DELETE** /repositories/{repositoryID} | Repository removal
*RepositoriesApi* | [**delete_statements**](docs/rdf4j/RepositoriesApi.md#delete_statements) | **DELETE** /repositories/{repositoryID}/statements | Deletes statements from the repository.
*RepositoriesApi* | [**get_all_repositories**](docs/rdf4j/RepositoriesApi.md#get_all_repositories) | **GET** /repositories | An overview of the repositories that are available on a server.
*RepositoriesApi* | [**get_all_statements**](docs/rdf4j/RepositoriesApi.md#get_all_statements) | **GET** /repositories/{repositoryID}/statements | Fetches statements from the repository.
*RepositoriesApi* | [**get_repository_size**](docs/rdf4j/RepositoriesApi.md#get_repository_size) | **GET** /repositories/{repositoryID}/size | The repository size (defined as the number of statements it contains)
*RepositoriesApi* | [**put_statements**](docs/rdf4j/RepositoriesApi.md#put_statements) | **PUT** /repositories/{repositoryID}/statements | Updates data in the repository, replacing any existing data with the supplied data
*SparqlApi* | [**execute_get_select_query**](docs/rdf4j/SparqlApi.md#execute_get_select_query) | **GET** /repositories/{repositoryID} | Send queries on a specific repository with ID. This resource represents a SPARQL query endpoint
*SparqlApi* | [**update**](docs/rdf4j/SparqlApi.md#update) | **POST** /repositories/{repositoryID}/statements | Performs updates on the data in the repository
*TransactionsApi* | [**execute_transaction_action**](docs/rdf4j/TransactionsApi.md#execute_transaction_action) | **PUT** /repositories/{repositoryID}/transactions/{transactionID} | Execute a transaction action
*TransactionsApi* | [**rollback_transaction**](docs/rdf4j/TransactionsApi.md#rollback_transaction) | **DELETE** /repositories/{repositoryID}/transactions/{transactionID} | Abort a transaction
*TransactionsApi* | [**start_new_transaction**](docs/rdf4j/TransactionsApi.md#start_new_transaction) | **POST** /repositories/{repositoryID}/transactions | Start a new transaction

### GraphDB Workbench

Class | Method | HTTP request | Description
------------ | ------------- | ------------- | -------------
*ClusterManagementControllerApi* | [**clone_worker_using_post**](docs/graphdb_workbench/ClusterManagementControllerApi.md#clone_worker_using_post) | **POST** /rest/cluster/nodes/clone | Clone a worker
*ClusterManagementControllerApi* | [**connect_masters_using_post**](docs/graphdb_workbench/ClusterManagementControllerApi.md#connect_masters_using_post) | **POST** /rest/cluster/masters/{masterRepositoryId}/peers | Connect two masters
*ClusterManagementControllerApi* | [**connect_worker_using_post**](docs/graphdb_workbench/ClusterManagementControllerApi.md#connect_worker_using_post) | **POST** /rest/cluster/masters/{masterRepositoryId}/workers | Connect a worker to a master
*ClusterManagementControllerApi* | [**disconnect_masters_using_delete**](docs/graphdb_workbench/ClusterManagementControllerApi.md#disconnect_masters_using_delete) | **DELETE** /rest/cluster/masters/{masterRepositoryId}/peers | Disconnect two masters
*ClusterManagementControllerApi* | [**disconnect_worker_using_delete**](docs/graphdb_workbench/ClusterManagementControllerApi.md#disconnect_worker_using_delete) | **DELETE** /rest/cluster/masters/{masterRepositoryId}/workers | Disconnect a worker from a master
*ClusterManagementControllerApi* | [**do_backup_using_get**](docs/graphdb_workbench/ClusterManagementControllerApi.md#do_backup_using_get) | **GET** /rest/cluster/masters/{masterRepositoryId}/backup | Initiate a cluster backup
*ClusterManagementControllerApi* | [**do_restore_using_get**](docs/graphdb_workbench/ClusterManagementControllerApi.md#do_restore_using_get) | **GET** /rest/cluster/masters/{masterRepositoryId}/restore | Initiate a cluster restore
*ClusterManagementControllerApi* | [**get_master_using_get**](docs/graphdb_workbench/ClusterManagementControllerApi.md#get_master_using_get) | **GET** /rest/cluster/masters/{masterRepositoryId} | Get information about a master
*ClusterManagementControllerApi* | [**get_workers_for_master_using_get**](docs/graphdb_workbench/ClusterManagementControllerApi.md#get_workers_for_master_using_get) | **GET** /rest/cluster/masters/{masterRepositoryId}/workers | Get workers connected to a master
*ClusterManagementControllerApi* | [**set_master_using_post**](docs/graphdb_workbench/ClusterManagementControllerApi.md#set_master_using_post) | **POST** /rest/cluster/masters/{masterRepositoryId} | Set master attribute
*ImportControllerApi* | [**import_server_file_using_post**](docs/graphdb_workbench/ImportControllerApi.md#import_server_file_using_post) | **POST** /rest/data/import/server/{repositoryID} | Import a server file into the repository
*ImportControllerApi* | [**import_url_upload_using_post**](docs/graphdb_workbench/ImportControllerApi.md#import_url_upload_using_post) | **POST** /rest/data/import/upload/{repositoryID}/url | Import from data URL into the repository
*ImportControllerApi* | [**interrupt_server_import_using_delete**](docs/graphdb_workbench/ImportControllerApi.md#interrupt_server_import_using_delete) | **DELETE** /rest/data/import/server/{repositoryID} | Cancel server file import operation
*ImportControllerApi* | [**list_server_files_using_get**](docs/graphdb_workbench/ImportControllerApi.md#list_server_files_using_get) | **GET** /rest/data/import/server/{repositoryID} | Get server files available for import
*LocationManagementControllerApi* | [**activate_location_using_post**](docs/graphdb_workbench/LocationManagementControllerApi.md#activate_location_using_post) | **POST** /rest/locations/activate | Activate a connected GraphDB location
*LocationManagementControllerApi* | [**add_location_using_post**](docs/graphdb_workbench/LocationManagementControllerApi.md#add_location_using_post) | **POST** /rest/locations | Connect to a remote GraphDB location
*LocationManagementControllerApi* | [**change_location_using_put**](docs/graphdb_workbench/LocationManagementControllerApi.md#change_location_using_put) | **PUT** /rest/locations | Modify settings for a connected GraphDB location
*LocationManagementControllerApi* | [**delete_location_using_delete**](docs/graphdb_workbench/LocationManagementControllerApi.md#delete_location_using_delete) | **DELETE** /rest/locations | Disconnect a GraphDB location
*LocationManagementControllerApi* | [**get_active_location_using_get**](docs/graphdb_workbench/LocationManagementControllerApi.md#get_active_location_using_get) | **GET** /rest/locations/active | Get active connected GraphDB location
*LocationManagementControllerApi* | [**get_all_using_get**](docs/graphdb_workbench/LocationManagementControllerApi.md#get_all_using_get) | **GET** /rest/locations | Get all connected GraphDB locations
*LocationManagementControllerApi* | [**set_default_repository_using_post**](docs/graphdb_workbench/LocationManagementControllerApi.md#set_default_repository_using_post) | **POST** /rest/locations/active/default-repository | Set default repository for active GraphDB location
*RepositoryManagementControllerApi* | [**create_repository_using_post**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#create_repository_using_post) | **POST** /rest/repositories | Create a repository in an attached Sesame location (ttl file)
*RepositoryManagementControllerApi* | [**delete_repository_using_delete**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#delete_repository_using_delete) | **DELETE** /rest/repositories/{repositoryID} | Delete a repository in an attached Sesame location
*RepositoryManagementControllerApi* | [**download_repository_config_turtle_using_get**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#download_repository_config_turtle_using_get) | **GET** /rest/repositories/{repositoryID}/download | Download repository configuration as a Turtle file
*RepositoryManagementControllerApi* | [**download_repository_config_zip_using_get**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#download_repository_config_zip_using_get) | **GET** /rest/repositories/{repositoryID}/downloadZip | Download repository configuration as a zip file
*RepositoryManagementControllerApi* | [**edit_repository_using_put**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#edit_repository_using_put) | **PUT** /rest/repositories/{repositoryID} | Edit repository configuration
*RepositoryManagementControllerApi* | [**get_default_config_using_get**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#get_default_config_using_get) | **GET** /rest/repositories/defaultConfig/{repositoryType} | Get the default repository configuration for the repository type
*RepositoryManagementControllerApi* | [**get_repositories_using_get**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#get_repositories_using_get) | **GET** /rest/repositories | Get all repositories in the active location or another location
*RepositoryManagementControllerApi* | [**get_repository_config_json_using_get**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#get_repository_config_json_using_get) | **GET** /rest/repositories/{repositoryID} | Get repository configuration as JSON
*RepositoryManagementControllerApi* | [**repository_size_using_get**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#repository_size_using_get) | **GET** /rest/repositories/{repositoryID}/size | Get repository size
*RepositoryManagementControllerApi* | [**restart_repository_using_post**](docs/graphdb_workbench/RepositoryManagementControllerApi.md#restart_repository_using_post) | **POST** /rest/repositories/{repositoryID}/restart | Restart a repository
*SavedQueriesControllerApi* | [**create_query_using_post**](docs/graphdb_workbench/SavedQueriesControllerApi.md#create_query_using_post) | **POST** /rest/sparql/saved-queries | Create a new saved query
*SavedQueriesControllerApi* | [**delete_sample_query_using_delete**](docs/graphdb_workbench/SavedQueriesControllerApi.md#delete_sample_query_using_delete) | **DELETE** /rest/sparql/saved-queries | Delete an existing saved query
*SavedQueriesControllerApi* | [**edit_sample_query_using_put**](docs/graphdb_workbench/SavedQueriesControllerApi.md#edit_sample_query_using_put) | **PUT** /rest/sparql/saved-queries | Edit an existing saved query
*SavedQueriesControllerApi* | [**get_queries_using_get**](docs/graphdb_workbench/SavedQueriesControllerApi.md#get_queries_using_get) | **GET** /rest/sparql/saved-queries | Get all saved queries visible for the user or single saved query by name and owner.
*SecurityManagementControllerApi* | [**change_user_settings_using_patch**](docs/graphdb_workbench/SecurityManagementControllerApi.md#change_user_settings_using_patch) | **PATCH** /rest/security/user/** | Change settings for a user
*SecurityManagementControllerApi* | [**create_user_using_post**](docs/graphdb_workbench/SecurityManagementControllerApi.md#create_user_using_post) | **POST** /rest/security/user/** | Create a user
*SecurityManagementControllerApi* | [**delete_user_using_delete**](docs/graphdb_workbench/SecurityManagementControllerApi.md#delete_user_using_delete) | **DELETE** /rest/security/user/** | Delete a user
*SecurityManagementControllerApi* | [**edit_user_using_put**](docs/graphdb_workbench/SecurityManagementControllerApi.md#edit_user_using_put) | **PUT** /rest/security/user/** | Edit a user
*SecurityManagementControllerApi* | [**get_all_users_using_get**](docs/graphdb_workbench/SecurityManagementControllerApi.md#get_all_users_using_get) | **GET** /rest/security/user | Get all users
*SecurityManagementControllerApi* | [**get_user_using_get**](docs/graphdb_workbench/SecurityManagementControllerApi.md#get_user_using_get) | **GET** /rest/security/user/** | Get a user
*SecurityManagementControllerApi* | [**is_enabled_free_access_using_get**](docs/graphdb_workbench/SecurityManagementControllerApi.md#is_enabled_free_access_using_get) | **GET** /rest/security/freeaccess | Check if free access is enabled
*SecurityManagementControllerApi* | [**is_enabled_security_using_get**](docs/graphdb_workbench/SecurityManagementControllerApi.md#is_enabled_security_using_get) | **GET** /rest/security | Check if security is enabled
*SecurityManagementControllerApi* | [**set_enable_free_access_using_post**](docs/graphdb_workbench/SecurityManagementControllerApi.md#set_enable_free_access_using_post) | **POST** /rest/security/freeaccess | Enable or disable free access
*SecurityManagementControllerApi* | [**set_enable_security_using_post**](docs/graphdb_workbench/SecurityManagementControllerApi.md#set_enable_security_using_post) | **POST** /rest/security | Enable or disable security
*SparqlTemplateControllerApi* | [**create_sparql_template_using_post**](docs/graphdb_workbench/SparqlTemplateControllerApi.md#create_sparql_template_using_post) | **POST** /rest/sparql-template/create | Create a new SPARQL template
*SparqlTemplateControllerApi* | [**delete_sparql_template_using_delete**](docs/graphdb_workbench/SparqlTemplateControllerApi.md#delete_sparql_template_using_delete) | **DELETE** /rest/sparql-template/delete | Delete an existing SPARQL template
*SparqlTemplateControllerApi* | [**get_sparql_template_content_using_get**](docs/graphdb_workbench/SparqlTemplateControllerApi.md#get_sparql_template_content_using_get) | **GET** /rest/sparql-template/configuration | Get a SPARQL template configuration
*SparqlTemplateControllerApi* | [**get_sparql_template_i_ds_using_get**](docs/graphdb_workbench/SparqlTemplateControllerApi.md#get_sparql_template_i_ds_using_get) | **GET** /rest/sparql-template | Get IDs of all configured SPARQL templates per current active repository
*SparqlTemplateControllerApi* | [**update_sparql_template_using_put**](docs/graphdb_workbench/SparqlTemplateControllerApi.md#update_sparql_template_using_put) | **PUT** /rest/sparql-template/edit | Edit an existing SPARQL template
*SqlViewsControllerApi* | [**create_sql_view_using_post**](docs/graphdb_workbench/SqlViewsControllerApi.md#create_sql_view_using_post) | **POST** /rest/sql-views/tables | Create a new SQL view
*SqlViewsControllerApi* | [**delete_sql_view_using_delete**](docs/graphdb_workbench/SqlViewsControllerApi.md#delete_sql_view_using_delete) | **DELETE** /rest/sql-views/tables/{name} | Delete an existing saved query
*SqlViewsControllerApi* | [**get_sql_view_names_using_get**](docs/graphdb_workbench/SqlViewsControllerApi.md#get_sql_view_names_using_get) | **GET** /rest/sql-views/tables | Get all SQL view names for current repository.
*SqlViewsControllerApi* | [**get_sql_view_using_get**](docs/graphdb_workbench/SqlViewsControllerApi.md#get_sql_view_using_get) | **GET** /rest/sql-views/tables/{name} | Get a SQL view configuration.
*SqlViewsControllerApi* | [**update_sql_view_using_put**](docs/graphdb_workbench/SqlViewsControllerApi.md#update_sql_view_using_put) | **PUT** /rest/sql-views/tables/{name} | Edit an existing SQL view
*StatelessLoginControllerApi* | [**login_using_post**](docs/graphdb_workbench/StatelessLoginControllerApi.md#login_using_post) | **POST** /rest/login/** | Authenticate user with a password


## Documentation For Models

 - [AccessBean](docs/graphdb_workbench/AccessBean.md)
 - [Account](docs/graphdb_workbench/Account.md)
 - [DefaultRepositoryLocation](docs/graphdb_workbench/DefaultRepositoryLocation.md)
 - [GraphDBRepository](docs/graphdb_workbench/GraphDBRepository.md)
 - [ImportSettings](docs/graphdb_workbench/ImportSettings.md)
 - [Location](docs/graphdb_workbench/Location.md)
 - [LocationUri](docs/graphdb_workbench/LocationUri.md)
 - [MasterConnectBean](docs/graphdb_workbench/MasterConnectBean.md)
 - [MasterNode](docs/graphdb_workbench/MasterNode.md)
 - [OwlimParameter](docs/graphdb_workbench/OwlimParameter.md)
 - [ParserSettings](docs/graphdb_workbench/ParserSettings.md)
 - [RepositoryConfigBean](docs/graphdb_workbench/RepositoryConfigBean.md)
 - [RepositorySizeInfo](docs/graphdb_workbench/RepositorySizeInfo.md)
 - [SavedQuery](docs/graphdb_workbench/SavedQuery.md)
 - [ServerImportBody](docs/graphdb_workbench/ServerImportBody.md)
 - [SparqlTemplate](docs/graphdb_workbench/SparqlTemplate.md)
 - [SqlColumn](docs/graphdb_workbench/SqlColumn.md)
 - [SqlView](docs/graphdb_workbench/SqlView.md)
 - [UpdatedLocation](docs/graphdb_workbench/UpdatedLocation.md)
 - [UserDetails](docs/graphdb_workbench/UserDetails.md)
 - [WorkerCloneBean](docs/graphdb_workbench/WorkerCloneBean.md)
 - [WorkerConnectBean](docs/graphdb_workbench/WorkerConnectBean.md)
 - [WorkerNode](docs/graphdb_workbench/WorkerNode.md)


## Documentation For Authorization

 All endpoints do not require authorization.


## Author



