{
  "openapi": "3.0.0",
  "info": {
    "title": "WeCube Terminal API",
    "version": "0.3.0",
    "contact": {
      "name": "Support",
      "email": "fintech@webank.com",
      "url": "https://github.com/WeBankPartners/wecube-plugins-terminal"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
    }
  },
  "paths": {
    "/terminal/v1/login": {
      "post": {
        "description": "Login",
        "operationId": "Login",
        "tags": [
          "Login"
        ],
        "requestBody": {
          "description": "login with username & password",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/UserPassword"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Tokens"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Login Deny",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorUserPass"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/refresh-token": {
      "get": {
        "description": "Refresh Login",
        "operationId": "Refresh Login",
        "tags": [
          "Login"
        ],
        "security": [
          {
            "refresh": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Tokens"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Login Deny",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/assets": {
      "get": {
        "description": "List assets that you are authorized to execute",
        "operationId": "List Assets",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Assets"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/view-assets": {
      "get": {
        "description": "List assets that you are authorized to view",
        "operationId": "List View-Only Assets",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Assets"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/assets/{id}/file": {
      "get": {
        "description": "Download File from an Asset",
        "operationId": "Download File from an Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1"
            }
          },
          {
            "name": "path",
            "in": "query",
            "description": "file path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "/tmp/file"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Upload File to an Asset",
        "operationId": "Upload File to an Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "path",
            "in": "query",
            "description": "file path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "/tmp/file"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/assets/{id}/permissions": {
      "get": {
        "description": "List permissions of the {id} asset",
        "operationId": "List Permissions of an Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "example": [
                          "execute",
                          "download"
                        ]
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/mgmt-assets": {
      "get": {
        "description": "List All Asset",
        "operationId": "List All Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Assets"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create Asset",
        "operationId": "Create Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Assets to add",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Assets"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Assets"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update Assets",
        "operationId": "Update Assets",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Assets to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Assets"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Assets"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/mgmt-assets/{id}": {
      "get": {
        "description": "Get One Asset",
        "operationId": "Get One Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/Asset"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete One Asset",
        "operationId": "Delete One Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items deleted",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Assets"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update One Asset",
        "operationId": "Update One Asset",
        "tags": [
          "Asset"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Asset to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/Asset"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/Asset"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/jumpservers": {
      "get": {
        "description": "List JumpServers",
        "operationId": "List JumpServers",
        "tags": [
          "JumpServer"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/JumpServers"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create JumpServers",
        "operationId": "Create JumpServers",
        "tags": [
          "JumpServer"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "JumpServers to add",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/JumpServers"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/JumpServers"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update JumpServers",
        "operationId": "Update JumpServers",
        "tags": [
          "JumpServer"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "JumpServers to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/JumpServers"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/JumpServers"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/jumpservers/{id}": {
      "get": {
        "description": "Get One JumpServer",
        "operationId": "Get One JumpServer",
        "tags": [
          "JumpServer"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/JumpServer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete One JumpServer",
        "operationId": "Delete One JumpServer",
        "tags": [
          "JumpServer"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items deleted",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/JumpServers"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update One JumpServer",
        "operationId": "Update One JumpServer",
        "tags": [
          "JumpServer"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "JumpServer to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/JumpServer"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/JumpServer"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/bookmarks": {
      "get": {
        "description": "List Bookmarks",
        "operationId": "List Bookmarks",
        "tags": [
          "Bookmark"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Bookmarks"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create Bookmarks",
        "operationId": "Create Bookmarks",
        "tags": [
          "Bookmark"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Bookmarks to add",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Bookmarks"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Bookmarks"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update Bookmarks",
        "operationId": "Update Bookmarks",
        "tags": [
          "Bookmark"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Bookmarks to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Bookmarks"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Bookmarks"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/bookmarks/{id}": {
      "get": {
        "description": "Get One Bookmark",
        "operationId": "Get One Bookmark",
        "tags": [
          "Bookmark"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/Bookmark"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete One Bookmark",
        "operationId": "Delete One Bookmark",
        "tags": [
          "Bookmark"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items deleted",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Bookmarks"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update One Bookmark",
        "operationId": "Update One Bookmark",
        "tags": [
          "Bookmark"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Bookmark to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/Bookmark"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/Bookmark"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/transfer-records": {
      "get": {
        "description": "List File-transfer records",
        "operationId": "List File-transfer records",
        "tags": [
          "Audit"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FileTransfer"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/session-records": {
      "get": {
        "description": "List Session records",
        "operationId": "List Session records",
        "tags": [
          "Audit"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/SessionRecord"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/session-records/{id}/file": {
      "get": {
        "description": "Get Session replay file",
        "operationId": "Get Session replay file",
        "tags": [
          "Audit"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/octet-stream": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/permissions": {
      "get": {
        "description": "List Permissions",
        "operationId": "List Permissions",
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Permissions"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create Permissions",
        "operationId": "Create Permissions",
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Permissions to add",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Permissions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Permissions"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update Permissions",
        "operationId": "Update Permissions",
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Permissions to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Permissions"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Permissions"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/permissions/{id}": {
      "get": {
        "description": "Get One Permission",
        "operationId": "Get One Permission",
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "1"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/Permission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete One Permission",
        "operationId": "Delete One Permission",
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items deleted",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Permissions"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update One Permission",
        "operationId": "Update One Permission",
        "tags": [
          "Permission"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Permissions to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/Permission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Permission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/ssh": {
      "get": {
        "description": "Get SSH Connection(websocket)",
        "operationId": "Get SSH Connection(websocket)",
        "tags": [
          "Console"
        ],
        "parameters": [
          {
            "name": "Connection",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "example": "Upgrade"
            }
          },
          {
            "name": "Upgrade",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "example": "websocket"
            }
          }
        ],
        "responses": {
          "101": {
            "description": "<br/>next use websocket message to communicate with server<br/><br/>\n\n1. client send: {\"type\": \"init/resize/console/listdir\", \"data\": \"\"}<br/>\n  init: init shell & sftp<br/>\n    data: {token: \"your jwt token\", cols: 80, rows: 20, asset_id: \"host000001\"}<br/>\n  resize: resize shell cols & rows<br/>\n    data: {cols: 80, rows: 20}<br/>\n  console: send user input<br/>\n    data: xxxxxx<br/>\n  listdir: send list dir request<br/>\n    data: dirpath<br/><br/>\n2. client recv: {\"type\": \"console/listdir/warn/error\", \"data\": \"\"}<br/>\n  console: recv console output<br/>\n    data: xxxx<br/>\n  listdir: recv file list<br/>\n    data: {pwd: xxx, filelist: [{...}]}<br/>\n  warn: recv warnning message, should be comfirm by user<br/>\n    data: message<br/>\n  error: error output<br/>\n    data: message<br/>\n"
          }
        }
      }
    },
    "/terminal/v1/users": {
      "get": {
        "description": "List Users",
        "operationId": "List Users",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Users"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create Users",
        "operationId": "Create Users",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Users to add",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Users"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Users"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update Users",
        "operationId": "Update Users",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Users to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Users"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Users"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/users/{id}": {
      "get": {
        "description": "Get One User",
        "operationId": "Get One User",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "admin"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/User"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete One User",
        "operationId": "Delete One User",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items deleted",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Users"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update One User",
        "operationId": "Update One User",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "User to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/User"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/User"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/user-password": {
      "post": {
        "description": "Update My Password",
        "operationId": "Update My Password",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "update your own password",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "$ref": "#/components/schemas/UpdatePassword"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/User"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/users/{id}/reset-password": {
      "post": {
        "description": "Reset User Password",
        "operationId": "Reset User Password",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "admin"
            }
          }
        ],
        "requestBody": {
          "description": "password to reset, random password will be use if not specific",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/ResetPassword"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/User"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/users/{id}/menus": {
      "get": {
        "description": "Get User Menus",
        "operationId": "Get User Menus",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "admin"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Menus"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/users/{id}/roles": {
      "get": {
        "description": "Get User Roles",
        "operationId": "Get User Roles",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "admin"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Roles"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Set User Roles",
        "operationId": "Set User Roles",
        "tags": [
          "User"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Roles to set",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/UserRole"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Roles"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/roles": {
      "get": {
        "description": "List Roles",
        "operationId": "List Roles",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Roles"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Create Roles",
        "operationId": "Create Roles",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Roles to add",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Roles"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Roles"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update Roles",
        "operationId": "Update Roles",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Roles to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Roles"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Roles"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/roles/{id}": {
      "get": {
        "description": "Get One Role",
        "operationId": "Get One Role",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "SUPER_ADMIN"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/Role"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "delete": {
        "description": "Delete One Role",
        "operationId": "Delete One Role",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items deleted",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Roles"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "patch": {
        "description": "Update One Role",
        "operationId": "Update One Role",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Role to update",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/Role"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "$ref": "#/components/schemas/Role"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/roles/{id}/menus": {
      "get": {
        "description": "Get Role Menus",
        "operationId": "Get Role Menus",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "SUPER_ADMIN"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Menus"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Set Role Menus",
        "operationId": "Set Role Menus",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Menus to set",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/RoleMenu"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Menus"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/roles/{id}/users": {
      "get": {
        "description": "Get Role Users",
        "operationId": "Get Role Users",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "object id",
            "required": true,
            "schema": {
              "type": "string",
              "example": "SUPER_ADMIN"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Users"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      },
      "post": {
        "description": "Set Role Users",
        "operationId": "Set Role Users",
        "tags": [
          "Role"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "requestBody": {
          "description": "Users to set",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "$ref": "#/components/schemas/RoleUser"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "array",
                      "$ref": "#/components/schemas/Users"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/menus": {
      "get": {
        "description": "List Menus",
        "operationId": "List Menus",
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/filter"
          },
          {
            "$ref": "#/components/parameters/offset"
          },
          {
            "$ref": "#/components/parameters/limit"
          },
          {
            "$ref": "#/components/parameters/orders"
          },
          {
            "$ref": "#/components/parameters/fields"
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Menus"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    },
    "/terminal/v1/user-menus": {
      "get": {
        "description": "List My Menus",
        "operationId": "List My Menus",
        "tags": [
          "Menu"
        ],
        "security": [
          {
            "access": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer",
                      "example": 200
                    },
                    "status": {
                      "type": "string",
                      "example": "OK"
                    },
                    "message": {
                      "type": "string",
                      "example": "successed"
                    },
                    "data": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "description": "number of items found",
                          "type": "integer",
                          "example": 1
                        },
                        "data": {
                          "type": "array",
                          "$ref": "#/components/schemas/Menus"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token Invalid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "$ref": "#/components/schemas/ErrorLogin"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "access": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      },
      "refresh": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "parameters": {
      "offset": {
        "name": "__offset",
        "in": "query",
        "description": "number of items to skip",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "example": 0
        }
      },
      "limit": {
        "name": "__limit",
        "in": "query",
        "description": "max items to return",
        "required": false,
        "schema": {
          "type": "integer",
          "format": "int32",
          "minimum": 0,
          "example": 10
        }
      },
      "orders": {
        "name": "__orders",
        "in": "query",
        "description": "order by fields, eg. __orders=id,-created_time",
        "required": false,
        "schema": {
          "type": "string",
          "example": "-id"
        }
      },
      "fields": {
        "name": "__fields",
        "in": "query",
        "description": "fields to return, eg. __fields=id,name",
        "required": false,
        "schema": {
          "type": "string"
        }
      },
      "token": {
        "name": "authorization",
        "in": "header",
        "description": "access token",
        "required": true,
        "schema": {
          "type": "string",
          "example": "Bearer jwt-token"
        }
      },
      "filter": {
        "name": "name__icontains",
        "in": "query",
        "description": "field to filter, eg. field__operator=value<br/>\nfield scope: fields in model<br/>\noperator scope:  icontains/contains/istarts/starts/iends/ends/excludes/iexcludes/eq/ne/lt/lte/gt/gte/in/nin/null/nnull<br/>\nor shortcut for eq: field=value, shortcut for in: field[]=value1&field[]=value2<br/><br/>\nicontains/contains: field like '%value%', i means ignorecase<br/>\nistarts/starts: field like 'value%', i means ignorecase<br/>\niends/ends: field like '%value', i means ignorecase<br/>\nexcludes/iexcludes: field not like '%value%', i means ignorecase<br/>\neq/ne/lt/lte/gt/gte: obviously, means '=' / '!=' / '<' / '<=' / '>' / '>='<br/>\nin/nin: obviously<br/>\nnull/nnull: value is null/ not null, eg. field__null=\n",
        "required": false,
        "schema": {
          "type": "string",
          "example": "test"
        }
      }
    },
    "schemas": {
      "ErrorLogin": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Unauthorized"
          },
          "code": {
            "type": "integer",
            "example": 401
          },
          "status": {
            "type": "string",
            "example": "ERROR"
          },
          "data": {
            "type": "object",
            "example": null
          },
          "message": {
            "type": "string",
            "example": "you are unauthenticated, login needed"
          }
        }
      },
      "ErrorUserPass": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "example": "Unauthorized"
          },
          "code": {
            "type": "integer",
            "example": 401
          },
          "status": {
            "type": "string",
            "example": "ERROR"
          },
          "data": {
            "type": "object",
            "example": null
          },
          "message": {
            "type": "string",
            "example": "ops, username or password error, login deny"
          }
        }
      },
      "Assets": {
        "description": "list of assets",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/Asset"
        }
      },
      "Asset": {
        "description": "One Asset",
        "type": "object",
        "required": [
          "name",
          "ip_address",
          "port",
          "username",
          "password"
        ],
        "properties": {
          "id": {
            "description": "id",
            "type": "string",
            "example": "host000001"
          },
          "name": {
            "description": "name",
            "type": "string",
            "example": "host-app-1"
          },
          "display_name": {
            "description": "display_name",
            "type": "string",
            "example": "subsys01-unit01-host-app-1"
          },
          "ip_address": {
            "description": "ssh ip address",
            "type": "string",
            "example": "127.0.0.1"
          },
          "port": {
            "description": "ssh port",
            "type": "integer",
            "example": 22
          },
          "username": {
            "description": "ssh user name",
            "type": "string",
            "example": "root"
          },
          "password": {
            "description": "ssh user password",
            "type": "string",
            "example": "password"
          },
          "description": {
            "description": "description",
            "type": "string",
            "example": "app-1 of something"
          }
        }
      },
      "FileTransfer": {
        "description": "Record of File-transfer",
        "type": "object",
        "properties": {
          "id": {
            "description": "id",
            "type": "integer",
            "example": 1
          },
          "asset_id": {
            "description": "asset id",
            "type": "string",
            "example": "host000001"
          },
          "filepath": {
            "description": "file path",
            "type": "string",
            "example": "/tmp/file"
          },
          "filesize": {
            "description": "file size",
            "type": "integer",
            "example": 123456
          },
          "user": {
            "description": "operation user",
            "type": "string",
            "example": "admin"
          },
          "operation_type": {
            "description": "operation type",
            "type": "string",
            "example": "download"
          },
          "started_time": {
            "description": "time when transfer started",
            "type": "string",
            "example": "2021-01-01 00:00:00"
          },
          "ended_time": {
            "description": "time when transfer ended",
            "type": "string",
            "example": "2021-01-01 00:01:00"
          },
          "status": {
            "description": "transfer status",
            "type": "string",
            "example": "OK"
          },
          "message": {
            "description": "transfer error message",
            "type": "string",
            "example": ""
          },
          "asset": {
            "description": "asset object",
            "type": "object",
            "$ref": "#/components/schemas/Asset"
          }
        }
      },
      "SessionRecord": {
        "description": "Record of Session Operation",
        "type": "object",
        "properties": {
          "id": {
            "description": "id",
            "type": "integer",
            "example": 1
          },
          "asset_id": {
            "description": "asset id",
            "type": "string",
            "example": "host000001"
          },
          "filepath": {
            "description": "file path",
            "type": "string",
            "example": "s3://ip:port/bucket/object_key"
          },
          "filesize": {
            "description": "file size",
            "type": "integer",
            "example": 123456
          },
          "user": {
            "description": "operation user",
            "type": "string",
            "example": "admin"
          },
          "started_time": {
            "description": "time when transfer started",
            "type": "string",
            "example": "2021-01-01 00:00:00"
          },
          "ended_time": {
            "description": "time when transfer ended",
            "type": "string",
            "example": "2021-01-01 00:01:00"
          },
          "asset": {
            "description": "asset object",
            "type": "object",
            "$ref": "#/components/schemas/Asset"
          }
        }
      },
      "Bookmarks": {
        "description": "list of bookmarks",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/Bookmark"
        }
      },
      "Bookmark": {
        "description": "One Bookmark",
        "type": "object",
        "required": [
          "name",
          "expression",
          "roles"
        ],
        "properties": {
          "id": {
            "description": "id",
            "type": "integer",
            "example": 1
          },
          "name": {
            "description": "name",
            "type": "string",
            "example": "sys01 hosts"
          },
          "description": {
            "description": "description",
            "type": "string",
            "example": "hosts of sys01 that created"
          },
          "expression": {
            "description": "expression of wecube",
            "type": "string",
            "example": "wecmdb:host_resource_instance"
          },
          "roles": {
            "description": "auth roles",
            "type": "object",
            "properties": {
              "owner": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "SUPER_ADMIN"
                }
              },
              "executor": {
                "type": "array",
                "items": {
                  "type": "string",
                  "example": "SUPER_ADMIN"
                }
              }
            }
          }
        }
      },
      "Permissions": {
        "description": "list of permissions",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/Permission"
        }
      },
      "Permission": {
        "description": "One Permission",
        "type": "object",
        "required": [
          "name",
          "auth_upload",
          "auth_download",
          "auth_execute",
          "enabled"
        ],
        "properties": {
          "id": {
            "description": "id",
            "type": "integer",
            "example": 1
          },
          "name": {
            "description": "name",
            "type": "string",
            "example": ""
          },
          "description": {
            "description": "description",
            "type": "string",
            "example": ""
          },
          "auth_upload": {
            "description": "upload enabled",
            "type": "integer",
            "example": 1
          },
          "auth_download": {
            "description": "download enabled",
            "type": "integer",
            "example": 1
          },
          "auth_execute": {
            "description": "execute enabled(ssh connection)",
            "type": "integer",
            "example": 1
          },
          "enabled": {
            "description": "enabled",
            "type": "integer",
            "example": 1
          },
          "assets": {
            "description": "auth assets",
            "type": "array",
            "items": {
              "type": "string",
              "example": "host000001"
            }
          },
          "roles": {
            "description": "auth roles",
            "type": "array",
            "items": {
              "type": "string",
              "example": "SUPER_ADMIN"
            }
          }
        }
      },
      "JumpServers": {
        "description": "list of jump servers",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/JumpServer"
        }
      },
      "JumpServer": {
        "description": "One JumpServer",
        "type": "object",
        "required": [
          "name",
          "scope",
          "ip_address",
          "port",
          "username",
          "password"
        ],
        "properties": {
          "id": {
            "description": "id",
            "type": "string",
            "example": "jserver-01"
          },
          "name": {
            "description": "name",
            "type": "string",
            "example": "j-dev01"
          },
          "scope": {
            "description": "list of cidrs",
            "type": "string",
            "example": "10.0.0.0/16;10.1.0.0/16"
          },
          "ip_address": {
            "description": "ssh ip address",
            "type": "string",
            "example": "127.0.0.1"
          },
          "port": {
            "description": "ssh port",
            "type": "integer",
            "example": 22
          },
          "username": {
            "description": "ssh user name",
            "type": "string",
            "example": "root"
          },
          "password": {
            "description": "ssh user password",
            "type": "string",
            "example": "password"
          }
        }
      },
      "Menus": {
        "description": "list of menus",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/Menu"
        }
      },
      "Menu": {
        "description": "One Menu",
        "type": "object",
        "properties": {
          "id": {
            "description": "id",
            "type": "string",
            "example": "menu-02"
          },
          "display_name": {
            "description": "display name",
            "type": "string",
            "example": "menu of asset"
          },
          "url": {
            "description": "url of menu",
            "type": "string",
            "example": "/assets"
          },
          "seq_no": {
            "description": "order of menu",
            "type": "integer",
            "example": 1
          },
          "parent": {
            "description": "parent of menu",
            "type": "string",
            "example": "menu-01"
          },
          "is_active": {
            "description": "is active [yes or no]",
            "type": "string",
            "example": "yes"
          }
        }
      },
      "Roles": {
        "description": "list of roles",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/Role"
        }
      },
      "Role": {
        "description": "One Role",
        "type": "object",
        "required": [
          "id",
          "description",
          "is_system"
        ],
        "properties": {
          "id": {
            "description": "id",
            "type": "string",
            "example": "config_manager"
          },
          "description": {
            "description": "description",
            "type": "string",
            "example": "role of config manager"
          },
          "is_system": {
            "description": "is system [yes or no]",
            "type": "string",
            "example": "yes"
          }
        }
      },
      "Users": {
        "description": "list of users",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/User"
        }
      },
      "User": {
        "description": "One User",
        "type": "object",
        "required": [
          "id",
          "display_name",
          "password"
        ],
        "properties": {
          "id": {
            "description": "id",
            "type": "string",
            "example": "test01"
          },
          "display_name": {
            "description": "name",
            "type": "string",
            "example": "test user 01"
          },
          "password": {
            "description": "password",
            "type": "string",
            "example": "password"
          },
          "description": {
            "description": "description",
            "type": "string",
            "example": "description"
          },
          "is_system": {
            "description": "is system [yes or no]",
            "type": "string",
            "example": "yes"
          }
        }
      },
      "ResetPassword": {
        "description": "Reset Password",
        "type": "object",
        "properties": {
          "password": {
            "description": "password",
            "type": "string",
            "example": "password"
          }
        }
      },
      "UserRole": {
        "description": "Bind Role of User",
        "type": "array",
        "items": {
          "type": "string",
          "example": "config_manager"
        }
      },
      "RoleMenu": {
        "description": "Bind Menu of Role",
        "type": "array",
        "items": {
          "type": "string",
          "example": "menu02"
        }
      },
      "RoleUser": {
        "description": "Bind User of Role",
        "type": "array",
        "items": {
          "type": "string",
          "example": "test01"
        }
      },
      "Tokens": {
        "description": "List of token",
        "type": "array",
        "items": {
          "type": "object",
          "$ref": "#/components/schemas/Token"
        }
      },
      "Token": {
        "description": "Token",
        "type": "object",
        "properties": {
          "expiration": {
            "description": "unix time of expiration",
            "type": "string",
            "example": "1629700000"
          },
          "token": {
            "description": "token",
            "type": "string",
            "example": "jwt token here"
          },
          "tokenType": {
            "description": "tokenType[accessToken or refreshToken]",
            "type": "string",
            "example": "accessToken"
          }
        }
      },
      "UpdatePassword": {
        "description": "Reset Password",
        "type": "object",
        "required": [
          "newPassword",
          "oldPassword"
        ],
        "properties": {
          "newPassword": {
            "description": "newPassword",
            "type": "string",
            "example": "newPassword"
          },
          "oldPassword": {
            "description": "oldPassword",
            "type": "string",
            "example": "oldPassword"
          }
        }
      },
      "UserPassword": {
        "description": "User Password",
        "type": "object",
        "required": [
          "username",
          "password"
        ],
        "properties": {
          "username": {
            "description": "username",
            "type": "string",
            "example": "username"
          },
          "password": {
            "description": "password",
            "type": "string",
            "example": "password"
          }
        }
      }
    }
  }
}