View on GitHub

sparkworksrest

sparkworks_client.PhenomenonApi

All URIs are relative to https://api.sparkworks.net

Method HTTP request Description
create_phenomenon POST /v2/phenomenon Create a Phenomenon
delete_phenomenon DELETE /v2/phenomenon/{uuid} Delete a Phenomenon by its UUID
get_all_phenomena GET /v2/phenomenon Retrieve a collection of Phenomenons
get_phenomenon_by_uuid GET /v2/phenomenon/{uuid} Retrieve a Phenomenon by its UUID
query_phenomena POST /v2/phenomenon/query Retrieve a Phenomenon by a query
update_phenomenon POST /v2/phenomenon/{uuid} Update Phenomenon

create_phenomenon

PhenomenonDTO create_phenomenon(phenomenon_create_dto)

Create a Phenomenon

A Spark Works Accounts authenticated user is able to create a Phenomenon.

Example

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.PhenomenonApi(sparkworks_client.ApiClient(configuration))
phenomenon_create_dto = sparkworks_client.PhenomenonCreateDTO() # PhenomenonCreateDTO | The Phenomenon Query

try:
    # Create a Phenomenon
    api_response = api_instance.create_phenomenon(phenomenon_create_dto)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhenomenonApi->create_phenomenon: %s\n" % e)

Parameters

Name Type Description Notes
phenomenon_create_dto PhenomenonCreateDTO The Phenomenon Query  

Return type

PhenomenonDTO

Authorization

oauth2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

delete_phenomenon

delete_phenomenon(uuid)

Delete a Phenomenon by its UUID

A Spark Works Accounts authenticated user is able to delete a Phenomenon by its UUID.

Example

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.PhenomenonApi(sparkworks_client.ApiClient(configuration))
uuid = 'uuid_example' # str | The Phenomenon UUID

try:
    # Delete a Phenomenon by its UUID
    api_instance.delete_phenomenon(uuid)
except ApiException as e:
    print("Exception when calling PhenomenonApi->delete_phenomenon: %s\n" % e)

Parameters

Name Type Description Notes
uuid str The Phenomenon UUID  

Return type

void (empty response body)

Authorization

oauth2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_all_phenomena

list[PhenomenonDTO] get_all_phenomena()

Retrieve a collection of Phenomenons

A Spark Works Accounts authenticated user is able to retrieve all of the Platform Phenomenons.

Example

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.PhenomenonApi(sparkworks_client.ApiClient(configuration))

try:
    # Retrieve a collection of Phenomenons
    api_response = api_instance.get_all_phenomena()
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhenomenonApi->get_all_phenomena: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

list[PhenomenonDTO]

Authorization

oauth2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

get_phenomenon_by_uuid

PhenomenonDTO get_phenomenon_by_uuid(uuid)

Retrieve a Phenomenon by its UUID

A Spark Works Accounts authenticated common user is able to retrieve a Phenomenon that has permissions on by its UUID. An administrator is able to get any Phenomenon by its UUID.

Example

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.PhenomenonApi(sparkworks_client.ApiClient(configuration))
uuid = 'uuid_example' # str | The Phenomenon UUID

try:
    # Retrieve a Phenomenon by its UUID
    api_response = api_instance.get_phenomenon_by_uuid(uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhenomenonApi->get_phenomenon_by_uuid: %s\n" % e)

Parameters

Name Type Description Notes
uuid str The Phenomenon UUID  

Return type

PhenomenonDTO

Authorization

oauth2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

query_phenomena

PhenomenonDTO query_phenomena(phenomenon_query_dto)

Retrieve a Phenomenon by a query

A Spark Works Accounts authenticated user is able to retrieve a Phenomenon.

Example

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.PhenomenonApi(sparkworks_client.ApiClient(configuration))
phenomenon_query_dto = sparkworks_client.PhenomenonQueryDTO() # PhenomenonQueryDTO | The Phenomenon Query

try:
    # Retrieve a Phenomenon by a query
    api_response = api_instance.query_phenomena(phenomenon_query_dto)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhenomenonApi->query_phenomena: %s\n" % e)

Parameters

Name Type Description Notes
phenomenon_query_dto PhenomenonQueryDTO The Phenomenon Query  

Return type

PhenomenonDTO

Authorization

oauth2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]

update_phenomenon

PhenomenonDTO update_phenomenon(uuid, update_dto)

Update Phenomenon

A Spark Works Accounts administrator is able to update a Phenomenon by its UUID.

Example

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.PhenomenonApi(sparkworks_client.ApiClient(configuration))
uuid = 'uuid_example' # str | The Phenomenon UUID
update_dto = sparkworks_client.PhenomenonUpdateDTO() # PhenomenonUpdateDTO | updateDTO

try:
    # Update Phenomenon
    api_response = api_instance.update_phenomenon(uuid, update_dto)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PhenomenonApi->update_phenomenon: %s\n" % e)

Parameters

Name Type Description Notes
uuid str The Phenomenon UUID  
update_dto PhenomenonUpdateDTO updateDTO  

Return type

PhenomenonDTO

Authorization

oauth2

HTTP request headers

[Back to top] [Back to API list] [Back to Model list] [Back to README]