Podman Exec API

Actions related to exec

Operations 4

POST /libpod/containers/{name}/exec Create an exec instance #
GET /libpod/exec/{id}/json Inspect an exec instance #
POST /libpod/exec/{id}/resize Resize an exec instance #
POST /libpod/exec/{id}/start Start an exec instance #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/podman-exec-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

podman-exec-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: podman@lists.podman.io
    name: Podman
    url: https://podman.io/community/
  description: This documentation describes the Podman v2.x+ RESTful API.
  license:
    name: Apache-2.0
    url: https://opensource.org/licenses/Apache-2.0
  termsOfService: https://github.com/containers/podman/blob/913caaa9b1de2b63692c9bae15120208194c9eb3/LICENSE
  title: supports a RESTful API for the Libpod library Exec API
  version: 5.0.0
  x-logo:
  - url: https://raw.githubusercontent.com/containers/libpod/main/logo/podman-logo.png
  - altText: Podman logo
servers:
- url: http://podman.io/
- url: https://podman.io/
tags:
- description: Actions related to exec
  name: Exec
paths:
  /libpod/containers/{name}/exec:
    post:
      description: Create an exec session to run a command inside a running container. Exec sessions will be automatically removed 5 minutes after they exit.
      operationId: ContainerExecLibpod
      parameters:
      - description: name of container
        in: path
        name: name
        required: true
        schema:
          type: string
      responses:
        '201':
          description: no error
        '404':
          $ref: '#/components/responses/containerNotFound'
        '409':
          description: container is paused
        '500':
          $ref: '#/components/responses/internalError'
      summary: Create an exec instance
      tags:
      - Exec
      requestBody:
        content:
          application/json:
            schema:
              properties:
                AttachStderr:
                  description: Attach to stderr of the exec command
                  type: boolean
                AttachStdin:
                  description: Attach to stdin of the exec command
                  type: boolean
                AttachStdout:
                  description: Attach to stdout of the exec command
                  type: boolean
                Cmd:
                  description: Command to run, as a string or array of strings.
                  items:
                    type: string
                  type: array
                DetachKeys:
                  description: '"Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _."

                    '
                  type: string
                Env:
                  description: A list of environment variables in the form ["VAR=value", ...]
                  items:
                    type: string
                  type: array
                Privileged:
                  default: false
                  description: Runs the exec process with extended privileges
                  type: boolean
                Tty:
                  description: Allocate a pseudo-TTY
                  type: boolean
                User:
                  description: '"The user, and optionally, group to run the exec process inside the container. Format is one of: user, user:group, uid, or uid:gid."

                    '
                  type: string
                WorkingDir:
                  description: The working directory for the exec process inside the container.
                  type: string
              type: object
          application/x-tar:
            schema:
              properties:
                AttachStderr:
                  description: Attach to stderr of the exec command
                  type: boolean
                AttachStdin:
                  description: Attach to stdin of the exec command
                  type: boolean
                AttachStdout:
                  description: Attach to stdout of the exec command
                  type: boolean
                Cmd:
                  description: Command to run, as a string or array of strings.
                  items:
                    type: string
                  type: array
                DetachKeys:
                  description: '"Override the key sequence for detaching a container. Format is a single character [a-Z] or ctrl-<value> where <value> is one of: a-z, @, ^, [, , or _."

                    '
                  type: string
                Env:
                  description: A list of environment variables in the form ["VAR=value", ...]
                  items:
                    type: string
                  type: array
                Privileged:
                  default: false
                  description: Runs the exec process with extended privileges
                  type: boolean
                Tty:
                  description: Allocate a pseudo-TTY
                  type: boolean
                User:
                  description: '"The user, and optionally, group to run the exec process inside the container. Format is one of: user, user:group, uid, or uid:gid."

                    '
                  type: string
                WorkingDir:
                  description: The working directory for the exec process inside the container.
                  type: string
              type: object
        description: Attributes for create
  /libpod/exec/{id}/json:
    get:
      description: Return low-level information about an exec instance.
      operationId: ExecInspectLibpod
      parameters:
      - description: Exec instance ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: no error
        '404':
          $ref: '#/components/responses/execSessionNotFound'
        '500':
          $ref: '#/components/responses/internalError'
      summary: Inspect an exec instance
      tags:
      - Exec
  /libpod/exec/{id}/resize:
    post:
      description: Resize the TTY session used by an exec instance. This endpoint only works if tty was specified as part of creating and starting the exec instance.
      operationId: ExecResizeLibpod
      parameters:
      - description: Exec instance ID
        in: path
        name: id
        required: true
        schema:
          type: string
      - description: Height of the TTY session in characters
        in: query
        name: h
        schema:
          type: integer
      - description: Width of the TTY session in characters
        in: query
        name: w
        schema:
          type: integer
      - description: Ignore containers not running errors
        in: query
        name: running
        schema:
          type: boolean
      responses:
        '201':
          description: no error
        '404':
          $ref: '#/components/responses/execSessionNotFound'
        '500':
          $ref: '#/components/responses/internalError'
      summary: Resize an exec instance
      tags:
      - Exec
  /libpod/exec/{id}/start:
    post:
      description: 'Starts a previously set up exec instance. If detach is true, this endpoint returns immediately after starting the command.

        Otherwise, it sets up an interactive session with the command. The stream format is the same as the attach endpoint.'
      operationId: ExecStartLibpod
      parameters:
      - description: Exec instance ID
        in: path
        name: id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: no error
        '404':
          $ref: '#/components/responses/execSessionNotFound'
        '409':
          description: container is not running.
        '500':
          $ref: '#/components/responses/internalError'
      summary: Start an exec instance
      tags:
      - Exec
      requestBody:
        content:
          application/json:
            schema:
              properties:
                Detach:
                  description: Detach from the command.
                  type: boolean
                Tty:
                  description: Allocate a pseudo-TTY.
                  type: boolean
                h:
                  description: Height of the TTY session in characters. Tty must be set to true to use it.
                  type: integer
                w:
                  description: Width of the TTY session in characters. Tty must be set to true to use it.
                  type: integer
              type: object
          application/x-tar:
            schema:
              properties:
                Detach:
                  description: Detach from the command.
                  type: boolean
                Tty:
                  description: Allocate a pseudo-TTY.
                  type: boolean
                h:
                  description: Height of the TTY session in characters. Tty must be set to true to use it.
                  type: integer
                w:
                  description: Width of the TTY session in characters. Tty must be set to true to use it.
                  type: integer
              type: object
        description: Attributes for start
components:
  schemas:
    ErrorModel:
      description: ErrorModel is used in remote connections with podman
      properties:
        cause:
          description: API root cause formatted for automated parsing
          example: API root cause
          type: string
          x-go-name: Because
        message:
          description: human error message, formatted for a human to read
          example: human error message
          type: string
          x-go-name: Message
        response:
          description: HTTP response code
          format: int64
          minimum: 400
          type: integer
          x-go-name: ResponseCode
      type: object
      x-go-package: go.podman.io/podman/v6/pkg/errorhandling
  responses:
    execSessionNotFound:
      description: No such exec instance
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorModel'
        application/octet-stream:
          schema:
            $ref: '#/components/schemas/ErrorModel'
        text/plain:
          schema:
            $ref: '#/components/schemas/ErrorModel'
    internalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorModel'
        application/octet-stream:
          schema:
            $ref: '#/components/schemas/ErrorModel'
        text/plain:
          schema:
            $ref: '#/components/schemas/ErrorModel'
    containerNotFound:
      description: No such container
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorModel'
        application/octet-stream:
          schema:
            $ref: '#/components/schemas/ErrorModel'
        text/plain:
          schema:
            $ref: '#/components/schemas/ErrorModel'