# Generated with protoc-gen-openapi # https://github.com/google/gnostic/tree/master/cmd/protoc-gen-openapi openapi: 3.0.3 info: title: "" version: 0.0.1 paths: /v1/machine-info: get: tags: - MachineInfo operationId: MachineInfo_GetMachineInfo responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.GetMachineInfoReply' /v1/machine-info/report: post: tags: - MachineInfo description: |- ReportMachineInfos persists/merges the reported machines into the receiver's storage. The receiver deduplicates by `host.machine_uuid`, `host.host_name`, and `network.local_ip` (composite natural key). operationId: MachineInfo_ReportMachineInfos requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ReportMachineInfosRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ReportMachineInfosReply' /v1/machine-infos: get: tags: - MachineInfo description: GetClusterMachineInfos returns paginated machines known by the receiver (leader/master node). operationId: MachineInfo_GetClusterMachineInfos parameters: - name: page in: query description: page starts from 1. schema: type: integer format: int32 - name: pageSize in: query description: pageSize is the maximum number of items returned. schema: type: integer format: int32 - name: keywords in: query description: keywords is the search keywords. schema: type: string - name: ip in: query description: ip is the IP address to search. schema: type: string - name: hostname in: query description: hostname is the hostname to search. schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.GetClusterMachineInfosReply' /v1/probe-task-actions/ping: post: tags: - ProbeTask operationId: ProbeTask_CreatePingProbeTasks requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.CreatePingProbeTasksRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.DispatchCreateProbeTasksReply' /v1/probe-tasks: get: tags: - ProbeTask operationId: ProbeTask_ListProbeTasks parameters: - name: page in: query schema: type: integer format: int32 - name: pageSize in: query schema: type: integer format: int32 - name: type in: query schema: type: string - name: keyword in: query schema: type: string - name: status in: query schema: type: integer format: enum responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ListProbeTasksReply' post: tags: - ProbeTask operationId: ProbeTask_CreateProbeTask requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.CreateProbeTaskRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ProbeTaskItem' /v1/probe-tasks/{uid}: get: tags: - ProbeTask operationId: ProbeTask_GetProbeTask parameters: - name: uid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ProbeTaskItem' put: tags: - ProbeTask operationId: ProbeTask_UpdateProbeTask parameters: - name: uid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.UpdateProbeTaskRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ProbeTaskItem' delete: tags: - ProbeTask operationId: ProbeTask_DeleteProbeTask parameters: - name: uid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.DeleteProbeTaskReply' /v1/probe-tasks/{uid}/status: patch: tags: - ProbeTask operationId: ProbeTask_UpdateProbeTaskStatus parameters: - name: uid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.UpdateProbeTaskStatusRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ProbeTaskItem' /v1/ssh-command-actions/batch-execute: post: tags: - SSHCommand description: BatchExecuteSSHCommands executes multiple command requests in one call. operationId: SSHCommand_BatchExecuteSSHCommands requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.BatchExecuteSSHCommandsRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.BatchExecuteSSHCommandsReply' /v1/ssh-command-actions/dispatch: post: tags: - SSHCommand description: DispatchSSHCommandToAgents pushes one command to target jade_tree agents. operationId: SSHCommand_DispatchSSHCommandToAgents requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.DispatchSSHCommandToAgentsRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.DispatchSSHCommandToAgentsReply' /v1/ssh-command-actions/dispatch/count: post: tags: - SSHCommand description: CountDispatchSSHCommandTargets counts affected machines before dispatch. operationId: SSHCommand_CountDispatchSSHCommandTargets requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.CountDispatchSSHCommandTargetsRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.CountDispatchSSHCommandTargetsReply' /v1/ssh-command-audits: get: tags: - SSHCommand operationId: SSHCommand_ListSSHCommandAudits parameters: - name: page in: query schema: type: integer format: int32 - name: pageSize in: query schema: type: integer format: int32 - name: statusFilter in: query schema: type: integer format: enum - name: keyword in: query schema: type: string - name: kind in: query schema: type: integer format: enum responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ListSSHCommandAuditsReply' /v1/ssh-command-audits/{uid}: get: tags: - SSHCommand operationId: SSHCommand_GetSSHCommandAudit parameters: - name: uid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandAuditItem' /v1/ssh-command-audits/{uid}/approve: post: tags: - SSHCommand description: ApproveSSHCommandAudit applies the audited payload to the command table and marks the audit approved. operationId: SSHCommand_ApproveSSHCommandAudit parameters: - name: uid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ApproveSSHCommandAuditRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ApproveSSHCommandAuditReply' /v1/ssh-command-audits/{uid}/reject: post: tags: - SSHCommand operationId: SSHCommand_RejectSSHCommandAudit parameters: - name: uid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.RejectSSHCommandAuditRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.RejectSSHCommandAuditReply' /v1/ssh-commands: get: tags: - SSHCommand operationId: SSHCommand_ListSSHCommands parameters: - name: page in: query schema: type: integer format: int32 - name: pageSize in: query schema: type: integer format: int32 - name: keyword in: query schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ListSSHCommandsReply' /v1/ssh-commands/submissions: post: tags: - SSHCommand description: SubmitCreateSSHCommand creates a pending audit record for a new command (not applied until approved). operationId: SSHCommand_SubmitCreateSSHCommand requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.SubmitCreateSSHCommandRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.SubmitSSHCommandAuditReply' /v1/ssh-commands/{commandUid}/execute: post: tags: - SSHCommand description: ExecuteSSHCommand runs a stored command template on a remote host over SSH. operationId: SSHCommand_ExecuteSSHCommand parameters: - name: commandUid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ExecuteSSHCommandRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.ExecuteSSHCommandReply' /v1/ssh-commands/{commandUid}/submissions: post: tags: - SSHCommand description: SubmitUpdateSSHCommand creates a pending audit record to change an existing command. operationId: SSHCommand_SubmitUpdateSSHCommand parameters: - name: commandUid in: path required: true schema: type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.SubmitUpdateSSHCommandRequest' required: true responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.SubmitSSHCommandAuditReply' /v1/ssh-commands/{uid}: get: tags: - SSHCommand operationId: SSHCommand_GetSSHCommand parameters: - name: uid in: path required: true schema: type: string responses: "200": description: OK content: application/json: schema: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandItem' components: schemas: jade_tree.api.v1.AgentInfo: type: object properties: endpoint: type: string description: endpoint is the backward-compatible merged endpoint string. version: type: string description: version is the collector self-reported version. httpEndpoint: type: string description: httpEndpoint is the collector self-reported HTTP endpoint. grpcEndpoint: type: string description: grpcEndpoint is the collector self-reported gRPC endpoint. jade_tree.api.v1.ApproveSSHCommandAuditReply: type: object properties: audit: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandAuditItem' command: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandItem' jade_tree.api.v1.ApproveSSHCommandAuditRequest: type: object properties: uid: type: string jade_tree.api.v1.BatchExecuteSSHCommandsItem: type: object properties: index: type: integer format: int32 reply: $ref: '#/components/schemas/jade_tree.api.v1.ExecuteSSHCommandReply' error: type: string jade_tree.api.v1.BatchExecuteSSHCommandsReply: type: object properties: items: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.BatchExecuteSSHCommandsItem' jade_tree.api.v1.BatchExecuteSSHCommandsRequest: type: object properties: requests: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.ExecuteSSHCommandRequest' jade_tree.api.v1.CPUCoreItem: type: object properties: id: type: integer format: int32 hardwareThreads: type: integer format: int32 logicalProcessors: type: array items: type: integer format: int32 jade_tree.api.v1.CPUInfo: type: object properties: totalCores: type: integer format: int32 totalHardwareThreads: type: integer format: int32 processors: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.CPUProcessorItem' jade_tree.api.v1.CPUProcessorItem: type: object properties: id: type: integer format: int32 vendor: type: string model: type: string totalCores: type: integer format: int32 totalHardwareThreads: type: integer format: int32 capabilities: type: array items: type: string cores: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.CPUCoreItem' jade_tree.api.v1.CountDispatchSSHCommandTargetsReply: type: object properties: count: type: string jade_tree.api.v1.CountDispatchSSHCommandTargetsRequest: type: object properties: filter: $ref: '#/components/schemas/jade_tree.api.v1.DispatchSSHCommandFilter' jade_tree.api.v1.CreatePingProbeTasksRequest: type: object properties: sourceMachineUids: type: array items: type: string targetMachineUids: type: array items: type: string timeoutSeconds: type: integer format: int32 jade_tree.api.v1.CreateProbeTaskRequest: type: object properties: type: type: string host: type: string port: type: string url: type: string name: type: string status: type: integer format: enum timeoutSeconds: type: integer format: int32 jade_tree.api.v1.DeleteProbeTaskReply: type: object properties: {} jade_tree.api.v1.DiskInfoItem: type: object properties: name: type: string type: type: string sizeBytes: type: string vendor: type: string model: type: string serialNumber: type: string wwn: type: string mounts: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.DiskMountItem' jade_tree.api.v1.DiskMountItem: type: object properties: mountPoint: type: string fsType: type: string totalBytes: type: string usedBytes: type: string freeBytes: type: string freeRate: type: number format: double jade_tree.api.v1.DispatchCreateProbeTaskResultItem: type: object properties: machineUid: type: string machineUuid: type: string hostName: type: string localIp: type: string endpoint: type: string createdCount: type: string error: type: string jade_tree.api.v1.DispatchCreateProbeTasksReply: type: object properties: total: type: string success: type: string failed: type: string createdCount: type: string items: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.DispatchCreateProbeTaskResultItem' jade_tree.api.v1.DispatchSSHCommandFilter: type: object properties: includeMachineUids: type: array items: type: string includeSystemTypes: type: array items: type: string includeAgentVersions: type: array items: type: string excludeMachineUids: type: array items: type: string excludeSystemTypes: type: array items: type: string excludeAgentVersions: type: array items: type: string jade_tree.api.v1.DispatchSSHCommandTargetResult: type: object properties: machineUid: type: string machineUuid: type: string hostName: type: string localIp: type: string endpoint: type: string reply: $ref: '#/components/schemas/jade_tree.api.v1.ExecuteSSHCommandReply' error: type: string jade_tree.api.v1.DispatchSSHCommandToAgentsReply: type: object properties: total: type: string success: type: string failed: type: string items: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.DispatchSSHCommandTargetResult' jade_tree.api.v1.DispatchSSHCommandToAgentsRequest: type: object properties: commandUid: type: string username: type: string password: type: string privateKey: type: string port: type: integer format: int32 timeoutSeconds: type: integer format: int32 filter: $ref: '#/components/schemas/jade_tree.api.v1.DispatchSSHCommandFilter' jade_tree.api.v1.ExecuteSSHCommandReply: type: object properties: stdout: type: string stderr: type: string exitCode: type: integer format: int32 jade_tree.api.v1.ExecuteSSHCommandRequest: type: object properties: commandUid: type: string host: type: string port: type: integer format: int32 username: type: string password: type: string privateKey: type: string timeoutSeconds: type: integer format: int32 jade_tree.api.v1.GetClusterMachineInfosReply: type: object properties: machines: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.GetMachineInfoReply' description: machines returns paginated machines known by the receiver. total: type: string description: total is the total number of matched machines. page: type: integer description: page is the current page (1-based). format: int32 pageSize: type: integer description: pageSize is the requested page size. format: int32 jade_tree.api.v1.GetMachineInfoReply: type: object properties: cpu: $ref: '#/components/schemas/jade_tree.api.v1.CPUInfo' memory: $ref: '#/components/schemas/jade_tree.api.v1.MemoryInfo' disks: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.DiskInfoItem' network: $ref: '#/components/schemas/jade_tree.api.v1.NetworkInfo' host: $ref: '#/components/schemas/jade_tree.api.v1.HostInfo' system: $ref: '#/components/schemas/jade_tree.api.v1.SystemInfo' uid: type: string description: uid is the persisted machine row ID. agent: allOf: - $ref: '#/components/schemas/jade_tree.api.v1.AgentInfo' description: agent is the collector self-reported connection and version info. jade_tree.api.v1.HostInfo: type: object properties: hostName: type: string machineUuid: type: string description: |- machineUuid is a best-effort host identifier (may collide across machines when cloned images share machine-id). Persisted rows use machineUuid + hostName + network.localIp as the composite unique key. On macOS it is sourced from `sysctl -n hw.uuid`. On Linux it is sourced from `/etc/machine-id` or `/var/lib/dbus/machine-id`. jade_tree.api.v1.ListProbeTasksReply: type: object properties: items: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.ProbeTaskItem' total: type: string page: type: integer format: int32 pageSize: type: integer format: int32 jade_tree.api.v1.ListSSHCommandAuditsReply: type: object properties: items: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandAuditItem' total: type: string page: type: integer format: int32 pageSize: type: integer format: int32 jade_tree.api.v1.ListSSHCommandsReply: type: object properties: items: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandItem' total: type: string page: type: integer format: int32 pageSize: type: integer format: int32 jade_tree.api.v1.MemoryInfo: type: object properties: totalPhysicalBytes: type: string totalUsableBytes: type: string supportedPageSizes: type: array items: type: string usedBytes: type: string freeBytes: type: string sharedBytes: type: string buffCacheBytes: type: string availableBytes: type: string swapTotalBytes: type: string swapUsedBytes: type: string swapFreeBytes: type: string jade_tree.api.v1.NetworkInfo: type: object properties: localIp: type: string outboundIp: type: string cidr: type: string dnsServers: type: array items: type: string totalRxBytes: type: string totalTxBytes: type: string nics: type: array items: type: string jade_tree.api.v1.ProbeTaskItem: type: object properties: uid: type: string type: type: string host: type: string port: type: string url: type: string name: type: string status: type: integer format: enum timeoutSeconds: type: integer format: int32 createdAt: type: string updatedAt: type: string jade_tree.api.v1.RejectSSHCommandAuditReply: type: object properties: audit: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandAuditItem' jade_tree.api.v1.RejectSSHCommandAuditRequest: type: object properties: uid: type: string reason: type: string jade_tree.api.v1.ReportMachineInfosReply: type: object properties: {} jade_tree.api.v1.ReportMachineInfosRequest: type: object properties: machines: type: array items: $ref: '#/components/schemas/jade_tree.api.v1.GetMachineInfoReply' description: |- machines contains hardware details for each machine. Receiver deduplicates by machine UUID, hostname, and primary local IP together. jade_tree.api.v1.SSHCommandAuditItem: type: object properties: uid: type: string targetCommandUid: type: string kind: type: integer format: enum status: type: integer format: enum name: type: string description: type: string content: type: string workDir: type: string env: type: object additionalProperties: type: string rejectReason: type: string createdAt: type: string updatedAt: type: string reviewedAt: type: string reviewerUid: type: string jade_tree.api.v1.SSHCommandItem: type: object properties: uid: type: string name: type: string description: type: string content: type: string workDir: type: string env: type: object additionalProperties: type: string disabled: type: boolean createdAt: type: string updatedAt: type: string jade_tree.api.v1.SubmitCreateSSHCommandRequest: type: object properties: name: type: string description: type: string content: type: string workDir: type: string env: type: object additionalProperties: type: string jade_tree.api.v1.SubmitSSHCommandAuditReply: type: object properties: audit: $ref: '#/components/schemas/jade_tree.api.v1.SSHCommandAuditItem' jade_tree.api.v1.SubmitUpdateSSHCommandRequest: type: object properties: commandUid: type: string name: type: string description: type: string content: type: string workDir: type: string env: type: object additionalProperties: type: string jade_tree.api.v1.SystemInfo: type: object properties: arch: type: string os: type: string version: type: string kernel: type: string jade_tree.api.v1.UpdateProbeTaskRequest: type: object properties: uid: type: string type: type: string host: type: string port: type: string url: type: string name: type: string timeoutSeconds: type: integer format: int32 jade_tree.api.v1.UpdateProbeTaskStatusRequest: type: object properties: uid: type: string status: type: integer format: enum tags: - name: MachineInfo description: MachineInfo provides host hardware and system profile details. - name: ProbeTask - name: SSHCommand description: SSHCommand manages predefined SSH command templates with an approval workflow.