Hacarus.SpectroSdk.UtilsApi
All URIs are relative to https://sdd-api-staging.hacarus.com
Method | HTTP request | Description |
---|---|---|
get_hash_id | POST /api/v1/utils/node_hash | |
get_logs | POST /api/v1/utils/debug | |
set_license | POST /api/v1/utils/ |
get_hash_id
LicenseHashResponseWrapper get_hash_id()
Example
- Bearer (JWT) Authentication (jwt):
- OAuth Authentication (oauth2):
import time
import Hacarus.SpectroSdk
from Hacarus.SpectroSdk.api import utils_api
from Hacarus.SpectroSdk.model.license_hash_response_wrapper import LicenseHashResponseWrapper
from Hacarus.SpectroSdk.model.base_error import BaseError
from pprint import pprint
# Defining the host is optional and defaults to https://sdd-api-staging.hacarus.com
# See configuration.py for a list of all supported configuration parameters.
configuration = Hacarus.SpectroSdk.Configuration(
host = "https://sdd-api-staging.hacarus.com"
)
# 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 Bearer authorization (JWT): jwt
configuration = Hacarus.SpectroSdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Configure OAuth2 access token for authorization: oauth2
configuration = Hacarus.SpectroSdk.Configuration(
host = "https://sdd-api-staging.hacarus.com"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with Hacarus.SpectroSdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = utils_api.UtilsApi(api_client)
# example, this endpoint has no required or optional parameters
try:
api_response = api_instance.get_hash_id()
pprint(api_response)
except Hacarus.SpectroSdk.ApiException as e:
print("Exception when calling UtilsApi->get_hash_id: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
0 | Default error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_logs
file_type get_logs()
Example
- Bearer (JWT) Authentication (jwt):
- OAuth Authentication (oauth2):
import time
import Hacarus.SpectroSdk
from Hacarus.SpectroSdk.api import utils_api
from pprint import pprint
# Defining the host is optional and defaults to https://sdd-api-staging.hacarus.com
# See configuration.py for a list of all supported configuration parameters.
configuration = Hacarus.SpectroSdk.Configuration(
host = "https://sdd-api-staging.hacarus.com"
)
# 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 Bearer authorization (JWT): jwt
configuration = Hacarus.SpectroSdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Configure OAuth2 access token for authorization: oauth2
configuration = Hacarus.SpectroSdk.Configuration(
host = "https://sdd-api-staging.hacarus.com"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with Hacarus.SpectroSdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = utils_api.UtilsApi(api_client)
# example, this endpoint has no required or optional parameters
try:
api_response = api_instance.get_logs()
pprint(api_response)
except Hacarus.SpectroSdk.ApiException as e:
print("Exception when calling UtilsApi->get_logs: %s\n" % e)
Parameters
This endpoint does not need any parameter.
Return type
file_type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/octet-stream
HTTP response details
Status code | Description | Response headers |
---|---|---|
200 | ZIP file containing the debug logs | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
set_license
LicenseResponseWrapper set_license()
Example
- Bearer (JWT) Authentication (jwt):
- OAuth Authentication (oauth2):
import time
import Hacarus.SpectroSdk
from Hacarus.SpectroSdk.api import utils_api
from Hacarus.SpectroSdk.model.license_response_wrapper import LicenseResponseWrapper
from Hacarus.SpectroSdk.model.base_error import BaseError
from pprint import pprint
# Defining the host is optional and defaults to https://sdd-api-staging.hacarus.com
# See configuration.py for a list of all supported configuration parameters.
configuration = Hacarus.SpectroSdk.Configuration(
host = "https://sdd-api-staging.hacarus.com"
)
# 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 Bearer authorization (JWT): jwt
configuration = Hacarus.SpectroSdk.Configuration(
access_token = 'YOUR_BEARER_TOKEN'
)
# Configure OAuth2 access token for authorization: oauth2
configuration = Hacarus.SpectroSdk.Configuration(
host = "https://sdd-api-staging.hacarus.com"
)
configuration.access_token = 'YOUR_ACCESS_TOKEN'
# Enter a context with an instance of the API client
with Hacarus.SpectroSdk.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = utils_api.UtilsApi(api_client)
license_data = open('/path/to/file', 'rb') # file_type | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.set_license(license_data=license_data)
pprint(api_response)
except Hacarus.SpectroSdk.ApiException as e:
print("Exception when calling UtilsApi->set_license: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
license_data | file_type | [optional] |
Return type
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
HTTP response details
Status code | Description | Response headers |
---|---|---|
422 | Unprocessable Entity | - |
200 | OK | - |
0 | Default error response | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]