All URIs are relative to https://api.sparkworks.net
Method | HTTP request | Description |
---|---|---|
count_gateways | GET /v2/gateway/count | Count Gateways |
create_gateway | POST /v2/gateway | Create a new Gateway |
delete_gateway | DELETE /v2/gateway/{uuid} | Delete Gateway by its UUID |
get_all_gateways | GET /v2/gateway | Retrieve a collection of Gateways |
get_gateway_by_uuid | GET /v2/gateway/{uuid} | Retrieve a Gateway by its UUID |
get_gateway_resources | GET /v2/gateway/{uuid}/resource | Get the Resources of a Gateway by the Gateway UUID |
query_gateways | POST /v2/gateway/query | Retrieve a Gateway by a query |
int count_gateways()
Count Gateways
A Spark Works Accounts authenticated common user is able to retrieve the number of Gateways that has permissions on. An administrator is able to retrieve the number of all Gateways.
from __future__ import print_function
import time
import sparkworks_client
from sparkworks_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
configuration.connect()
# create an instance of the API class
api_instance = sparkworks_client.GatewayApi(sparkworks_client.ApiClient(configuration))
try:
# Count Gateways
api_response = api_instance.count_gateways()
pprint(api_response)
except ApiException as e:
print("Exception when calling GatewayApi->count_gateways: %s\n" % e)
This endpoint does not need any parameter.
int
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GatewayDTO create_gateway(gateway_create_dto)
Create a new Gateway
A Spark Works authenticated user is able to request a new Gateway creation
from __future__ import print_function
import time
import sparkworks_client
from sparkworks_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
configuration.connect()
# create an instance of the API class
api_instance = sparkworks_client.GatewayApi(sparkworks_client.ApiClient(configuration))
gateway_create_dto = sparkworks_client.GatewayCreateDTO() # GatewayCreateDTO | Gateway Creation API Model
try:
# Create a new Gateway
api_response = api_instance.create_gateway(gateway_create_dto)
pprint(api_response)
except ApiException as e:
print("Exception when calling GatewayApi->create_gateway: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
gateway_create_dto | GatewayCreateDTO | Gateway Creation API Model |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_gateway(uuid)
Delete Gateway by its UUID
A Spark Works Accounts authenticated common user is able to remove a Spark Works Gateway that has permissions on by its unique identifier. An administrator is able to remove any Gateway of the platform
from __future__ import print_function
import time
import sparkworks_client
from sparkworks_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
configuration.connect()
# create an instance of the API class
api_instance = sparkworks_client.GatewayApi(sparkworks_client.ApiClient(configuration))
uuid = 'uuid_example' # str | The Gateway UUID
try:
# Delete Gateway by its UUID
api_instance.delete_gateway(uuid)
except ApiException as e:
print("Exception when calling GatewayApi->delete_gateway: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
uuid | str | The Gateway UUID |
void (empty response body)
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[GatewayDTO] get_all_gateways()
Retrieve a collection of Gateways
A Spark Works Accounts authenticated common user is able to retrieve all of the Platform Gateways that has permissions on. An administrator is able to query all of the platform Gateways
from __future__ import print_function
import time
import sparkworks_client
from sparkworks_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
configuration.connect()
# create an instance of the API class
api_instance = sparkworks_client.GatewayApi(sparkworks_client.ApiClient(configuration))
try:
# Retrieve a collection of Gateways
api_response = api_instance.get_all_gateways()
pprint(api_response)
except ApiException as e:
print("Exception when calling GatewayApi->get_all_gateways: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GatewayDTO get_gateway_by_uuid(uuid)
Retrieve a Gateway by its UUID
A Spark Works Accounts authenticated common user is able to retrieve a Gateway that has permissions on by its UUID. An administrator is able to get any Gateway by its UUID.
from __future__ import print_function
import time
import sparkworks_client
from sparkworks_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
configuration.connect()
# create an instance of the API class
api_instance = sparkworks_client.GatewayApi(sparkworks_client.ApiClient(configuration))
uuid = 'uuid_example' # str | The Gateway UUID
try:
# Retrieve a Gateway by its UUID
api_response = api_instance.get_gateway_by_uuid(uuid)
pprint(api_response)
except ApiException as e:
print("Exception when calling GatewayApi->get_gateway_by_uuid: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
uuid | str | The Gateway UUID |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
list[ResourceDTO] get_gateway_resources(uuid)
Get the Resources of a Gateway by the Gateway UUID
A Spark Works Accounts authenticated common user is able to retrieve the Resources of Gateway that has permissions on by its UUID. An administrator is able to retrieve the Resources of any Gateway.
from __future__ import print_function
import time
import sparkworks_client
from sparkworks_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
configuration.connect()
# create an instance of the API class
api_instance = sparkworks_client.GatewayApi(sparkworks_client.ApiClient(configuration))
uuid = 'uuid_example' # str | The Gateway UUID
try:
# Get the Resources of a Gateway by the Gateway UUID
api_response = api_instance.get_gateway_resources(uuid)
pprint(api_response)
except ApiException as e:
print("Exception when calling GatewayApi->get_gateway_resources: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
uuid | str | The Gateway UUID |
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GatewayDTO query_gateways(gateway_query)
Retrieve a Gateway by a query
A Spark Works Accounts authenticated common user is able to retrieve a Gateway that has permissions on by a query object. An administrator is able to get any Gateway by a query object.
from __future__ import print_function
import time
import sparkworks_client
from sparkworks_client.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: oauth2
configuration = sparkworks_client.Configuration("username", "password", "client_id", "client_secret")
configuration.connect()
# create an instance of the API class
api_instance = sparkworks_client.GatewayApi(sparkworks_client.ApiClient(configuration))
gateway_query = sparkworks_client.GatewayQueryDTO() # GatewayQueryDTO | The Gateway Query
try:
# Retrieve a Gateway by a query
api_response = api_instance.query_gateways(gateway_query)
pprint(api_response)
except ApiException as e:
print("Exception when calling GatewayApi->query_gateways: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
gateway_query | GatewayQueryDTO | The Gateway Query |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]