Skip to content
scaly789 edited this page May 19, 2021 · 2 revisions

Setting up the Config file:

There should be an auth.yaml file in the main directory in the form of

AUTH_ENDPOINT: HERE_GOES_AUTH_ENDPOINT
API_ENDPOINT: HERE_GOES_API_ENDPOINT
CLIENT_ID:  HERE_GOES_CLIENT_ID
USERNAME: HERE_GOES_USERNAME
PASSWORD: HERE_GOES_PASSWORD
SECRET: HERE_GOES_SECRET 

Fill this out with your own authentication info before running anything.

Running Tests:

In the src/python/sense/client directory, there should be a test_service.py file. This is used to test the functions. To test functions, use this file and create a WorkflowCombinedApi object with

var = WorkflowCombinedApi()

To run the api functions, just run them with

var.function(args)

The functions can be found in the workflow_combined_api.py file in the same directory.

Testing Post Request:

Some intent json models can be found in the src/python/sense/requests directory. To test the api post requests, go to the test file mentioned above. In the file, load in the json with

f = open("path to the intent model")

Then load it into a dictionary with

dict = json.load(f)

Then, use this new dictionary as an argument to the api post function, which would be instance_si_uuid_post. The uuid argument should be stored in the WorkflowCombinedApi that you created as var.si_uuid.

Clone this wiki locally