{
  "swagger": "2.0",
  "info": {
    "title": "chaos/chaos.proto",
    "version": "version not set"
  },
  "tags": [
    {
      "name": "ChaosService"
    }
  ],
  "consumes": [
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "paths": {},
  "definitions": {
    "ExperimentActionActionPodShutdown": {
      "type": "object",
      "properties": {
        "target": {
          "$ref": "#/definitions/chaosExperimentTarget"
        }
      }
    },
    "baseBaseReq": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    },
    "baseBaseResp": {
      "type": "object",
      "properties": {
        "tags": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        },
        "err_code": {
          "type": "string",
          "format": "int64"
        },
        "err_msg": {
          "type": "string"
        }
      }
    },
    "basePager": {
      "type": "object",
      "properties": {
        "page": {
          "type": "string",
          "format": "int64"
        },
        "page_size": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "baseSort": {
      "type": "string",
      "enum": [
        "SORT_ASC",
        "SORT_DESC"
      ],
      "default": "SORT_ASC"
    },
    "baseSorter": {
      "type": "object",
      "properties": {
        "order_by": {
          "type": "string"
        },
        "sort": {
          "$ref": "#/definitions/baseSort"
        }
      }
    },
    "chaosActionKind": {
      "type": "string",
      "enum": [
        "ACTION_KIND_UNSPECIFIED",
        "ACTION_KIND_POD_SHUTDOWN"
      ],
      "default": "ACTION_KIND_UNSPECIFIED"
    },
    "chaosChaosBackendStatus": {
      "type": "string",
      "enum": [
        "CHAOS_BACKEND_STATUS_UNSPECIFIED",
        "CHAOS_BACKEND_STATUS_READY",
        "CHAOS_BACKEND_STATUS_DISABLED",
        "CHAOS_BACKEND_STATUS_INSTALLING",
        "CHAOS_BACKEND_STATUS_INSTALL_FAILED",
        "CHAOS_BACKEND_STATUS_UNINSTALLING"
      ],
      "default": "CHAOS_BACKEND_STATUS_UNSPECIFIED"
    },
    "chaosComponentPodInfo": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        }
      }
    },
    "chaosCreateExperimentResp": {
      "type": "object",
      "properties": {
        "experiment": {
          "$ref": "#/definitions/chaosExperiment"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosDeleteExperimentResp": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosDisableChaosBackendResp": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosEnableChaosBackendResp": {
      "type": "object",
      "properties": {
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosExperiment": {
      "type": "object",
      "properties": {
        "experiment_id": {
          "type": "string",
          "format": "uint64"
        },
        "cluster_id": {
          "type": "string",
          "format": "uint64"
        },
        "draft": {
          "type": "boolean"
        },
        "action": {
          "$ref": "#/definitions/chaosExperimentAction"
        },
        "summary": {
          "type": "string"
        },
        "report_link": {
          "type": "string"
        },
        "status": {
          "$ref": "#/definitions/chaosExperimentStatus"
        },
        "message": {
          "type": "string"
        },
        "created_at": {
          "type": "string",
          "format": "int64"
        },
        "created_by_id": {
          "type": "string",
          "format": "uint64"
        },
        "started_at": {
          "type": "string",
          "format": "int64"
        },
        "completed_at": {
          "type": "string",
          "format": "int64"
        },
        "deleted_at": {
          "type": "string",
          "format": "int64"
        }
      }
    },
    "chaosExperimentAction": {
      "type": "object",
      "properties": {
        "type": {
          "$ref": "#/definitions/chaosActionKind"
        },
        "pod_shutdown": {
          "$ref": "#/definitions/ExperimentActionActionPodShutdown"
        }
      }
    },
    "chaosExperimentFilter": {
      "type": "object",
      "properties": {
        "cluster_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uint64"
          },
          "title": "**should** set one or more cluster_id\nif no cluster_id is set, will return error"
        },
        "experiment_ids": {
          "type": "array",
          "items": {
            "type": "string",
            "format": "uint64"
          },
          "title": "could set one or more experiment_id\nif no experiment_id is set, will return all experiments in the clusters that are set in `cluster_ids`"
        },
        "deleted": {
          "type": "boolean",
          "description": "if `deleted` is nil, return all experiments.\nif `deleted` is `True`, return deleted experiments.\nif `deleted` is `False`, return non-deleted experiments."
        }
      }
    },
    "chaosExperimentStatus": {
      "type": "string",
      "enum": [
        "EXPERIMENT_STATUS_UNSPECIFIED",
        "EXPERIMENT_STATUS_DRAFT",
        "EXPERIMENT_STATUS_RUNNING",
        "EXPERIMENT_STATUS_SUCCESS",
        "EXPERIMENT_STATUS_FAILED",
        "EXPERIMENT_STATUS_DELETED"
      ],
      "default": "EXPERIMENT_STATUS_UNSPECIFIED"
    },
    "chaosExperimentTarget": {
      "type": "object",
      "properties": {
        "mode": {
          "$ref": "#/definitions/chaosTargetMode"
        },
        "component": {
          "$ref": "#/definitions/chaosTargetComponent"
        },
        "name": {
          "type": "string"
        }
      }
    },
    "chaosGetChaosBackendResp": {
      "type": "object",
      "properties": {
        "status": {
          "$ref": "#/definitions/chaosChaosBackendStatus"
        },
        "message": {
          "type": "string"
        },
        "updated_by_id": {
          "type": "string",
          "format": "uint64"
        },
        "updated_at": {
          "type": "string",
          "format": "int64"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosGetExperimentResp": {
      "type": "object",
      "properties": {
        "experiment": {
          "$ref": "#/definitions/chaosExperiment"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosGetTiDBComponentTopologyResp": {
      "type": "object",
      "properties": {
        "topology": {
          "$ref": "#/definitions/chaosTiDBComponentTopology"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosListExperimentsResp": {
      "type": "object",
      "properties": {
        "total": {
          "type": "string",
          "format": "int64"
        },
        "experiments": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/chaosExperiment"
          }
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "chaosTargetComponent": {
      "type": "string",
      "enum": [
        "TARGET_COMPONENT_UNSPECIFIED",
        "TARGET_COMPONENT_TIDB",
        "TARGET_COMPONENT_TIKV",
        "TARGET_COMPONENT_PD"
      ],
      "default": "TARGET_COMPONENT_UNSPECIFIED"
    },
    "chaosTargetMode": {
      "type": "string",
      "enum": [
        "TARGET_MODE_UNSPECIFIED",
        "TARGET_MODE_RANDOM",
        "TARGET_MODE_SPECIFIED"
      ],
      "default": "TARGET_MODE_UNSPECIFIED"
    },
    "chaosTiDBComponentTopology": {
      "type": "object",
      "properties": {
        "tidb": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/chaosComponentPodInfo"
          }
        },
        "tikv": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/chaosComponentPodInfo"
          }
        },
        "pd": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/chaosComponentPodInfo"
          }
        },
        "tiflash": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/chaosComponentPodInfo"
          }
        }
      }
    },
    "chaosUpdateExperimentResp": {
      "type": "object",
      "properties": {
        "experiment": {
          "$ref": "#/definitions/chaosExperiment"
        },
        "base_resp": {
          "$ref": "#/definitions/baseBaseResp"
        }
      }
    },
    "protobufAny": {
      "type": "object",
      "properties": {
        "@type": {
          "type": "string"
        }
      },
      "additionalProperties": {}
    },
    "rpcStatus": {
      "type": "object",
      "properties": {
        "code": {
          "type": "integer",
          "format": "int32"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/protobufAny"
          }
        }
      }
    }
  }
}
