{"components":{"securitySchemes":{"bearerAuth":{"description":"Token obtained from POST /auth/login","scheme":"bearer","type":"http"}}},"info":{"description":"Desktop automation API for controlling Linux desktops.","title":"desktopkit API","version":"1.0.0"},"openapi":"3.0.3","paths":{"/actions":{"get":{"description":"Returns the most recent actions executed by the server.","parameters":[{"description":"Maximum number of entries to return","in":"query","name":"limit","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":[{"action":"mouse.click","duration_ms":42,"params":"...","result":"ok","timestamp":"..."}]}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Get recent action log","tags":["Actions"]}},"/application/close":{"post":{"description":"Closes the window with the given ID.","requestBody":{"content":{"application/json":{"example":{"window_id":12345}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Close an application window","tags":["Application"]}},"/application/open":{"post":{"description":"Launches an application by its executable path, optionally with arguments.","requestBody":{"content":{"application/json":{"example":{"args":["file.txt"],"path":"/usr/bin/gedit"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"pid":12345,"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Open an application","tags":["Application"]}},"/application/running":{"get":{"description":"Checks whether a process with the given name is currently running.","parameters":[{"description":"Process name to search for","in":"query","name":"name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"example":{"pids":[12345],"running":true}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Check if application is running","tags":["Application"]}},"/auth/login":{"post":{"description":"Validates the Unix password of the server user and returns a bearer token.","requestBody":{"content":{"application/json":{"example":{"password":"..."}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"expires_in_s":28800,"token":"abc123..."}}},"description":"Success"}},"security":[],"summary":"Authenticate with Unix password","tags":["Auth"]}},"/auth/logout":{"post":{"description":"Removes the bearer token from the server, ending the session.","responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Invalidate current token","tags":["Auth"]}},"/auth/token-info":{"get":{"description":"Returns whether the current token is valid and how many seconds remain.","responses":{"200":{"content":{"application/json":{"example":{"remaining_ttl_s":28750,"valid":true}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Check token validity and remaining TTL","tags":["Auth"]}},"/clipboard":{"get":{"description":"Returns the current text content of the system clipboard.","responses":{"200":{"content":{"application/json":{"example":{"text":"clipboard content"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Read clipboard contents","tags":["Clipboard"]},"post":{"description":"Sets the system clipboard to the given text.","requestBody":{"content":{"application/json":{"example":{"text":"new content"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Write to clipboard","tags":["Clipboard"]}},"/health":{"get":{"description":"Returns server health status. No authentication required.","responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[],"summary":"Health check","tags":["System"]}},"/keyboard/hotkey":{"post":{"description":"Presses a hotkey combination. Keys: ctrl, alt, shift, super, tab, enter, escape, backspace, delete, home, end, pageup, pagedown, arrowup/arrowdown/arrowleft/arrowright, f1-f12, {\"char\":\"a\"}.","requestBody":{"content":{"application/json":{"example":{"keys":["ctrl",{"char":"s"}]}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Press key combination","tags":["Keyboard"]}},"/keyboard/type":{"post":{"description":"Types the given text string using simulated keystrokes.","requestBody":{"content":{"application/json":{"example":{"text":"Hello, World!"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Type text","tags":["Keyboard"]}},"/mouse/click":{"post":{"description":"Performs a single mouse click at the current cursor position.","requestBody":{"content":{"application/json":{"example":{"button":"left"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Click at current position","tags":["Mouse"]}},"/mouse/double-click":{"post":{"description":"Performs a double click at the current cursor position.","requestBody":{"content":{"application/json":{"example":{"button":"left"}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Double-click at current position","tags":["Mouse"]}},"/mouse/drag":{"post":{"description":"Performs a mouse drag operation between two screen positions.","requestBody":{"content":{"application/json":{"example":{"button":"left","from_x":100,"from_y":200,"to_x":300,"to_y":400}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Drag from one position to another","tags":["Mouse"]}},"/mouse/move":{"post":{"description":"Moves the mouse cursor to the given absolute screen position.","requestBody":{"content":{"application/json":{"example":{"x":100,"y":200}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Move cursor to coordinates","tags":["Mouse"]}},"/mouse/scroll":{"post":{"description":"Moves cursor to (x, y) and scrolls by the given deltas.","requestBody":{"content":{"application/json":{"example":{"delta_x":0,"delta_y":-3,"x":500,"y":300}}},"required":true},"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Scroll at position","tags":["Mouse"]}},"/screens":{"get":{"description":"Returns information about all connected screens/monitors.","responses":{"200":{"content":{"application/json":{"example":{"screens":[{"height":1080,"id":0,"width":1920}]}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"List available screens","tags":["Screenshot"]}},"/screenshot":{"get":{"description":"Takes a screenshot of the entire screen and returns it as base64-encoded PNG.","parameters":[{"description":"Screen index (0 = primary)","in":"query","name":"screen_id","required":false,"schema":{"type":"integer"}},{"description":"Draw a red ring around the cursor position","in":"query","name":"cursor_ring","required":false,"schema":{"type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"example":{"height":1080,"image":"<base64>","width":1920}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Capture full screen","tags":["Screenshot"]}},"/screenshot/cursor-position":{"get":{"description":"Returns the current mouse cursor coordinates.","responses":{"200":{"content":{"application/json":{"example":{"x":512,"y":384}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Get current cursor position","tags":["Screenshot"]}},"/screenshot/region":{"get":{"description":"Takes a screenshot of a rectangular region.","parameters":[{"description":"Left edge X coordinate","in":"query","name":"x","required":true,"schema":{"type":"integer"}},{"description":"Top edge Y coordinate","in":"query","name":"y","required":true,"schema":{"type":"integer"}},{"description":"Region width in pixels","in":"query","name":"width","required":true,"schema":{"type":"integer"}},{"description":"Region height in pixels","in":"query","name":"height","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"height":300,"image":"<base64>","width":400}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Capture screen region","tags":["Screenshot"]}},"/windows":{"get":{"description":"Returns a list of all open windows with their IDs, titles, and geometry.","responses":{"200":{"content":{"application/json":{"example":{"windows":[{"height":600,"id":12345,"title":"Terminal","width":800,"x":0,"y":0}]}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"List all windows","tags":["Windows"]}},"/windows/dialog":{"get":{"description":"Checks if there is an active dialog or modal window.","responses":{"200":{"content":{"application/json":{"example":{"dialog":null}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Detect active dialog/modal","tags":["Windows"]}},"/windows/focused":{"get":{"description":"Returns information about the currently focused window.","responses":{"200":{"content":{"application/json":{"example":{"height":600,"id":12345,"title":"Terminal","width":800,"x":0,"y":0}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Get focused window","tags":["Windows"]}},"/windows/{id}/focus":{"post":{"description":"Brings the window with the given ID to the foreground and focuses it.","parameters":[{"description":"Window ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"example":{"status":"ok"}}},"description":"Success"}},"security":[{"bearerAuth":[]}],"summary":"Focus a window by ID","tags":["Windows"]}}},"servers":[{"url":"http://0.0.0.0:8083"}],"tags":[{"name":"Auth"},{"name":"Screenshot"},{"name":"Mouse"},{"name":"Keyboard"},{"name":"Clipboard"},{"name":"Windows"},{"name":"Application"},{"name":"Actions"},{"name":"System"}]}