Podman system (compat) API

Actions related to Podman and compatibility engines

OpenAPI Specification

podman-system-compat-api-openapi.yml Raw ↑
swagger: '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. It consists of a Docker-compatible

    API and a Libpod API providing support for Podman’s unique features such as pods.


    To start the service and keep it running for 5,000 seconds (-t 0 runs forever):


    podman system service -t 5000 &


    You can then use cURL on the socket using requests documented below.


    NOTE: if you install the package podman-docker, it will create a symbolic

    link for /run/docker.sock to /run/podman/podman.sock


    NOTE: Some fields in the API response JSON are encoded as omitempty, which means that

    if said field has a zero value, they will not be encoded in the API response. This

    is a feature to help reduce the size of the JSON responses returned via the API.


    NOTE: Due to the limitations of [go-swagger](https://github.com/go-swagger/go-swagger),

    some field values that have a complex type show up as null in the docs as well as in the

    API responses. This is because the zero value for the field type is null. The field

    description in the docs will state what type the field is expected to be for such cases.


    See podman-system-service(1) for more information.


    Quick Examples:


    ''podman info''


    curl --unix-socket /run/podman/podman.sock http://d/v6.0.0/libpod/info


    ''podman pull quay.io/containers/podman''


    curl -XPOST --unix-socket /run/podman/podman.sock -v ''http://d/v6.0.0/images/create?fromImage=quay.io%2Fcontainers%2Fpodman''


    ''podman list images''


    curl --unix-socket /run/podman/podman.sock -v ''http://d/v6.0.0/libpod/images/json'' | jq'
  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 artifacts system (compat) API
  version: 5.0.0
  x-logo:
  - url: https://raw.githubusercontent.com/containers/libpod/main/logo/podman-logo.png
  - altText: Podman logo
host: podman.io
basePath: /
schemes:
- http
- https
consumes:
- application/json
- application/x-tar
produces:
- application/json
- application/octet-stream
- text/plain
tags:
- description: Actions related to Podman and compatibility engines
  name: system (compat)
paths:
  /auth:
    post:
      operationId: SystemAuth
      parameters:
      - description: Authentication to check
        in: body
        name: authConfig
        schema:
          $ref: '#/definitions/AuthConfig'
      produces:
      - application/json
      responses:
        '200':
          $ref: '#/responses/systemAuthResponse'
        '500':
          $ref: '#/responses/internalError'
      summary: Check auth configuration
      tags:
      - system (compat)
  /events:
    get:
      description: Returns events filtered on query parameters
      operationId: SystemEvents
      parameters:
      - description: start streaming events from this time
        in: query
        name: since
        type: string
      - description: stop streaming events later than this
        in: query
        name: until
        type: string
      - description: JSON encoded map[string][]string of constraints
        in: query
        name: filters
        type: string
      produces:
      - application/json
      responses:
        '200':
          description: returns a string of json data describing an event
        '500':
          $ref: '#/responses/internalError'
      summary: Get events
      tags:
      - system (compat)
  /info:
    get:
      description: Returns information on the system and libpod configuration
      operationId: SystemInfo
      produces:
      - application/json
      responses:
        '200':
          description: to be determined
        '500':
          $ref: '#/responses/internalError'
      summary: Get info
      tags:
      - system (compat)
  /libpod/_ping:
    get:
      description: 'Return protocol information in response headers.

        `HEAD /libpod/_ping` is also supported.

        `/_ping` is available for compatibility with other engines.

        The ''_ping'' endpoints are not versioned.

        '
      operationId: SystemPing
      produces:
      - text/plain
      responses:
        '200':
          description: Success
          headers:
            API-Version:
              description: Max compatibility API Version the server supports
              type: string
            BuildKit-Version:
              description: Default version of docker image builder
              type: string
            Cache-Control:
              description: always no-cache
              type: string
            Docker-Experimental:
              description: If the server is running with experimental mode enabled, always true
              type: boolean
            Libpod-API-Version:
              description: 'Max Podman API Version the server supports.

                Available if service is backed by Podman, therefore may be used to

                determine if talking to Podman engine or another engine

                '
              type: string
            Libpod-Buildah-Version:
              description: "Default version of libpod image builder.\n  Available if service is backed by Podman, therefore may be used to\n  determine if talking to Podman engine or another engine\n"
              type: string
            Pragma:
              description: always no-cache
              type: string
          schema:
            description: OK
            example: OK
            type: string
        '500':
          $ref: '#/responses/internalError'
      summary: Ping service
      tags:
      - system (compat)
  /system/df:
    get:
      description: Return information about disk usage for containers, images, and volumes
      operationId: SystemDataUsage
      produces:
      - application/json
      responses:
        '200':
          $ref: '#/responses/systemDiskUsage'
        '500':
          $ref: '#/responses/internalError'
      summary: Show disk usage
      tags:
      - system (compat)
  /version:
    get:
      operationId: SystemVersion
      produces:
      - application/json
      responses:
        '200':
          $ref: '#/responses/versionResponse'
      summary: Component Version information
      tags:
      - system (compat)
definitions:
  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
  AuthReport:
    type: object
    x-go-package: go.podman.io/podman/v6/pkg/domain/entities
  SystemDfReport:
    description: ServiceOptions provides the input for starting an API and sidecar pprof services
    type: object
    x-go-package: go.podman.io/podman/v6/pkg/domain/entities
  AuthConfig:
    description: AuthConfig contains authorization information for connecting to a Registry
    properties:
      auth:
        type: string
        x-go-name: Auth
      email:
        description: 'Email is an optional value associated with the username.

          This field is deprecated and will be removed in a later

          version of docker.'
        type: string
        x-go-name: Email
      identitytoken:
        description: 'IdentityToken is used to authenticate the user and get

          an access token for the registry.'
        type: string
        x-go-name: IdentityToken
      password:
        type: string
        x-go-name: Password
      registrytoken:
        description: RegistryToken is a bearer token to be sent to a registry
        type: string
        x-go-name: RegistryToken
      serveraddress:
        type: string
        x-go-name: ServerAddress
      username:
        type: string
        x-go-name: Username
    type: object
    x-go-package: go.podman.io/podman/v6/pkg/domain/entities/types
  ComponentVersion:
    description: ServiceOptions provides the input for starting an API and sidecar pprof services
    type: object
    x-go-package: go.podman.io/podman/v6/pkg/domain/entities
responses:
  systemDiskUsage:
    description: Disk usage
    schema:
      $ref: '#/definitions/SystemDfReport'
  versionResponse:
    description: Version
    schema:
      $ref: '#/definitions/ComponentVersion'
  systemAuthResponse:
    description: Auth response
    schema:
      $ref: '#/definitions/AuthReport'
  internalError:
    description: Internal server error
    schema:
      $ref: '#/definitions/ErrorModel'