Podman networks (compat) API
Actions related to networks for the compatibility endpoints
Actions related to networks for the compatibility endpoints
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/podman-networks-compat-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
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: 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. 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 networks (compat) networks (compat) 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 networks for the compatibility endpoints
name: networks (compat)
paths:
/networks:
get:
description: Display summary of network configurations
operationId: NetworkList
parameters:
- description: "JSON encoded value of the filters (a `map[string][]string`) to process on the network list. Currently available filters:\n - `name=[name]` Matches network name (accepts regex).\n - `id=[id]` Matches for full or partial ID.\n - `driver=[driver]` Only bridge is supported.\n - `label=[key]` or `label=[key=value]` Matches networks based on the presence of a label alone or a label and a value.\n"
in: query
name: filters
schema:
type: string
responses:
'200':
$ref: '#/components/responses/networkListCompat'
'500':
$ref: '#/components/responses/internalError'
summary: List networks
tags:
- networks (compat)
/networks/{name}:
delete:
description: Remove a network
operationId: NetworkDelete
parameters:
- description: the name of the network
in: path
name: name
required: true
schema:
type: string
- description: Remove containers associated with the network.
in: query
name: force
schema:
type: boolean
default: false
- description: Seconds to wait for container removal when force is set.
in: query
name: timeout
schema:
type: integer
responses:
'204':
description: no error
'404':
$ref: '#/components/responses/networkNotFound'
'500':
$ref: '#/components/responses/internalError'
summary: Remove a network
tags:
- networks (compat)
get:
description: Display low level configuration network
operationId: NetworkInspect
parameters:
- description: the name of the network
in: path
name: name
required: true
schema:
type: string
- description: Detailed inspect output for troubleshooting
in: query
name: verbose
schema:
type: boolean
- description: Filter the network by scope (swarm, global, or local)
in: query
name: scope
schema:
type: string
responses:
'200':
$ref: '#/components/responses/networkInspectCompat'
'404':
$ref: '#/components/responses/networkNotFound'
'500':
$ref: '#/components/responses/internalError'
summary: Inspect a network
tags:
- networks (compat)
/networks/{name}/connect:
post:
description: Connect a container to a network
operationId: NetworkConnect
parameters:
- description: the name of the network
in: path
name: name
required: true
schema:
type: string
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/badParamError'
'403':
$ref: '#/components/responses/networkConnectedError'
'500':
$ref: '#/components/responses/internalError'
summary: Connect container to network
tags:
- networks (compat)
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/networkConnectRequest'
application/x-tar:
schema:
$ref: '#/components/schemas/networkConnectRequest'
description: attributes for connecting a container to a network
/networks/{name}/disconnect:
post:
description: Disconnect a container from a network
operationId: NetworkDisconnect
parameters:
- description: the name of the network
in: path
name: name
required: true
schema:
type: string
responses:
'200':
description: OK
'400':
$ref: '#/components/responses/badParamError'
'500':
$ref: '#/components/responses/internalError'
summary: Disconnect container from network
tags:
- networks (compat)
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/networkDisconnectRequest'
application/x-tar:
schema:
$ref: '#/components/schemas/networkDisconnectRequest'
description: attributes for disconnecting a container from a network
/networks/create:
post:
description: Create a network configuration
operationId: NetworkCreate
responses:
'201':
description: network created
content:
application/json:
schema:
properties:
Id:
type: string
Warning:
type: string
type: object
'400':
$ref: '#/components/responses/badParamError'
'500':
$ref: '#/components/responses/internalError'
summary: Create network
tags:
- networks (compat)
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/networkCreate'
application/x-tar:
schema:
$ref: '#/components/schemas/networkCreate'
description: attributes for creating a network
/networks/prune:
post:
description: Remove networks that do not have containers
operationId: NetworkPrune
parameters:
- description: "Filters to process on the prune list, encoded as JSON (a map[string][]string).\nAvailable filters:\n - `until=<timestamp>` Prune networks created before this timestamp. The <timestamp> can be Unix timestamps, date formatted timestamps, or Go duration strings (e.g. `10m`, `1h30m`) computed relative to the daemon machine’s time.\n - `label` (`label=<key>`, `label=<key>=<value>`, `label!=<key>`, or `label!=<key>=<value>`) Prune networks with (or without, in case `label!=...` is used) the specified labels.\n"
in: query
name: filters
schema:
type: string
responses:
'200':
description: OK
content:
application/json:
schema:
properties:
NetworksDeleted:
items:
type: string
type: array
type: object
'500':
$ref: '#/components/responses/internalError'
summary: Delete unused networks
tags:
- networks (compat)
components:
schemas:
Digest:
description: 'The following is an example of the contents of Digest types:
sha256:7173b809ca12ec5dee4506cd86be934c4596dd234ee82c0662eac04a8c2c71dc
This allows to abstract the digest behind this type and work only in those
terms.'
title: 'Digest allows simple protection of hex formatted digest strings, prefixed
by their algorithm. Strings of type Digest have some guarantee of being in
the correct format and it provides quick access to the components of a
digest string.'
type: string
x-go-package: github.com/opencontainers/go-digest
SignatureTimestamp:
properties:
Timestamp:
format: date-time
type: string
Type:
$ref: '#/components/schemas/SignatureTimestampType'
URI:
type: string
title: SignatureTimestamp contains information about a verified signed timestamp for an image signature.
type: object
x-go-package: github.com/moby/moby/api/types/image
ManifestKind:
type: string
x-go-package: github.com/moby/moby/api/types/image
BuildIdentity:
properties:
CreatedAt:
description: CreatedAt is the time when the build ran.
format: date-time
type: string
Ref:
description: 'Ref is the identifier for the build request. This reference can be used to
look up the build details in BuildKit history API.'
type: string
title: BuildIdentity contains build reference information if image was created via build.
type: object
x-go-package: github.com/moby/moby/api/types/image
SignatureType:
title: SignatureType is the type of signature format.
type: string
x-go-package: github.com/moby/moby/api/types/image
networkCreate:
$ref: '#/components/schemas/CreateRequest'
description: Network create
PullIdentity:
description: If image was pulled via mirror, this contains the original repository location.
properties:
Repository:
description: Repository is the remote repository location the image was pulled from.
type: string
title: PullIdentity contains remote location information if image was created via pull.
type: object
x-go-package: github.com/moby/moby/api/types/image
SubnetStatuses:
additionalProperties:
type: object
type: object
x-go-package: github.com/moby/moby/api/types/network
ImageProperties:
properties:
Containers:
description: 'Containers is an array containing the IDs of the containers that are
using this image.'
items:
type: string
type: array
Identity:
$ref: '#/components/schemas/Identity'
Platform:
$ref: '#/components/schemas/Platform'
Size:
properties:
Unpacked:
description: 'Unpacked is the size (in bytes) of the locally unpacked
(uncompressed) image content that''s directly usable by the containers
running this image.
It''s independent of the distributable content - e.g.
the image might still have an unpacked data that''s still used by
some container even when the distributable/compressed content is
already gone.'
format: int64
type: integer
required:
- Unpacked
type: object
required:
- Platform
- Containers
type: object
x-go-package: github.com/moby/moby/api/types/image
Platform:
properties:
architecture:
description: 'Architecture field specifies the CPU architecture, for example
`amd64` or `ppc64le`.'
type: string
x-go-name: Architecture
os:
description: OS specifies the operating system, for example `linux` or `windows`.
type: string
x-go-name: OS
os.features:
description: 'OSFeatures is an optional field specifying an array of strings,
each listing a required OS feature (for example on Windows `win32k`).'
items:
type: string
type: array
x-go-name: OSFeatures
os.version:
description: 'OSVersion is an optional field specifying the operating system
version, for example on Windows `10.0.14393.1066`.'
type: string
x-go-name: OSVersion
variant:
description: 'Variant is an optional field specifying a variant of the CPU, for
example `v7` to specify ARMv7 when architecture is `arm`.'
type: string
x-go-name: Variant
title: Platform describes the platform which the image in the manifest runs on.
type: object
x-go-package: github.com/opencontainers/image-spec/specs-go/v1
Summary:
properties:
Containers:
description: 'Number of containers using this image. Includes both stopped and running
containers.
This size is not calculated by default, and depends on which API endpoint
is used. `-1` indicates that the value has not been set / calculated.'
format: int64
type: integer
Created:
description: 'Date and time at which the image was created as a Unix timestamp
(number of seconds since EPOCH).'
format: int64
type: integer
Descriptor:
$ref: '#/components/schemas/Descriptor'
Id:
description: 'ID is the content-addressable ID of an image.
This identifier is a content-addressable digest calculated from the
image''s configuration (which includes the digests of layers used by
the image).
Note that this digest differs from the `RepoDigests` below, which
holds digests of image manifests that reference the image.'
type: string
x-go-name: ID
Labels:
additionalProperties:
type: string
description: User-defined key/value metadata.
type: object
Manifests:
description: 'Manifests is a list of image manifests available in this image. It
provides a more detailed view of the platform-specific image manifests or
other image-attached data like build attestations.
WARNING: This is experimental and may change at any time without any backward
compatibility.'
items:
$ref: '#/components/schemas/ManifestSummary'
type: array
ParentId:
description: 'ID of the parent image.
Depending on how the image was created, this field may be empty and
is only set for images that were built/created locally. This field
is empty if the image was pulled from an image registry.'
type: string
x-go-name: ParentID
RepoDigests:
description: 'List of content-addressable digests of locally available image manifests
that the image is referenced from. Multiple manifests can refer to the
same image.
These digests are usually only available if the image was either pulled
from a registry, or if the image was pushed to a registry, which is when
the manifest is generated and its digest calculated.'
items:
type: string
type: array
RepoTags:
description: 'List of image names/tags in the local image cache that reference this
image.
Multiple image tags can refer to the same image, and this list may be
empty if no tags reference the image, in which case the image is
"untagged", in which case it can still be referenced by its ID.'
items:
type: string
type: array
SharedSize:
description: 'Total size of image layers that are shared between this image and other
images.
This size is not calculated by default. `-1` indicates that the value
has not been set / calculated.'
format: int64
type: integer
Size:
description: Total size of the image including all layers it is composed of.
format: int64
type: integer
required:
- Containers
- Created
- Id
- Labels
- ParentId
- RepoDigests
- RepoTags
- SharedSize
- Size
type: object
x-go-package: github.com/moby/moby/api/types/image
Identity:
description: 'This is trusted information verified by the daemon and cannot be modified
by tagging an image to a different name.'
properties:
Build:
description: Build contains build reference information if image was created via build.
items:
$ref: '#/components/schemas/BuildIdentity'
type: array
Pull:
description: 'Pull contains remote location information if image was created via pull.
If image was pulled via mirror, this contains the original repository location.
After successful push this images also contains the pushed repository location.'
items:
$ref: '#/components/schemas/PullIdentity'
type: array
Signature:
description: Signature contains the properties of verified signatures for the image.
items:
$ref: '#/components/schemas/SignatureIdentity'
type: array
title: Identity holds information about the identity and origin of the image.
type: object
x-go-package: github.com/moby/moby/api/types/image
Task:
description: Task carries the information about one backend task
properties:
EndpointID:
description: endpoint ID
type: string
EndpointIP:
description: endpoint IP
type: string
x-go-type: net/netip.Addr
Info:
additionalProperties:
type: string
description: info
type: object
Name:
description: name
type: string
type: object
x-go-package: github.com/moby/moby/api/types/network
KnownSignerIdentity:
title: KnownSignerIdentity is an identifier for a special signer identity that is known to the implementation.
type: string
x-go-package: github.com/moby/moby/api/types/image
IPAMStatus:
description: IPAMStatus IPAM status
properties:
Subnets:
$ref: '#/components/schemas/SubnetStatuses'
type: object
x-go-package: github.com/moby/moby/api/types/network
Descriptor:
description: 'This structure provides `application/vnd.oci.descriptor.v1+json` mediatype
when marshalled to JSON.'
properties:
annotations:
additionalProperties:
type: string
description: Annotations contains arbitrary metadata relating to the targeted content.
type: object
x-go-name: Annotations
artifactType:
description: ArtifactType is the IANA media type of this artifact.
type: string
x-go-name: ArtifactType
data:
description: 'Data is an embedding of the targeted content. This is encoded as a base64
string when marshalled to JSON (automatically, by encoding/json). If
present, Data can be used directly to avoid fetching the targeted content.'
items:
format: uint8
type: integer
type: array
x-go-name: Data
digest:
$ref: '#/components/schemas/Digest'
mediaType:
description: MediaType is the media type of the object this schema refers to.
type: string
x-go-name: MediaType
platform:
$ref: '#/components/schemas/Platform'
size:
description: Size specifies the size in bytes of the blob.
format: int64
type: integer
x-go-name: Size
urls:
description: URLs specifies a list of URLs from which this object MAY be downloaded
items:
type: string
type: array
x-go-name: URLs
title: Descriptor describes the disposition of targeted content.
type: object
x-go-package: github.com/opencontainers/image-spec/specs-go/v1
ConfigReference:
description: 'ConfigReference The config-only network source to provide the configuration for
this network.'
properties:
Network:
description: 'The name of the config-only network that provides the network''s
configuration. The specified network must be an existing config-only
network. Only network names are allowed, not network IDs.'
example: config_only_network_01
type: string
type: object
x-go-package: github.com/moby/moby/api/types/network
EndpointIPAMConfig:
description: EndpointIPAMConfig represents IPAM configurations for the endpoint
properties:
IPv4Address:
type: string
x-go-type: net/netip.Addr
IPv6Address:
type: string
x-go-type: net/netip.Addr
LinkLocalIPs:
items:
type: string
x-go-type: net/netip.Addr
type: array
type: object
x-go-package: github.com/moby/moby/api/types/network
Status:
properties:
IPAM:
$ref: '#/components/schemas/IPAMStatus'
title: Status provides runtime information about the network such as the number of allocated IPs.
type: object
x-go-package: github.com/moby/moby/api/types/network
ManifestSummary:
properties:
AttestationData:
$ref: '#/components/schemas/AttestationProperties'
Available:
description: 'Indicates whether all the child content (image config, layers) is
fully available locally'
type: boolean
Descriptor:
$ref: '#/components/schemas/Descriptor'
ID:
description: 'ID is the content-addressable ID of an image and is the same as the
digest of the image manifest.'
type: string
ImageData:
$ref: '#/components/schemas/ImageProperties'
Kind:
$ref: '#/components/schemas/ManifestKind'
Size:
description: 'Size is the size information of the content related to this manifest.
Note: These sizes only take the locally available content into account.'
properties:
Content:
description: 'Content is the size (in bytes) of all the locally present
content in the content store (e.g. image config, layers)
referenced by this manifest and its children.
This only includes blobs in the content store.'
format: int64
type: integer
Total:
description: 'Total is the total size (in bytes) of all the locally present
data (both distributable and non-distributable) that''s related to
this manifest and its children.
This equal to the sum of [Content] size AND all the sizes in the
[Size] struct present in the Kind-specific data struct.
For example, for an image kind (Kind == ManifestKindImage),
this would include the size of the image content and unpacked
image snapshots ([Size.Content] + [ImageData.Size.Unpacked]).'
format: int64
type: integer
type: object
required:
- ID
- Descriptor
- Available
- Size
- Kind
type: object
x-go-package: github.com/moby/moby/api/types/image
SignerIdentity:
description: '[certificate.Summary]: https://pkg.go.dev/github.com/sigstore/sigstore-go/pkg/fulcio/certificate#Summary'
properties:
BuildConfigDigest:
description: Immutable reference to the specific version of the top-level/initiating build instructions.
type: string
BuildConfigURI:
description: Build Config URL to the top-level/initiating build instructions.
type: string
BuildSignerDigest:
description: Immutable reference to the specific version of the build instructions that is responsible for signing.
type: string
BuildSignerURI:
description: Reference to specific build instructions that are responsible for signing.
type: string
BuildTrigger:
description: Event or action that initiated the build.
type: string
CertificateIssuer:
type: string
Issuer:
description: 'The OIDC issuer. Should match `iss` claim of ID token or, in the case of
a federated login like Dex it should match the issuer URL of the
upstream issuer. The issuer is not set the extensions are invalid and
will fail to render.'
type: string
RunInvocationURI:
description: Run Invocation URL to uniquely identify the build execution.
type: string
RunnerEnvironment:
description: Specifies whether the build took place in platform-hosted cloud infrastructure or customer/self-hosted infrastructure.
type: string
SourceRepositoryDigest:
description: Immutable reference to a specific version of the source code that the build was based upon.
type: string
SourceRepositoryIdentifier:
description: Immutable identifier for the source repository the workflow was based upon.
type: string
SourceRepositoryOwnerIdentifier:
description: Immutable identifier for the owner of the source repository that the workflow was based upon.
type: string
SourceRepositoryOwnerURI:
description: Source repository owner URL of the owner of the source repository that the build was based on.
type: string
SourceRepositoryRef:
description: Source Repository Ref that the build run was based upon.
type: string
SourceRepositoryURI:
description: Source repository URL that the build was based on.
type: string
SourceRepositoryVisibilityAtSigning:
description: Source repository visibility at the time of signing the certificate.
type: string
SubjectAlternativeName:
type: string
title: 'SignerIdentity contains information about the signer certificate used to sign the image.
This is [certificate.Summary] with deprecated fields removed and keys in Moby uppercase style.'
type: object
x-go-package: github.com/moby/moby/api/types/image
IPAMConfig:
description: IPAMConfig represents IPAM configurations
properties:
AuxiliaryAddresses:
additionalProperties:
type: string
x-go-type: net/netip.Addr
type: object
x-go-name: AuxAddress
Gateway:
type: string
x-go-type: net/netip.Addr
IPRange:
type: string
x-go-type: net/netip.Prefix
Subnet:
type: string
x-go-type: net/netip.Prefix
type: object
x-go-package: github.com/moby/moby/api/types/network
networkConnectRequest:
$ref: '#/components/schemas/ConnectRequest'
description: Network connect
ServiceInfo:
description: ServiceInfo represents service parameters with the list of service's tasks
properties:
LocalLBIndex:
description: local l b index
format: int64
type: integer
Ports:
description: ports
items:
type: string
type: array
Tasks:
description: tasks
items:
$ref: '#/components/schemas/Task'
type: array
VIP:
description: v IP
type: string
x-go-type: net/netip.Addr
type: object
x-go-package: github.com/moby/moby/api/types/network
Inspect:
properties:
Attachable:
description: 'Whether a global / swarm scope network is manually attachable by regular
containers from workers in swarm mode.'
example: false
type: boolean
ConfigFrom:
$ref: '#/components/schemas/ConfigReference'
ConfigOnly:
description: 'Whether the network is a config-only network. Config-only networks are
placeholder networks for network configurations to be used by other
networks. Config-only networks cannot be used directly to run containers
or services.'
type: boolean
Containers:
additionalProperties:
$ref: '#/components/schemas/EndpointResource'
description: Contains endpoints attached to the network.
example:
19a4d5d687db25203351ed79d478946f861258f018fe384f229f2efa4b23513c:
EndpointID: 628cadb8bcb92de107b2a1e516cbffe463e321f548feb37697cce00ad694f21a
IPv4Address: 172.19.0.2/16
IPv6Address: ''
MacAddress: 02:42:ac:13:00:02
Name: test
type: object
Created:
description: 'Date and time at which the network was created in
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format with nano-seconds.'
example: '2016-10-19T04:33:30.360899459Z'
format: date-time
type: string
Driver:
description: 'The name of the driver used to create the network (e.g. `bridge`,
`overlay`).'
example: overlay
type: string
EnableIPv4:
description: Whether the network was created with IPv4 enabled.
example: true
type: boolean
EnableIPv6:
description: Whether the network was created with IPv6 enabled.
example: false
type: boolean
IPAM:
$ref: '#/components/schemas/IPAM'
Id:
description: ID that uniquely identifies a network on a single machine.
example: 7d86d31b1478e7cca9ebed7e73aa0fdeec46c5ca29497431d3007d2d9e15ed99
type: string
x-go-name: ID
Ingress:
description: Whether the network is providing the routing-mesh for the swarm cluster.
example: false
type: boolean
Internal:
description: 'Whether the network is created to only allow internal networking
connectivity.'
example: false
type: boolean
Labels:
additionalProperties:
type: string
description: Metadata specific to the network being created.
example:
com.example.some-label: some-value
com.example.some-other-label: some-other-value
type: object
Name:
description: Name of the network.
example: my_network
type: string
Options:
additionalProperties:
type: string
description: Network-specific options uses when creating the network.
example:
com.docker
# --- truncated at 32 KB (44 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/podman/refs/heads/main/openapi/podman-networks-compat-api-openapi.yml