Listing Workflows
After initialization, Python can leverage the Fuzzball API by referencing the variable
api_instance
. The code snippet below requests a list of Fuzzball
workflows, checks for a valid response, and
prints the output.
response = api_instance.list_workflows()
if not isinstance(response, fuzzball.ListWorkflowsResponse):
print(response)
sys.exit(-1)
for workflow in response.workflows:
print("{} {} {:15} {:15}".format(workflow.end_time or workflow.start_time, workflow.id,
workflow.email, workflow.status))
Combining the initialization code with the Fuzzball workflow service API initialization code yields output similar to the following:
$ python list-fuzzball-workflows.py
2023-02-14 21:15:53.745807+00:00 473e5ace-3881-4cff-962b-534c7d934e4f dgodlove@ciq.co STAGE_STATUS_FAILED
2023-02-14 21:18:58.942369+00:00 5cd9fef3-6f17-4723-a965-671decbe177c dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 21:21:01.627369+00:00 7ba532a6-6a72-4f2a-89eb-a70fea85f4bc dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 21:19:59.693987+00:00 25a16964-ce39-4842-9a0f-cc3605eed4ee dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 21:27:21.722445+00:00 591b832b-7257-4c88-9335-036d99cd40ed dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 21:32:00.689768+00:00 8e39df6b-21c0-4e8d-9caf-f5fed96b0a77 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 21:31:01.553872+00:00 6bb00bb3-15bb-4d49-bc8b-504a2d84dfb4 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 21:58:44.331343+00:00 7c7f2cd8-3aa7-4b3a-9f52-8f266c312280 dgodlove@ciq.co STAGE_STATUS_FAILED
2023-02-14 22:23:25.855189+00:00 da35fb8d-9e6a-4ee2-bb72-fca00e2d5e8d dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 22:28:08.944728+00:00 ed26002f-7518-45fe-9459-7cbadb08dc15 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 22:26:47.915139+00:00 1251bd79-d6be-43db-a040-a5d91ec6bd5b dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 22:30:19.425389+00:00 1a9087ee-fcda-4d3c-8cdf-b3c1861eb73f dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 22:37:02.891377+00:00 e3585595-498b-43cf-9cca-b674e1591f57 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-14 22:54:35.556894+00:00 2ee68d8d-2b8c-4a50-8763-0d67f6e8abe2 dgodlove@ciq.co STAGE_STATUS_FAILED
2023-02-14 23:06:32.068021+00:00 84bdc8e8-17c1-447b-ab94-e82dc87a523e dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-15 22:52:07.097901+00:00 3bf98623-734c-4d48-9527-bd555559fdb5 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-15 22:48:02.164421+00:00 194398d3-b16c-4e35-8172-20802e9a0bd1 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-15 22:49:37.597631+00:00 4bc8fe3e-076e-4682-b806-4659eaa821f7 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-15 22:47:59.913861+00:00 9e8d23c4-6cbd-40de-90b5-d8f6b4880880 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-15 22:53:19.175323+00:00 ddc52a36-d7be-4ac9-a375-3e1da8512c1d dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-15 22:57:02.753375+00:00 1db27a5a-55b7-4c46-8676-0e57b0f78565 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-16 16:24:49.894497+00:00 11d34215-f4d7-46ac-b8bc-56c8c27f56d2 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-16 16:39:57.621372+00:00 3bf93890-6beb-4e02-86bc-dd65643ec298 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-16 16:45:57.438134+00:00 ae31183c-dd29-4f0a-9221-bf440794e825 dgodlove@ciq.co STAGE_STATUS_FINISHED
2023-02-16 16:45:06.443609+00:00 99e61969-09a5-4029-b7ad-d8935884b784 dgodlove@ciq.co STAGE_STATUS_FINISHED