{
  "openapi": "3.1.0",
  "info": {
    "title": "NextLogin Local API",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "http://127.0.0.1:18766/api/v1",
      "description": "NextLogin trên máy (chỉ loopback)"
    }
  ],
  "paths": {
    "/health": {
      "get": {
        "summary": "health",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/system": {
      "get": {
        "summary": "system info",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/engines": {
      "get": {
        "summary": "engine info",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles": {
      "get": {
        "summary": "profile list",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "post": {
        "summary": "profile create",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/batch/apply": {
      "post": {
        "summary": "profile batch apply",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/running": {
      "get": {
        "summary": "runtime running",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/presets": {
      "get": {
        "summary": "preset list",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "post": {
        "summary": "preset create",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/presets/{id}": {
      "get": {
        "summary": "preset get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "patch": {
        "summary": "preset patch",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "delete": {
        "summary": "preset delete",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/close-all": {
      "post": {
        "summary": "runtime close all",
        "description": "Scope: runtime",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/proxy/check": {
      "post": {
        "summary": "proxy check",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/proxy-manager/resources": {
      "get": {
        "summary": "proxy resources",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}": {
      "get": {
        "summary": "profile get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "patch": {
        "summary": "profile patch",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "delete": {
        "summary": "profile delete",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/clone": {
      "post": {
        "summary": "profile clone",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/open": {
      "post": {
        "summary": "runtime open",
        "description": "Scope: runtime",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/close": {
      "post": {
        "summary": "runtime close",
        "description": "Scope: runtime",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/status": {
      "get": {
        "summary": "runtime status",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/cdp": {
      "get": {
        "summary": "runtime cdp",
        "description": "Scope: cdp",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/proxy": {
      "put": {
        "summary": "proxy put",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/proxy/check": {
      "post": {
        "summary": "proxy profile check",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/groups": {
      "get": {
        "summary": "groups get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/group": {
      "put": {
        "summary": "group put",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/tags": {
      "put": {
        "summary": "tags put",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/import": {
      "post": {
        "summary": "import post",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/export": {
      "get": {
        "summary": "export get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/fingerprint/new": {
      "post": {
        "summary": "fingerprint new",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/fingerprint": {
      "put": {
        "summary": "fingerprint put",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/overview": {
      "get": {
        "summary": "overview get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/cookies": {
      "post": {
        "summary": "cookie post",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "get": {
        "summary": "cookie get",
        "description": "Scope: cookies:read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/extensions": {
      "get": {
        "summary": "extension get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "post": {
        "summary": "extension post",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "delete": {
        "summary": "extension delete",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "patch": {
        "summary": "extension patch",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/extensions/{extension_id}": {
      "delete": {
        "summary": "extension delete",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "patch": {
        "summary": "extension patch",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/scripts": {
      "get": {
        "summary": "scripts get",
        "description": "Scope: scripts",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/skills": {
      "get": {
        "summary": "skills get",
        "description": "Scope: scripts",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "post": {
        "summary": "skill save",
        "description": "Scope: scripts",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/scripts/run": {
      "post": {
        "summary": "script run",
        "description": "Scope: scripts",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/batch/scripts/run": {
      "post": {
        "summary": "batch script run",
        "description": "Scope: scripts",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/runs/{run_id}": {
      "get": {
        "summary": "run get",
        "description": "Scope: scripts",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/runs/{run_id}/stop": {
      "post": {
        "summary": "run stop",
        "description": "Scope: scripts",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/diagnostics": {
      "get": {
        "summary": "diagnostics get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/profiles/{id}/diagnostics/run": {
      "post": {
        "summary": "diagnostics post",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/settings": {
      "get": {
        "summary": "settings get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      },
      "patch": {
        "summary": "settings patch",
        "description": "Scope: profiles:write",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/events": {
      "get": {
        "summary": "websocket events",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    },
    "/openapi.json": {
      "get": {
        "summary": "openapi get",
        "description": "Scope: read",
        "responses": {
          "200": {
            "description": "Thành công"
          },
          "400": {
            "description": "Yêu cầu không hợp lệ"
          },
          "401": {
            "description": "Thiếu hoặc sai token"
          },
          "403": {
            "description": "Thiếu scope"
          },
          "409": {
            "description": "Xung đột profile"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ]
}