Fixed GQL APIs in FE (#3603)

* Fixed GQL APIs in FE

Signed-off-by: Amit Kumar Das <amit@chaosnative.com>

* Updated api docs

Signed-off-by: Amit Kumar Das <amit@chaosnative.com>
This commit is contained in:
Amit Kumar Das 2022-05-16 13:10:27 +05:30 committed by GitHub
parent f416059afa
commit 6d506f9023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 440 additions and 56 deletions

View File

@ -40,11 +40,8 @@ export const UPDATE_DATASOURCE = gql`
`;
export const DELETE_DATASOURCE = gql`
mutation deleteDataSource(
$projectID: String!
$deleteDSInput: deleteDSInput!
) {
deleteDataSource(projectID: $projectID, input: $deleteDSInput)
mutation deleteDataSource($projectID: String!, $input: DeleteDSInput!) {
deleteDataSource(projectID: $projectID, input: $input)
}
`;

View File

@ -32,12 +32,12 @@ export const RERUN_CHAOS_WORKFLOW = gql`
`;
export const SYNC_WORKFLOW = gql`
mutation syncWorkflow(
mutation syncWorkflowRun(
$projectID: String!
$workflowID: String!
$workflowRunID: String!
) {
syncWorkflow(
syncWorkflowRun(
projectID: $projectID
workflowID: $workflowID
workflowRunID: $workflowRunID

View File

@ -40,7 +40,7 @@ export interface deleteDSInput {
export interface DeleteDataSourceInput {
projectID: string;
deleteDSInput: deleteDSInput;
input: deleteDSInput;
}
export interface ListDataSourceVars {
projectID: string;

View File

@ -137,7 +137,7 @@ const EditSchedule: React.FC = () => {
const yamlJson = JSON.stringify(yml, null, 2); // Converted to Stringified JSON
const chaosWorkFlowInputs = {
workflow_id: wfDetails?.workflowID,
workflowID: wfDetails?.workflowID,
workflowManifest: yamlJson,
cronSyntax,
workflowName: fetchWorkflowNameFromManifest(manifest),

View File

@ -168,7 +168,7 @@ const WorkflowRunTable: React.FC<WorkflowRunTableProps> = ({
const workflowTestsArray: WorkFlowTests[] = [];
if (data?.listWorkflowRuns?.workflowRuns) {
const executionData: ExecutionData = JSON.parse(
data.listWorkflowRuns.workflowRuns[0].executionData
data.listWorkflowRuns.workflowRuns[0]?.executionData
);
const { nodes } = executionData;
let index: number = 1;

View File

@ -224,10 +224,32 @@ const parsed = (yaml: string) => {
}
};
export const extractEngineNames = (manifest: string) => {
const engineNames: string[] = [];
const parsedManifest = YAML.parse(manifest);
if (parsedManifest.spec !== undefined) {
const yamlData =
parsedManifest.kind === constants.workflow
? parsedManifest.spec
: parsedManifest.spec.workflowSpec;
yamlData.templates?.forEach((template: any) => {
template?.inputs?.artifacts?.forEach((artifact: any) => {
if (artifact?.raw?.data) {
const artifactManifest = YAML.parse(artifact.raw.data);
if (artifactManifest.kind === 'ChaosEngine') {
engineNames.push(artifactManifest.metadata.generateName);
}
}
});
});
}
return engineNames;
};
export const addWeights = (manifest: string) => {
const arr: experimentMap[] = [];
const hashMap = new Map();
const tests = parsed(manifest);
const tests = extractEngineNames(manifest);
if (tests.length) {
tests.forEach((test) => {
let value = 10;
@ -446,7 +468,7 @@ export const validateExperimentNames = (manifest: any): boolean => {
manifest.kind === constants.workflow
? manifest.spec
: manifest.spec.workflowSpec;
yamlData.templates[0].steps.forEach((step: any) => {
yamlData.templates[0]?.steps?.forEach((step: any) => {
step.forEach((values: any) => {
// if exp name exists append the count
if (value[`${values.name}`]) {
@ -472,25 +494,3 @@ export const validateExperimentNames = (manifest: any): boolean => {
}
return true;
};
export const extractEngineNames = (manifest: string) => {
const engineNames: string[] = [];
const parsedManifest = YAML.parse(manifest);
if (parsedManifest.spec !== undefined) {
const yamlData =
parsedManifest.kind === constants.workflow
? parsedManifest.spec
: parsedManifest.spec.workflowSpec;
yamlData.templates.forEach((template: any) => {
template?.inputs?.artifacts.forEach((artifact: any) => {
if (artifact?.raw?.data) {
const artifactManifest = YAML.parse(artifact.raw.data);
if (artifactManifest.kind === 'ChaosEngine') {
engineNames.push(artifactManifest.metadata.generateName);
}
}
});
});
}
return engineNames;
};

View File

@ -115,7 +115,7 @@ const TableData: React.FC<TableDataProps> = ({ data, refetchQuery }) => {
*/
const [syncWorkflow] = useMutation(SYNC_WORKFLOW, {
onCompleted: (data) => {
if (data?.syncWorkflow) {
if (data?.syncWorkflowRun) {
handleWarningPopOverClose();
refetchQuery();
}

View File

@ -152,7 +152,7 @@ const ChooseWorkflowFromExisting: React.FC<ChooseWorkflowFromExistingProps> = ({
deleteTemplate({
variables: {
projectID: getProjectID(),
data: templateData.templateID,
templateID: templateData.templateID,
},
});
}}

View File

@ -85,7 +85,7 @@ const TableData: React.FC<TableDataProps> = ({
deleteDataSource({
variables: {
projectID: getProjectID(),
deleteDSInput: {
input: {
dsID: data.dsID,
forceDelete: false,
},

View File

@ -492,7 +492,7 @@ const DataSourceTable: React.FC = () => {
deleteDataSource({
variables: {
projectID: getProjectID(),
deleteDSInput: {
input: {
dsID: forceDeleteVars.dsID,
forceDelete: true,
},

View File

@ -47,19 +47,25 @@
<a href="#operation-create_chaos_workflow-post"> Create Chaos Workflow </a>
</li>
<li>
<a href="#operation-list_chaosworkflow_runs-post"> List ChaosWorkflow Runs </a>
<a href="#operation-list_chaos_workflow_runs-post"> List Chaos Workflow Runs </a>
</li>
<li>
<a href="#operation-list_chaos_workflow-post"> List Chaos Workflow </a>
</li>
<li>
<a href="#operation-re_run_chaos_workflow-post"> Re Run Chaos Workflow </a>
<a href="#operation-re-run_chaos_workflow-post"> Re-run Chaos Workflow </a>
</li>
<li>
<a href="#operation-update_chaosworkflow-post"> Update ChaosWorkflow </a>
<a href="#operation-update_chaos_workflow-post"> Update Chaos Workflow </a>
</li>
<li>
<a href="#operation-delete_chaosworkflow-post"> Delete ChaosWorkflow </a>
<a href="#operation-delete_chaos_workflow-post"> Delete Chaos Workflow </a>
</li>
<li>
<a href="#operation-sync_chaos_workflow-post"> Sync Chaos Workflow </a>
</li>
<li>
<a href="#operation-terminate_chaos_workflow-post"> Terminate Chaos Workflow </a>
</li>
<li>
<a href="#operation-save_template-post"> Save Template </a>
@ -192,6 +198,13 @@
</li>
</ul>
</section>
<section>
<a
href="https://litmuschaos.github.io/litmus/auth/v2.0.0/api.html"
target="_blank"
>Authentication</a
>
</section>
<h5>Schema Definitions</h5>
<a href="#definition-ActionPayload"> ActionPayload </a>
<a href="#definition-AgentStat"> AgentStat </a>
@ -331,7 +344,7 @@
<div id="introduction" data-traverse-target="introduction">
<div class="doc-row">
<div class="doc-copy">
<p>ChaosCenter provides console and UI experience for creating, scheduling, and monitoring chaos workflows.. Chaos workflows consist of a sequence of experiments run together to achieve the objective of introducing some kind of fault into an application.</p>
<p>ChaosCenter provides console and UI experience for creating, scheduling, and monitoring chaos workflows. Chaos workflows consist of a sequence of experiments run together to achieve the objective of introducing some kind of fault into an application.</p>
</div>
<div class="doc-examples">
<section>
@ -1314,7 +1327,7 @@ http://localhost:8080/query
</div>
</div>
</div>
<div id="operation-list_chaosworkflow_runs-post" class="operation panel" data-traverse-target="operation-list_chaosworkflow_runs-post">
<div id="operation-list_chaos_workflow_runs-post" class="operation panel" data-traverse-target="operation-list_chaos_workflow_runs-post">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@ -1324,7 +1337,7 @@ http://localhost:8080/query
<!-- </div> -->
<!-- </section> -->
<h2 class="operation-title">
<span class="operation-summary">List ChaosWorkflow Runs</span>
<span class="operation-summary">List Chaos Workflow Runs</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
@ -1674,7 +1687,7 @@ http://localhost:8080/query
</div>
</div>
</div>
<div id="operation-re_run_chaos_workflow-post" class="operation panel" data-traverse-target="operation-re_run_chaos_workflow-post">
<div id="operation-re-run_chaos_workflow-post" class="operation panel" data-traverse-target="operation-re-run_chaos_workflow-post">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@ -1684,7 +1697,7 @@ http://localhost:8080/query
<!-- </div> -->
<!-- </section> -->
<h2 class="operation-title">
<span class="operation-summary">Re Run Chaos Workflow</span>
<span class="operation-summary">Re-run Chaos Workflow</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
@ -1818,7 +1831,7 @@ http://localhost:8080/query
</div>
</div>
</div>
<div id="operation-update_chaosworkflow-post" class="operation panel" data-traverse-target="operation-update_chaosworkflow-post">
<div id="operation-update_chaos_workflow-post" class="operation panel" data-traverse-target="operation-update_chaos_workflow-post">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@ -1828,7 +1841,7 @@ http://localhost:8080/query
<!-- </div> -->
<!-- </section> -->
<h2 class="operation-title">
<span class="operation-summary">Update ChaosWorkflow</span>
<span class="operation-summary">Update Chaos Workflow</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
@ -2006,7 +2019,7 @@ http://localhost:8080/query
</div>
</div>
</div>
<div id="operation-delete_chaosworkflow-post" class="operation panel" data-traverse-target="operation-delete_chaosworkflow-post">
<div id="operation-delete_chaos_workflow-post" class="operation panel" data-traverse-target="operation-delete_chaos_workflow-post">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
@ -2016,7 +2029,7 @@ http://localhost:8080/query
<!-- </div> -->
<!-- </section> -->
<h2 class="operation-title">
<span class="operation-summary">Delete ChaosWorkflow</span>
<span class="operation-summary">Delete Chaos Workflow</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
@ -2161,6 +2174,328 @@ http://localhost:8080/query
<span class="hljs-attr">&quot;deleteChaosWorkflow&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>
}
}
</code></pre> </body>
</html>
<!-- </div> -->
</section>
</div>
</div>
</div>
<div id="operation-sync_chaos_workflow-post" class="operation panel" data-traverse-target="operation-sync_chaos_workflow-post">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
<a class="label" href="#tag-Chaos-Workflow">Chaos Workflow</a>
<!---->
</div>
<!-- </div> -->
<!-- </section> -->
<h2 class="operation-title">
<span class="operation-summary">Sync Chaos Workflow</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-operation-description">
<p>This API is used to sync a Chaos Workflow with the connected agent.</p>
<table>
<tr>
<th>Field</th>
<th>Possible values</th>
<th>Mandatory/Optional</th>
</tr>
<tr>
<td>projectID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowRunID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
</table>
</section>
</div>
</div>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-request-body"> </section>
<section class="swagger-request-params">
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">projectID:
<span class="prop-type">
<div class="json-property-type">string</div>
<span class="json-property-range" title="Value limits"></span>
</span>
</div>
</div>
<div class="prop-value">
<p class="no-description">(no description)</p>
</div>
</div>
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">workflowID:
<span class="prop-type">
<div class="json-property-type">string</div>
<span class="json-property-range" title="Value limits"></span>
</span>
</div>
</div>
<div class="prop-value">
<p class="no-description">(no description)</p>
</div>
</div>
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">workflowRunID:
<span class="prop-type">
<div class="json-property-type">string</div>
<span class="json-property-range" title="Value limits"></span>
</span>
</div>
</div>
<div class="prop-value">
<p class="no-description">(no description)</p>
</div>
</div>
</section>
</div>
<div class="doc-examples">
<section>
<h4>Example</h3>
<h5>Request Content-Types:
<span>application/json</span>
</h5>
<h5>Query</h5>
<!-- <div class="hljs"> -->
<html>
<head></head>
<body><pre><code class="hljs language-gql"><span class="hljs-symbol"><span class="hljs-keyword">mutation</span> syncWorkflowRun<span class="hljs-tag">(<span class="hljs-code">$projectID</span>:<span class="hljs-type"> String!</span>, <span class="hljs-code">$workflowID</span>:<span class="hljs-type"> String!</span>, <span class="hljs-code">$workflowRunID</span>:<span class="hljs-type"> String!</span>)</span><span class="hljs-tag">{
<span class="hljs-symbol">syncWorkflowRun<span class="hljs-tag">(projectID: <span class="hljs-code">$projectID</span>, workflowID: <span class="hljs-code">$workflowID</span>, workflowRunID: <span class="hljs-code">$workflowRunID</span>)</span></span>
}</span></span>
</code></pre> </body>
</html>
<!-- </div> -->
<h5>Variables</h5>
<!-- <div class="hljs"> -->
<html>
<head></head>
<body><pre><code class="hljs language-json">{
<span class="hljs-attr">&quot;projectID&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;workflowID&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;workflowRunID&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
}
</code></pre> </body>
</html>
<!-- </div> -->
<a href="http://localhost:8080?query=mutation%20syncWorkflowRun(%24projectID%3A%20String!%2C%20%24workflowID%3A%20String!%2C%20%24workflowRunID%3A%20String!)%7B%0A%20%20syncWorkflowRun(projectID%3A%20%24projectID%2C%20workflowID%3A%20%24workflowID%2C%20workflowRunID%3A%20%24workflowRunID)%0A%7D" target="_blank">Try it now</a>
</section>
</div>
</div>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-responses">
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">200 OK</div>
</div>
<div class="prop-value">
<p>Successful operation</p>
</div>
</div>
<div class="prop-row prop-inner">
<div class="prop-name">type</div>
<div class="prop-value">
<div class="json-property-type">boolean</div>
<span class="json-property-range" title="Value limits"></span>
</div>
</div>
</section>
</div>
<div class="doc-examples">
<h5>Response Content-Types:
<span>application/json</span>
</h5>
<section>
<h5>Response Example
<span>(200 OK)</span>
</h5>
<!-- <div class="hljs"> -->
<html>
<head></head>
<body><pre><code class="hljs language-json">{
<span class="hljs-attr">&quot;data&quot;</span>: {
<span class="hljs-attr">&quot;syncWorkflowRun&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>
}
}
</code></pre> </body>
</html>
<!-- </div> -->
</section>
</div>
</div>
</div>
<div id="operation-terminate_chaos_workflow-post" class="operation panel" data-traverse-target="operation-terminate_chaos_workflow-post">
<!-- <section class="operation-tags row"> -->
<!-- <div class="doc-copy"> -->
<div class="operation-tags">
<a class="label" href="#tag-Chaos-Workflow">Chaos Workflow</a>
<!---->
</div>
<!-- </div> -->
<!-- </section> -->
<h2 class="operation-title">
<span class="operation-summary">Terminate Chaos Workflow</span>
</h2>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-operation-description">
<p>This API is used to terminate a running Chaos Workflow.</p>
<table>
<tr>
<th>Field</th>
<th>Possible values</th>
<th>Mandatory/Optional</th>
</tr>
<tr>
<td>projectID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowRunID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
</table>
</section>
</div>
</div>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-request-body"> </section>
<section class="swagger-request-params">
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">projectID:
<span class="prop-type">
<div class="json-property-type">string</div>
<span class="json-property-range" title="Value limits"></span>
</span>
</div>
</div>
<div class="prop-value">
<p class="no-description">(no description)</p>
</div>
</div>
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">workflowID:
<span class="prop-type">
<div class="json-property-type">string</div>
<span class="json-property-range" title="Value limits"></span>
</span>
</div>
</div>
<div class="prop-value">
<p class="no-description">(no description)</p>
</div>
</div>
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">workflowRunID:
<span class="prop-type">
<div class="json-property-type">string</div>
<span class="json-property-range" title="Value limits"></span>
</span>
</div>
</div>
<div class="prop-value">
<p class="no-description">(no description)</p>
</div>
</div>
</section>
</div>
<div class="doc-examples">
<section>
<h4>Example</h3>
<h5>Request Content-Types:
<span>application/json</span>
</h5>
<h5>Query</h5>
<!-- <div class="hljs"> -->
<html>
<head></head>
<body><pre><code class="hljs language-gql"><span class="hljs-symbol"><span class="hljs-keyword">mutation</span> terminateChaosWorkflow<span class="hljs-tag">(<span class="hljs-code">$projectID</span>:<span class="hljs-type"> String!</span>, <span class="hljs-code">$workflowID</span>:<span class="hljs-type"> String,</span> <span class="hljs-code">$workflowRunID</span>:<span class="hljs-type"> String)</span>{
terminateChaosWorkflow(projectID: <span class="hljs-code">$projectID</span>, workflowID: <span class="hljs-code">$workflowID</span>, workflowRunID: <span class="hljs-code">$workflowRunID</span>)</span></span>
}
</code></pre> </body>
</html>
<!-- </div> -->
<h5>Variables</h5>
<!-- <div class="hljs"> -->
<html>
<head></head>
<body><pre><code class="hljs language-json">{
<span class="hljs-attr">&quot;projectID&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;workflowID&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>,
<span class="hljs-attr">&quot;workflowRunID&quot;</span>: <span class="hljs-string">&quot;string&quot;</span>
}
</code></pre> </body>
</html>
<!-- </div> -->
<a href="http://localhost:8080?query=mutation%20terminateChaosWorkflow(%24projectID%3A%20String!%2C%20%24workflowID%3A%20String%2C%20%24workflowRunID%3A%20String)%7B%0A%20%20terminateChaosWorkflow(projectID%3A%20%24projectID%2C%20workflowID%3A%20%24workflowID%2C%20workflowRunID%3A%20%24workflowRunID)%0A%7D" target="_blank">Try it now</a>
</section>
</div>
</div>
<div class="doc-row">
<div class="doc-copy">
<section class="swagger-responses">
<div class="prop-row prop-group">
<div class="prop-name">
<div class="prop-title">200 OK</div>
</div>
<div class="prop-value">
<p>Successful operation</p>
</div>
</div>
<div class="prop-row prop-inner">
<div class="prop-name">type</div>
<div class="prop-value">
<div class="json-property-type">boolean</div>
<span class="json-property-range" title="Value limits"></span>
</div>
</div>
</section>
</div>
<div class="doc-examples">
<h5>Response Content-Types:
<span>application/json</span>
</h5>
<section>
<h5>Response Example
<span>(200 OK)</span>
</h5>
<!-- <div class="hljs"> -->
<html>
<head></head>
<body><pre><code class="hljs language-json">{
<span class="hljs-attr">&quot;data&quot;</span>: {
<span class="hljs-attr">&quot;terminateChaosWorkflow&quot;</span>: <span class="hljs-string">&quot;boolean&quot;</span>
}
}
</code></pre> </body>
</html>
<!-- </div> -->

View File

@ -9,7 +9,7 @@ servers:
info:
title: ChaosCenter API Documentation
description: |
ChaosCenter provides console and UI experience for creating, scheduling, and monitoring chaos workflows.. Chaos workflows consist of a sequence of experiments run together to achieve the objective of introducing some kind of fault into an application.
ChaosCenter provides console and UI experience for creating, scheduling, and monitoring chaos workflows. Chaos workflows consist of a sequence of experiments run together to achieve the objective of introducing some kind of fault into an application.
domains:
- name: Agents
description: |
@ -216,7 +216,7 @@ domains:
</tr>
</table>
- name: List ChaosWorkflow Runs
- name: List Chaos Workflow Runs
query: query.listWorkflowRuns
description: |
This API returns a list of Chaos Workflows and their runs. This API can fetch both cron and non-cron workflow present in the ChaosCenter. false<br/>
@ -294,7 +294,7 @@ domains:
<td>Optional</td>
</tr>
</table>
- name: Re Run Chaos Workflow
- name: Re-run Chaos Workflow
query: mutation.reRunChaosWorkFlow
description: |
This API is used to re-run a particular chaos workflow on the basis of <b>workflowID</b>
@ -315,7 +315,7 @@ domains:
<td>Mandatory</td>
</tr>
</table>
- name: Update ChaosWorkflow
- name: Update Chaos Workflow
query: mutation.updateChaosWorkflow
description: |
Update the specified chaos workflow by setting the values of the parameters passed.
@ -361,7 +361,7 @@ domains:
<td>Mandatory</td>
</tr>
</table>
- name: Delete ChaosWorkflow
- name: Delete Chaos Workflow
query: mutation.deleteChaosWorkflow
description: |
Delete chaos workflow will permanently delete scheduled workflow from the cluster. It cannot be undone.
@ -388,6 +388,58 @@ domains:
<td>Mandatory</td>
</tr>
</table>
- name: Sync Chaos Workflow
query: mutation.syncWorkflowRun
description: |
This API is used to sync a Chaos Workflow with the connected agent.
<table>
<tr>
<th>Field</th>
<th>Possible values</th>
<th>Mandatory/Optional</th>
</tr>
<tr>
<td>projectID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowRunID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
</table>
- name: Terminate Chaos Workflow
query: mutation.terminateChaosWorkflow
description: |
This API is used to terminate a running Chaos Workflow.
<table>
<tr>
<th>Field</th>
<th>Possible values</th>
<th>Mandatory/Optional</th>
</tr>
<tr>
<td>projectID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
<tr>
<td>workflowRunID</td>
<td>-</td>
<td>Mandatory</td>
</tr>
</table>
- name: Save Template
query: mutation.createWorkflowTemplate
description: |