# fleets-api ## Pages - [Fleets API](https://docs.ezghcloud.com/fleets-api/index.md) — Keyless shell sessions and run command on machines running the EZGH Fleets agent. Every path is under a project; lists are paged with limit, cursor and nextCursor. - [Cancel a command run](https://docs.ezghcloud.com/fleets-api/CancelCommand/index.md) — Pending invocations end cancelled; running ones are stopped (SIGTERM, then SIGKILL after 10 seconds). - [Create a script](https://docs.ezghcloud.com/fleets-api/CreateScript/index.md) — Creates the script with its version 1. - [Add a script version](https://docs.ezghcloud.com/fleets-api/CreateScriptVersion/index.md) — Versions are immutable; the new one becomes latestVersion. - [Delete a script and its versions](https://docs.ezghcloud.com/fleets-api/DeleteScript/index.md) - [Deregister a node](https://docs.ezghcloud.com/fleets-api/DeregisterNode/index.md) — Ends its connections and sessions. - [Get a command run](https://docs.ezghcloud.com/fleets-api/GetCommandRun/index.md) - [Get a node](https://docs.ezghcloud.com/fleets-api/GetNode/index.md) - [Get a script](https://docs.ezghcloud.com/fleets-api/GetScript/index.md) - [Get a script version](https://docs.ezghcloud.com/fleets-api/GetScriptVersion/index.md) - [Get a session](https://docs.ezghcloud.com/fleets-api/GetSession/index.md) — 404 once the session has ended: sessions are ephemeral, and Trails is the record of past ones. - [Get a project's Fleets settings](https://docs.ezghcloud.com/fleets-api/GetSettings/index.md) — The defaults until they're first changed. - [Keep a session open](https://docs.ezghcloud.com/fleets-api/KeepSessionAlive/index.md) — Checks the session's start permission (fleets.sessions.start) as the caller again; a 403 ends the session revoked. Without a keepalive for 5 minutes it ends keepalive_missed. Not recorded in Trails. - [List a run's invocations, one per node](https://docs.ezghcloud.com/fleets-api/ListCommandInvocations/index.md) - [List a project's command runs, newest first](https://docs.ezghcloud.com/fleets-api/ListCommandRuns/index.md) - [List a project's nodes, newest first](https://docs.ezghcloud.com/fleets-api/ListNodes/index.md) - [List a project's scripts, newest first](https://docs.ezghcloud.com/fleets-api/ListScripts/index.md) - [List a project's live sessions, newest first](https://docs.ezghcloud.com/fleets-api/ListSessions/index.md) — Live sessions only (pending, connected or reconnecting): sessions are ephemeral, and Trails is the record of past ones. - [Register a machine as a node](https://docs.ezghcloud.com/fleets-api/RegisterNode/index.md) — Called by the agent as its Bot. An EZGH instance's key links the node to the instance; 409 node_exists when the instance already has a bound node (reset it first). - [Reset a node's registration](https://docs.ezghcloud.com/fleets-api/ResetNode/index.md) — Clears the node's binding and ends its connections and sessions; the next registration from its instance binds again and keeps the node's ID. - [Get a ticket to reconnect to a session](https://docs.ezghcloud.com/fleets-api/ResumeSession/index.md) — Checks the session's start permission as the caller again. Redeem the ticket on url within 30 seconds, then send resume with the last offset received. - [Run a command or script on nodes](https://docs.ezghcloud.com/fleets-api/SendCommand/index.md) — Every target is checked as the caller first: fleets.commands.run, or fleets.scripts.run on the script and fleets.scripts.runOn, on each node's resource name + /. One denied target is 403 for the whole run; a tag selector matching no node is 400 no_targets. The command text and parameter values aren't recorded in Trails. - [Start a shell session on a node](https://docs.ezghcloud.com/fleets-api/StartSession/index.md) — 409 node_offline when the node isn't connected; Open url within 30 seconds with the WebSocket subprotocols ezgh.fleets.session.v1 and ticket., and call keepalive every 2 minutes. - [Terminate a session](https://docs.ezghcloud.com/fleets-api/TerminateSession/index.md) - [Rename a node or replace its tags](https://docs.ezghcloud.com/fleets-api/UpdateNode/index.md) — A linked instance's node takes its tags from the instance. - [Rename a script or change its description](https://docs.ezghcloud.com/fleets-api/UpdateScript/index.md) - [Change a project's Fleets settings](https://docs.ezghcloud.com/fleets-api/UpdateSettings/index.md) - [CommandRun](https://docs.ezghcloud.com/fleets-api/schemas/CommandRun/index.md) - [CommandRunCreate](https://docs.ezghcloud.com/fleets-api/schemas/CommandRunCreate/index.md) - [CommandRunList](https://docs.ezghcloud.com/fleets-api/schemas/CommandRunList/index.md) - [Error](https://docs.ezghcloud.com/fleets-api/schemas/Error/index.md) — Every non-2xx answer. Clients branch on code, never on message. - [Identity](https://docs.ezghcloud.com/fleets-api/schemas/Identity/index.md) - [Invocation](https://docs.ezghcloud.com/fleets-api/schemas/Invocation/index.md) - [InvocationList](https://docs.ezghcloud.com/fleets-api/schemas/InvocationList/index.md) - [Node](https://docs.ezghcloud.com/fleets-api/schemas/Node/index.md) - [NodeList](https://docs.ezghcloud.com/fleets-api/schemas/NodeList/index.md) - [NodeOS](https://docs.ezghcloud.com/fleets-api/schemas/NodeOS/index.md) - [NodeRegister](https://docs.ezghcloud.com/fleets-api/schemas/NodeRegister/index.md) - [NodeUpdate](https://docs.ezghcloud.com/fleets-api/schemas/NodeUpdate/index.md) - [QuotaExceeded](https://docs.ezghcloud.com/fleets-api/schemas/QuotaExceeded/index.md) — quota_exceeded: the quota that refused the request. Never with Retry-After. - [RunScript](https://docs.ezghcloud.com/fleets-api/schemas/RunScript/index.md) - [RunTargets](https://docs.ezghcloud.com/fleets-api/schemas/RunTargets/index.md) — Explicit nodes, or a tag selector in the project, resolved once when the run is created: 1 to 1,000 nodes. - [Script](https://docs.ezghcloud.com/fleets-api/schemas/Script/index.md) - [ScriptCreate](https://docs.ezghcloud.com/fleets-api/schemas/ScriptCreate/index.md) - [ScriptList](https://docs.ezghcloud.com/fleets-api/schemas/ScriptList/index.md) - [ScriptParameter](https://docs.ezghcloud.com/fleets-api/schemas/ScriptParameter/index.md) - [ScriptUpdate](https://docs.ezghcloud.com/fleets-api/schemas/ScriptUpdate/index.md) - [ScriptVersion](https://docs.ezghcloud.com/fleets-api/schemas/ScriptVersion/index.md) - [ScriptVersionCreate](https://docs.ezghcloud.com/fleets-api/schemas/ScriptVersionCreate/index.md) - [Session](https://docs.ezghcloud.com/fleets-api/schemas/Session/index.md) - [SessionList](https://docs.ezghcloud.com/fleets-api/schemas/SessionList/index.md) - [SessionStart](https://docs.ezghcloud.com/fleets-api/schemas/SessionStart/index.md) - [SessionStarted](https://docs.ezghcloud.com/fleets-api/schemas/SessionStarted/index.md) - [SessionTicket](https://docs.ezghcloud.com/fleets-api/schemas/SessionTicket/index.md) - [Settings](https://docs.ezghcloud.com/fleets-api/schemas/Settings/index.md) - [Tags](https://docs.ezghcloud.com/fleets-api/schemas/Tags/index.md) — At most 50; keys 1-128 characters, values at most 256, keys starting with ezgh: are reserved.