Portainer
@lint/portainerv2026.05.21.2
01README
Portainer API wrapper — snapshot endpoints/containers/stacks across every docker host, and drive container actions (start/stop/restart/kill/pause/unpause) plus image pulls from swamp workflows.
02Release Notes
Adds containerAction and pullImage methods. containerAction maps start/stop/restart/kill/pause/unpause to POST /api/endpoints/{id}/docker/containers/{cid}/{action}. pullImage maps to POST /api/endpoints/{id}/docker/images/create?fromImage=. Both record outcome (endpointId, action, target, HTTP status, response body) in an action_result resource and are non-throwing on HTTP error so batched calls survive single failures.
03Models
portainer.tsv2026.05.21.2
fn sync()
Fetch endpoints, containers, stacks across all docker hosts Portainer manages
fn containerAction(endpointId: number, containerId: string, action: enum)
Perform a docker action on a container via Portainer (start/stop/restart/kill/pause/unpause). Non-throwing on HTTP error — outcome lands in the action_result resource so batched calls survive single failures.
| Argument | Type | Description |
|---|---|---|
| endpointId | number | Portainer endpoint id (the numeric `id` from /api/endpoints — also surfaced in the `inventory.endpoints` resource) |
| containerId | string | Docker container id (full or short hex). Available on every container in the `inventory.containers` resource. |
| action | enum | Container action to invoke; maps 1:1 to POST /containers/{id}/{action} |
fn pullImage(endpointId: number, image: string)
Pull a docker image on a Portainer endpoint via POST /api/endpoints/{id}/docker/images/create?fromImage=<image>. Portainer streams the docker response; the final body lands in action_result for diagnostics.
| Argument | Type | Description |
|---|---|---|
| endpointId | number | Portainer endpoint id (the numeric `id` from /api/endpoints) |
| image | string | Image reference, e.g. 'ghcr.io/user/foo:latest' or 'nginx:1.27' |
04Previous Versions
2026.05.21.1May 21, 2026
05Stats
A
100 / 100
Downloads
5
Archive size
9.4 KB
- Has README or module doc2/2earned
- README has a code example1/1earned
- README is substantive1/1earned
- Most symbols documented1/1earned
- No slow types (deprecated)1/1earned
- Dependencies pass trust audit2/2earned
- Has description1/1earned
- Platform support declared (or universal)2/2earned
- License declared1/1earned
- Verified public repository2/2earned
06Platforms
07Labels