Search or ask Docker

Get information about files in a container

HEAD /containers/{id}/archive — Docker Engine API 1.57.

View Markdown
HEAD/containers/{id}/archive
A response header X-Docker-Container-Path-Stat is returned, containing a base64 - encoded JSON object with some filesystem header information about the path.

Connection and access

API connection and authentication guidance

/v1.57

No HTTP authentication requirement is declared for this operation. Transport access controls can still apply.

Parameters

id path Required

ID or name of the container

Type: string

All schema constraints and annotations
{
  "type": "string"
}

path query Required

Resource in the container’s filesystem to archive.

Type: string

All schema constraints and annotations
{
  "type": "string"
}

Request and responses

Response 200

no error

No response content is declared.

Headers

X-Docker-Container-Path-Stat

A base64 - encoded JSON object with some filesystem header information about the path

{
  "description": "A base64 - encoded JSON object with some filesystem header\ninformation about the path\n",
  "schema": {
    "type": "string"
  }
}

Response 400

Bad parameter

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Response 404

Container or path does not exist

application/json

Schema: ErrorResponse

Example

{
  "message": "No such container: c2ada9df5af8"
}

Response 500

Server error

application/json

Schema: ErrorResponse

Schema example

{
  "message": "Something went wrong."
}

Referenced schemas

#/components/schemas/ErrorResponse

Complete operation contract
{
  "description": "A response header `X-Docker-Container-Path-Stat` is returned, containing\na base64 - encoded JSON object with some filesystem header information\nabout the path.\n",
  "operationId": "ContainerArchiveInfo",
  "parameters": [
    {
      "description": "ID or name of the container",
      "in": "path",
      "name": "id",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Resource in the container’s filesystem to archive.",
      "in": "query",
      "name": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "no error",
      "headers": {
        "X-Docker-Container-Path-Stat": {
          "description": "A base64 - encoded JSON object with some filesystem header\ninformation about the path\n",
          "schema": {
            "type": "string"
          }
        }
      }
    },
    "400": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Bad parameter"
    },
    "404": {
      "content": {
        "application/json": {
          "example": {
            "message": "No such container: c2ada9df5af8"
          },
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Container or path does not exist"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Server error"
    }
  },
  "summary": "Get information about files in a container",
  "tags": [
    "Container"
  ]
}