All URIs are relative to http://localhost:8080
| Method | HTTP request | Description |
|---|---|---|
| add_databases | POST /api/databases | [DEPRECATED] This endpoint is based on local file paths and will likely be replaced in future versions of this API. |
| create_database | POST /api/databases/{databaseId} | |
| get_custom_databases | GET /api/databases/custom | |
| get_database | GET /api/databases/{databaseId} | |
| get_databases | GET /api/databases | |
| get_included_databases | GET /api/databases/included | |
| import_into_database | POST /api/databases/{databaseId}/import/from-files | Start import of structure and spectra files into the specified database. |
| remove_database | DELETE /api/databases/{databaseId} | |
| update_database | PUT /api/databases/{databaseId} |
List[SearchableDatabase] add_databases(request_body)
[DEPRECATED] This endpoint is based on local file paths and will likely be replaced in future versions of this API.
import PySirius
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
request_body = ['request_body_example'] # List[str] |
try:
# [DEPRECATED] This endpoint is based on local file paths and will likely be replaced in future versions of this API.
api_response = api_instance.add_databases(request_body)
print("The response of SearchableDatabasesApi->add_databases:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->add_databases: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| request_body | List[str] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchableDatabase create_database(database_id, searchable_database_parameters=searchable_database_parameters)
import PySirius
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.models.searchable_database_parameters import SearchableDatabaseParameters
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
database_id = 'database_id_example' # str |
searchable_database_parameters = PySirius.SearchableDatabaseParameters() # SearchableDatabaseParameters | (optional)
try:
api_response = api_instance.create_database(database_id, searchable_database_parameters=searchable_database_parameters)
print("The response of SearchableDatabasesApi->create_database:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->create_database: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| database_id | str | ||
| searchable_database_parameters | SearchableDatabaseParameters | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[SearchableDatabase] get_custom_databases(include_stats=include_stats, include_with_errors=include_with_errors)
import PySirius
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
include_stats = False # bool | (optional) (default to False)
include_with_errors = False # bool | (optional) (default to False)
try:
api_response = api_instance.get_custom_databases(include_stats=include_stats, include_with_errors=include_with_errors)
print("The response of SearchableDatabasesApi->get_custom_databases:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->get_custom_databases: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| include_stats | bool | [optional] [default to False] | |
| include_with_errors | bool | [optional] [default to False] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchableDatabase get_database(database_id, include_stats=include_stats)
import PySirius
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
database_id = 'database_id_example' # str |
include_stats = True # bool | (optional) (default to True)
try:
api_response = api_instance.get_database(database_id, include_stats=include_stats)
print("The response of SearchableDatabasesApi->get_database:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->get_database: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| database_id | str | ||
| include_stats | bool | [optional] [default to True] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[SearchableDatabase] get_databases(include_stats=include_stats, include_with_errors=include_with_errors)
import PySirius
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
include_stats = False # bool | (optional) (default to False)
include_with_errors = False # bool | (optional) (default to False)
try:
api_response = api_instance.get_databases(include_stats=include_stats, include_with_errors=include_with_errors)
print("The response of SearchableDatabasesApi->get_databases:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->get_databases: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| include_stats | bool | [optional] [default to False] | |
| include_with_errors | bool | [optional] [default to False] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List[SearchableDatabase] get_included_databases(include_stats=include_stats)
import PySirius
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
include_stats = False # bool | (optional) (default to False)
try:
api_response = api_instance.get_included_databases(include_stats=include_stats)
print("The response of SearchableDatabasesApi->get_included_databases:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->get_included_databases: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| include_stats | bool | [optional] [default to False] |
No authorization required
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchableDatabase import_into_database(database_id, input_files, buffer_size=buffer_size, bio_transformer_parameters=bio_transformer_parameters)
Start import of structure and spectra files into the specified database.
Start import of structure and spectra files into the specified database.
import PySirius
from PySirius.models.bio_transformer_parameters import BioTransformerParameters
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
database_id = 'database_id_example' # str | database to import into
input_files = None # List[bytearray] | files to import into project
buffer_size = 1000 # int | (optional) (default to 1000)
bio_transformer_parameters = PySirius.BioTransformerParameters() # BioTransformerParameters | (optional)
try:
# Start import of structure and spectra files into the specified database.
api_response = api_instance.import_into_database(database_id, input_files, buffer_size=buffer_size, bio_transformer_parameters=bio_transformer_parameters)
print("The response of SearchableDatabasesApi->import_into_database:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->import_into_database: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| database_id | str | database to import into | |
| input_files | List[bytearray] | files to import into project | |
| buffer_size | int | [optional] [default to 1000] | |
| bio_transformer_parameters | BioTransformerParameters | [optional] |
No authorization required
- Content-Type: multipart/form-data
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Meta-Information of the affected database after the import has been performed. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
remove_database(database_id, delete=delete)
import PySirius
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
database_id = 'database_id_example' # str |
delete = False # bool | (optional) (default to False)
try:
api_instance.remove_database(database_id, delete=delete)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->remove_database: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| database_id | str | ||
| delete | bool | [optional] [default to False] |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: Not defined
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchableDatabase update_database(database_id, searchable_database_parameters=searchable_database_parameters)
import PySirius
from PySirius.models.searchable_database import SearchableDatabase
from PySirius.models.searchable_database_parameters import SearchableDatabaseParameters
from PySirius.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost:8080
# See configuration.py for a list of all supported configuration parameters.
configuration = PySirius.Configuration(
host = "http://localhost:8080"
)
# Enter a context with an instance of the API client
with PySirius.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = PySirius.SearchableDatabasesApi(api_client)
database_id = 'database_id_example' # str |
searchable_database_parameters = PySirius.SearchableDatabaseParameters() # SearchableDatabaseParameters | (optional)
try:
api_response = api_instance.update_database(database_id, searchable_database_parameters=searchable_database_parameters)
print("The response of SearchableDatabasesApi->update_database:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling SearchableDatabasesApi->update_database: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| database_id | str | ||
| searchable_database_parameters | SearchableDatabaseParameters | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | OK | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]