Hacarus.SpectroSdk.TargetsApi
All URIs are relative to https://sdd-api-staging.hacarus.com
Method | HTTP request | Description |
---|---|---|
get_inspection_target_by_id | GET /api/v1/targets/{target_id} | Get Inspection Target by ID |
get_inspection_targets | GET /api/v1/targets/ | Get List of Inpection Targets |
get_model_results | POST /api/v1/targets/model/results | |
set_inspection_target_by_id | POST /api/v1/targets/{target_id} | Set Default Inspection Target by ID |
get_inspection_target_by_id
InspectionTargetWrapper get_inspection_target_by_id(target_id)
Get Inspection Target by ID
Get a single inspection target using the inspection target ID.
Example
- Bearer (JWT) Authentication (jwt):
- OAuth Authentication (oauth2):
import time
import Hacarus.SpectroSdk
from Hacarus.SpectroSdk.api import targets_api
from Hacarus.SpectroSdk.model.inspection_target_wrapper import InspectionTargetWrapper
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 = targets_api.TargetsApi(api_client)
target_id = "target_id_example" # str |
# example passing only required values which don't have defaults set
try:
# Get Inspection Target by ID
api_response = api_instance.get_inspection_target_by_id(target_id)
pprint(api_response)
except Hacarus.SpectroSdk.ApiException as e:
print("Exception when calling TargetsApi->get_inspection_target_by_id: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
target_id | str |
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_inspection_targets
InspectionTargetListWrapper get_inspection_targets()
Get List of Inpection Targets
Get all inspection targets created by user
Example
- Bearer (JWT) Authentication (jwt):
- OAuth Authentication (oauth2):
import time
import Hacarus.SpectroSdk
from Hacarus.SpectroSdk.api import targets_api
from Hacarus.SpectroSdk.model.base_error import BaseError
from Hacarus.SpectroSdk.model.inspection_target_list_wrapper import InspectionTargetListWrapper
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 = targets_api.TargetsApi(api_client)
# example, this endpoint has no required or optional parameters
try:
# Get List of Inpection Targets
api_response = api_instance.get_inspection_targets()
pprint(api_response)
except Hacarus.SpectroSdk.ApiException as e:
print("Exception when calling TargetsApi->get_inspection_targets: %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_model_results
file_type get_model_results()
Example
- Bearer (JWT) Authentication (jwt):
- OAuth Authentication (oauth2):
import time
import Hacarus.SpectroSdk
from Hacarus.SpectroSdk.api import targets_api
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 = targets_api.TargetsApi(api_client)
model_ids = [
"model_ids_example",
] # [str] | (optional)
# example passing only required values which don't have defaults set
# and optional values
try:
api_response = api_instance.get_model_results(model_ids=model_ids)
pprint(api_response)
except Hacarus.SpectroSdk.ApiException as e:
print("Exception when calling TargetsApi->get_model_results: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
model_ids | [str] | [optional] |
Return type
file_type
Authorization
HTTP request headers
- Content-Type: Not defined
- Accept: application/json, application/octet-stream
HTTP response details
Status code | Description | Response headers |
---|---|---|
422 | Unprocessable Entity | - |
200 | CSV file containing the model/s results | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
set_inspection_target_by_id
InspectionTargetWrapper set_inspection_target_by_id(target_id)
Set Default Inspection Target by ID
Set the default inspection target using the inspection target ID.
Example
- Bearer (JWT) Authentication (jwt):
- OAuth Authentication (oauth2):
import time
import Hacarus.SpectroSdk
from Hacarus.SpectroSdk.api import targets_api
from Hacarus.SpectroSdk.model.inspection_target_wrapper import InspectionTargetWrapper
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 = targets_api.TargetsApi(api_client)
target_id = "target_id_example" # str |
# example passing only required values which don't have defaults set
try:
# Set Default Inspection Target by ID
api_response = api_instance.set_inspection_target_by_id(target_id)
pprint(api_response)
except Hacarus.SpectroSdk.ApiException as e:
print("Exception when calling TargetsApi->set_inspection_target_by_id: %s\n" % e)
Parameters
Name | Type | Description | Notes |
---|---|---|---|
target_id | str |
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]